PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 10th of September, 2020

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:01:32] <altendky> err, numpy
[00:10:20] <altendky> tos9: i don't know specifically for SAT but in general i'd think `if TYPE_CHECKING:` would be proper.
[00:19:43] <tos9> altendky: it's not my project otherwise I'd change it (I know like ~negative 7 things about typing so I don't really have a personal opinion)
[00:19:48] <tos9> but if that's the only way I'll probably suggest that
[00:20:14] <tos9> (or s/only/obvious)
[00:32:45] <altendky> tos9: it is exactly there for things you only want for type hinting so obvious or not it seems more appropriate than `if False:`
[07:24:15] <agronholm> tos9: you don't – use `if typing.TYPE_CHECKING`:
[09:32:48] <graingert> dstufft: bittorrent v2 released recently and it uses a persistent data structure for torrents, putting a regularly updated .torrent v2 file for each package would allow TUF hashes to apply to chunks of releases
[09:33:28] <graingert> this would allow the range header approach of extracting metadata to be secure
[09:36:23] <graingert> https://blog.libtorrent.org/2020/09/bittorrent-v2/
[09:38:01] <graingert> so if there were a complete .torrent for all of pypi released daily v2 clients with the old .torrent would be able to provide pieces to clients with the latest .torrent
[11:48:11] <tos9> agronholm: sounds good, thanks!
[14:09:11] <agronholm> graingert: on that topic, do you happen to know of a serious bittorrent library that also supports magnet?
[14:09:44] <graingert> agronholm: do you know any that don't?
[14:09:55] <graingert> I'd say libtorrent off the top my head
[14:09:57] <agronholm> most of the clients I've found so far don't
[14:10:11] <agronholm> they're just "learning projects" :P
[14:10:19] <graingert> you also don't need to support magnet as it's a separate part of the process
[14:10:37] <graingert> you can do magnet -> torrent before handing it to your torrent download lib
[14:10:49] <agronholm> what do you mean I don't need to support magnet? what do you know of my requirements?
[14:11:02] <graingert> sorry I misphrased it
[14:11:21] <agronholm> which one of these is libtorrent? https://pypi.org/search/?q=libtorrent
[14:12:00] <graingert> https://pypi.org/project/deluge/ is a full blown gui
[14:12:04] <graingert> I didn't even know it was on pypi
[14:12:12] <agronholm> I know, but I don't want a GUI
[14:12:22] <agronholm> I just want a library for downloading bittorrents
[14:12:49] <agronholm> finding one that isn't complete crap has proven to be quite a challenge
[14:13:06] <agronholm> I'm sure there is one somewhere
[14:13:56] <graingert> so deluge depends on libtorrent rasterbar
[14:14:18] <graingert> I don't know any of this off the top of my head I'm just reading the setup.py
[14:14:48] <graingert> just doing `pipx run deluge`
[14:15:21] <graingert> oh it needs system-site-packages https://www.irccloud.com/pastebin/jgD7pbOd/
[14:15:50] <agronholm> those are C libraries
[14:15:59] <agronholm> I'm looking for a python library, if I wasn't clear about that
[14:16:07] <graingert> oh like pure python?
[14:17:01] <graingert> so libtorrent got ported to js :p
[14:17:08] <graingert> so could be run on python with wasmer-python
[14:17:33] <graingert> sadly libtorrent got so good it basically killed innovation
[14:18:29] <graingert> agronholm: https://pypi.org/project/python-libtorrent-bin/#files manylinux whls good enough?
[14:21:10] <agronholm> I was hoping for something asyncio compatible but I guess I need to settle for that
[14:21:12] <agronholm> thanks
[14:32:52] <graingert> agronholm: libtorrent is definitely async compatable somehow, it works in a browser with compile flags
[14:33:08] <graingert> soo you can wedge yield points in if it doesn't provide them
[14:33:21] <graingert> maybe they run it in a worker, I dunno
[14:33:39] <graingert> have a chat to ferros if you're going to do anything cool/dynamic/scripty with it, agronholm
[14:34:39] <agronholm> ok
[14:42:04] <graingert> https://github.com/feross two ss one r sorry, agronholm
[15:07:38] <agronholm> is there any way to specify extras with "pip wheel"?
[15:10:52] <altendky> agronholm: `venv/bin/pip wheel -w whee .[pyside2]` looks like it is working here, for example
[15:11:51] <agronholm> I guess "." is the only local directory supported then
[15:12:03] <agronholm> I tried `/app[test]` and it didn't recognize that as a local path
[15:12:34] <agronholm> ditto with `./app[test]`
[19:42:27] <graingert> altendky: https://github.com/dask/s3fs/pull/362#issuecomment-689720155
[19:43:08] <graingert> altendky: you can't refer to extras from extras, until 2020
[20:00:30] <altendky> graingert: maybe i need to revisit my tests
[20:01:28] <altendky> graingert: but for now i'm dealing with my fixtures getting torn down in the wrong order (async before a sync it depends on)
[22:06:05] <_val_> Hello everyone. I am running pip versoin: pip 20.2.3 and whenever I try to install a package from localshop.. I get: http://sprunge.us/WtoVRJ
[22:06:31] <_val_> any idea why it isn't retrieving the package from my localshop but instead it wan'ts to go to pypi.python.org?
[22:12:42] <tos9> _val_: how are you configuring it / what command are you running?
[22:16:32] <_val_> tos9: this is the line: pip -v install ruamel.yaml==0.16.12 --index-url https://localshop.foobar.tld/repo/tgho --trusted-host localshop.foobar.tld --extra-index-url https://localshop.foobar.tld/repo/tgho
[22:17:48] <tos9> _val_: and if you run that exact command on 20.2.2 you don't hit pypi?
[22:18:02] <tos9> also why are you specifying the same URL as both --index-url and --extra-index-url?
[22:18:22] <_val_> tos9: out of frustration :/
[22:18:24] <_val_> just a sec
[22:20:44] <_val_> tos9: in the following link: https://localshop.foobar.tld/repo/tgho/ruamel.yaml/ I have these files:
[22:20:47] <_val_> ruamel.yaml-0.16.12-py2.py3-none-any.whl
[22:20:49] <_val_> ruamel.yaml-0.16.12.tar.gz
[22:21:49] <_val_> tos9: didn't test on 20.2.2
[22:23:28] <_val_> tos9: I downgraded up to 20.2.0
[22:23:37] <_val_> none work
[22:27:28] <_val_> tos9: weird thing. the url is `..../repo/tgho/ruamel.yaml/
[22:27:55] <_val_> but pip resolves it to `..../repo/tgho/ruamel-yaml/` you see it converts . to -
[22:33:13] <tos9> Right, that's correct behavior (as specificed via PEP440)
[22:33:33] <tos9> _val_: are you saying basically this isn't something new then? (pip hitting pypi with your command)
[22:35:41] <_val_> tos9: well to be honest I don't understand
[22:36:05] <_val_> why is pip trying to look for ruamel-yaml where the nginx servers ruamel.yaml
[22:37:24] <tos9> _val_: I'm confused on what problem you're trying to solve
[22:37:44] <tos9> _val_: I thought you were trying to figure out why/whether pip is hitting an index URL other than the one you told it to
[22:38:05] <tos9> _val_: on why pip is looking for `-` instead of `.` -- that's because as Python packages those are equivalent
[22:38:12] <_val_> tos9: exactly but since it somehow automatically want's to go to ruamel.yaml and not ruamel-yaml it goes to pypi
[22:38:29] <_val_> tos9: yes but the link is .
[22:38:46] <tos9> _val_: those two shouldn't have anything to do with each other
[22:38:47] <_val_> I have a linnk with ruamel.yaml and not ruamel-yaml
[22:39:35] <tos9> if pip went out and hit an index server other than the one you specified that'd be a huge deal if it happened, even if it didn't find the package you specified, but I can't tell if you mean to use --extra-index-url (in which case that behavior *is* expected) or whether you mean to use --index-url (in which case yeah that'd be a big bug)
[22:40:08] <_val_> tos9: I removed --extra-index-url..
[22:40:14] <_val_> situation not changed
[22:40:14] <tos9> _val_: is the thing serving that not a Python index (or well, is it a simple index?)
[22:40:29] <tos9> I don't know whether PEP440 applies to those to be honest
[22:40:34] <_val_> tos9: it is a playin nginx index thing
[22:40:36] <tos9> _val_: *which* situation?
[22:40:42] <_val_> just a sec
[22:40:47] <tos9> is pip hitting a different index URL? Or is it hitting the right one just not finding your file?
[22:41:28] <_val_> see this: https://localshop.foobar.tld:443 "GET /repo/tgho/ruamel-yaml/ HTTP/1.1" 302 0
[22:41:48] <_val_> but /repo/tgho/ruamel-yaml does not exist... so that's why it is giving a 302 and redirecting me to pypi
[22:41:58] <tos9> uh sorry also maybe I'm quoting the wrong PEP number since who can remember those,w ill have to double check
[22:42:16] <tos9> _val_: please show what command you're running
[22:42:16] <_val_> How could I get https://localshop.foobar.tld:443 "GET /repo/tgho/ruamel.yaml/
[22:42:44] <_val_> tos9: pip -vvvv install ruamel.yaml==0.16.12 --index-url https://localshop.foobar.tld/repo/tgho --trusted-host localshop.foobar.tld
[22:43:02] <tos9> _val_: and that command you see hits PyPI?
[22:43:13] <_val_> tos9: yes
[22:43:18] <_val_> let me show you another pastie
[22:44:28] <tos9> (pep503 is the right number FWIW)
[22:44:44] <_val_> tos9: http://sprunge.us/xlHUIW
[22:45:46] <_val_> tos9: hmm is that ... `normalize(name):` function?
[22:45:58] <tos9> _val_: oh! that's *your index server* sending a redirect
[22:46:00] <tos9> that's fine.
[22:46:30] <_val_> tos9: yes
[22:46:40] <_val_> that is stupid right and not sure where that happens
[22:46:46] <tos9> _val_: yes, I think the tl;dr is "your file is likely misgenerated"
[22:47:01] <tos9> and that it should not have a '.' in it
[22:47:22] <_val_> if I go via the web browser: https://localshop.foobar.tld/repo/tgho/ruamel-yaml it redirects me to https://pypi.org/simple/ruamel-yaml/
[22:47:35] <_val_> tos9: hmm where should I fix this? any idea?
[22:47:54] <tos9> _val_: and https://pypi.org/simple/ruamel-yaml/ works right?
[22:48:09] <tos9> I think because PyPI implements redirecting nonnormalized names to normalized ones
[22:48:47] <tos9> so if you have that, you either need to do that redirect in your index server as well (redirect ruamel.yaml to ruamel-yaml) or I half guess if you rebuild sdists/wheels with modern setuptools/wheel/etc. probably you'll end up with normalized names there too
[22:49:03] <_val_> tos9: yes that works but For security reasons I've denied access to external repositories
[22:49:34] <tos9> yup makes sense
[22:49:46] <tos9> _val_: so you have a folder on your filesystem you're serving with nginx yes?
[22:49:51] <tos9> and it's called ruamel.yaml?
[22:49:58] <tos9> if so, you should basically rename that folder ruamel-yaml
[22:50:03] <tos9> so that the name is properly normalized.
[22:50:06] <_val_> tos9: # localshop does not work well with hyphen in the name
[22:50:06] <_val_> #rewrite ^/repo/tgho/([^\.]*)_(.*)$ $scheme://$host/repo/tgho/$1-$2 redirect;
[22:50:10] <tos9> (and then probably that'll work)
[22:50:34] <_val_> tos9: I symlinked it
[22:50:36] <_val_> that didn't work
[22:50:44] <tos9> oh. I see. localshop is some private pypi project?
[22:50:45] <_val_> ln -s ruamel.yaml ruamel-yaml
[22:50:51] <_val_> tos9: yes
[22:51:42] <tos9> _val_: are you running a version of it from <4 years ago?
[22:51:53] <tos9> it looks like it's since that time become pep503 compliant: https://github.com/mvantellingen/localshop/pull/183
[22:52:01] <tos9> so it should be doing this properly according to that PR
[22:52:51] <_val_> tos9: let me check
[22:53:33] <_val_> Thanks tos9 I'll check this out tomorrow
[22:53:43] <_val_> now time to sleep. Thank you for your time!
[22:55:34] <tos9> np