[08:32:28] <pf_moore> pradunsg dstufft: Can you take a look at https://github.com/pypa/pip/issues/5121? Looks like we may have an issue with Jython in pip 9.0.2 and 10...
[14:28:00] <sumanah> lghampton: Ernest is working on mitigating a DoS attack (see http://status.python.org/ ) and I'm responding to some beta testers' feedback
[14:36:13] <sumanah> waseem18: I'm a little busy because I'm taking some beta testing feedback from one place and putting it in another :) (from a list to Warehouse issues on GitHub)
[14:37:06] <waseem18> Oh cool - I'm fiddling around with Twine code right now
[15:00:36] <agronholm> sumanah: did you reply to my proposal yet?
[15:00:45] <agronholm> a new wheel release this week
[15:00:57] <sumanah> Hi agronholm - yes, I said that sounds great
[15:01:01] <pradyunsg> I'm not sure who to tell or if this would need a github issue -- It seems the "trending" projects on pypi.org haven't changed in the past full month.
[15:55:15] <lghampton> sumanah: it seems setuptools wants to allow users to pass in `long_description` files in non-UTF-8 formats, and not fail when they do so
[15:58:40] <toad_polo> I'll note that this exact same thing happened to me 2 days ago: https://github.com/dateutil/dateutil/pull/651
[15:58:46] <toad_polo> Which prompted the 2.7.2 release of dateutil
[15:59:16] <toad_polo> Llghampton , sumanah : If you pass it as a `unicode` / `str` it will always succeed, you don't have to worry about the encoding.
[15:59:54] <toad_polo> You do need to worry about the encoding when you are reading the file, and often times there's literally no way to know what that is because there's no consistent storage of metadata about file encoding :(
[16:00:19] <lghampton> toad_polo: Yes, I was reading the link you put in your comment about mojibake
[16:00:24] <sumanah> toad_polo: when lghampton was testing this I was warning her: you are now going to find monstrous Frankenfiles that lie about encodings
[16:00:38] <sumanah> or create such files in order to test things
[16:01:03] <lghampton> toad_polo: yes, I was deliberately using unusual encodings to break things
[16:01:08] <sumanah> and now you need to double-check, like, every layer of processing the file undergoes between your text editor and PyPI to see what might be reading/fiddling with stuff
[16:01:18] <sumanah> toad_polo: so maybe I could ask you a useful question here
[16:01:23] <toad_polo> I think if you are trying to write something generic, the `chardet` module will give a best guess heuristic about what the encoding is.
[16:01:35] <sumanah> toad_polo: are there likely encoding-related problems that readme_renderer *should* notice?
[16:01:59] <sumanah> better to target our efforts at that, rather than just fuzz the system with wacky files in arbitrary encodings
[16:03:24] <toad_polo> Though you'd probably have to open the file in `rb` mode and then `decode` afterward you know what encoding to use, rather than using `io.open` with a specific encoding.
[16:06:14] <toad_polo> I'm the world's shittiest setuptools maintainer, having just taken on that mantle very recently, so I don't really know, but my guess is that unless you want to try to auto-magically fix the encoding stuff (which I don't recommend), you don't bother.
[16:06:26] <toad_polo> I mean, it's good to fuzz it mind you to make sure there are no actual security vulnerabilities, but the contract is that PKG-INFO is in UTF-8.
[16:06:37] <toad_polo> And setuptools expects you to pass it something preferably as `unicode`, meaning any encoding/decoding shenanigans would happen *before* it ever gets to the metadata writing stage.
[16:06:59] <toad_polo> It's always possible that someone could craft their own non-compliant PKG-INFO in a weird encoding, but I think you can rightly call that a bug in their implementation of the PEP.
[16:08:09] <toad_polo> Theoretically you could try to do some herculean thing like ftfy does: https://ftfy.readthedocs.io/en/latest/
[16:08:12] <toad_polo> But I would just not bother.
[16:08:26] <lghampton> toad_polo: yes, I see your reasoning
[16:08:37] <toad_polo> That said, I bet ftfy is an awesome place to look for test suite inputs.
[16:09:50] <lghampton> toad_polo: Yes, it looks like a very interesting library
[16:13:29] <toad_polo> I'm going to close bug #1311, let me know if you have reason to believe it actually is something that needs to be changed on the setuptools side.
[16:14:47] <lghampton> toad_polo: No, I don't think it needs changing. :)
[16:18:37] <lghampton> sumanah: ooh, that looks interesting
[16:21:27] <lghampton> sumanah: It is also interesting that languages like Japanese and Russian both have words for the random characters that result from text encoding being read incorrectly
[17:55:51] <sumanah> nlh: yes - I need to review that, thank you for reminding me!
[17:56:06] <nlh> ok, no problem. I wasn't sure if you might want me to reassign it
[17:56:41] <nlh> lghampton, did you see my message on slack ? I need some help organising user test training and sessions, if you might be able to help me with that
[18:00:05] <pf_moore> quick question - when you did the pypi beta announcement, how did you get it in the Python insider blog? Was it just through posting it to python-announce?
[18:00:28] <sumanah> pf_moore: Ernest posted it for me
[18:00:45] <sumanah> pf_moore: https://blog.python.org/ makes that clearer
[18:02:19] <sumanah> pf_moore: I believed the announcement was important enough to deserve that signal-boosting but let me know if you think I was wrong there
[18:02:45] <pf_moore> No, no - I was thinking about putting the pip 10 announcement up there, but wasn't sure how to do it
[18:03:19] <sumanah> pf_moore: :) I figure you can ask any of the people on the sidebar at https://blog.python.org/ to do it.
[18:03:22] <pf_moore> (Apparently I have editor rights on there, but I'm not sure I've ever used them :-))
[18:03:29] <sumanah> pf_moore: under "contributors"
[18:03:52] <sumanah> pf_moore: oh - maybe Ernest can tell you if he is not busy explaining things to Artifactory and fighting spammers
[18:04:00] <sumanah> tell you the logistical specifics I mean
[18:04:10] <sumanah> pradyunsg: you have a moment?
[18:04:29] <pf_moore> sumanah: Yeah - includes me... So I guess I just go for it. Cool. Really, I just didn't want to have a mail to python-announce get auto-posted there and then me duplicate it
[18:04:54] <pf_moore> Thanks - I'll ping EWDurbin if I have problems
[18:05:52] <pf_moore> EWDurbin - I'm just trying to get clear what I need to do to post the pip 10 announcement (beta end of this week) and wasn't sure if there was any protocol for posting to python insider
[18:06:05] <pf_moore> I have edit rights on there but have never used them...
[18:06:08] <sumanah> pradyunsg: so lghampton has been doing a fair amount of pull request review recently for Warehouse, but so far has almost entirely been doing *testing* (fetch the branch, run Warehouse, verify functionality)
[18:06:39] <sumanah> pradyunsg: I thought you might have some tips and thoughts about what was helpful to you, in learning code review skills, as you grew from contributor to co-maintainer of pip
[18:06:44] <EWDurbin> pf_moore: i think it's generally just used for release announcements... seems fair to do major stuff there. the protocol is basically "someone does it" it seems
[18:06:51] <sumanah> pradyunsg: (right? I think you're a co-maintainer now?)
[18:07:40] <pf_moore> EWDurbin: Cool, I'll do that then. Ta.
[18:08:22] <EWDurbin> pf_moore: i would reccommend working with two or three people to draft/edit before posting
[18:08:38] <EWDurbin> for anything less mechanical than "python X.Y.Z" is out :0
[18:09:32] <pradyunsg> sumanah: I did do a bunch of reviews, so, I'll be happy to help in any way I can. :)
[18:10:00] <pradyunsg> pf_moore, dstufft: So... I'm a co-maintainer? :P
[18:13:25] <sumanah> lghampton: while we're waiting for pradyunsg to share any tips/thoughts about what was helpful to them, let's look at https://github.com/pypa/warehouse/pull/3405
[18:17:34] <sumanah> pradyunsg: how long ago did you get the GitHub "pypa/pip wants to make you a collaborator on this repo" message?
[18:17:45] <sumanah> (which is to say, how long ago did you get the commit bit for pip?)
[18:19:11] <pradyunsg> Wednesday, October 4th, 2017
[18:19:54] <sumanah> pradyunsg: I have found https://producingoss.com/ a useful reference in talking about what good maintainership looks like, in case you want more perspectives
[18:23:25] <lghampton> sumanah: oh, I see what you mean now, it does look like he pushed changes from his branch fixing https://github.com/pypa/warehouse/issues/3185 to the wrong branch
[18:28:18] <sumanah> lghampton: so first let's do the same thing you've been doing in PR review - load up the branch locally and check that it does what the author says it does
[18:36:23] <sumanah> lghampton: https://warehouse.readthedocs.io/api-reference/feeds/#project-and-release-activity-details has a sample of how to connect in your interpreter
[18:36:43] <sumanah> lghampton: in Python 3's standard library, `xmlrpc.client` is useful here
[18:37:03] <sumanah> actually lghampton before you start trying out that code, read https://warehouse.readthedocs.io/api-reference/feeds/#project-and-release-activity-details and tell me when you have done so
[18:40:00] <sumanah> Also lghampton I spaced a moment, sorry, we're talking about the /simple/ API rather than the XML-RPC API, so we don't need to use xmlrpc.client
[18:42:32] <pradyunsg> lghampton: so... the way I do PR reviews is that I skim the code, to see the scale of the changes. Then, I proceed try to verify that what the PR says is what it does. Looking for edge cases that OP would not have considered is usually what I do after that.
[18:44:28] <lghampton> pradyunsg: thank you, that is interesting. How do you know what edge cases to look for?
[18:46:05] <pradyunsg> lghampton: If I don't find anything fishy until then, I look at the code and try to see if the change makes sense -- was it made in the right place according to the system architecture (interrupt)
[18:47:49] <pradyunsg> lghampton: what edge cases to look for is mostly more of a good guess than a process for me. I just try to throw all kinds of inputs at the problem.
[18:49:34] <lghampton> sumanah: how did you send the GET request to the api on localhost?
[18:50:05] <pradyunsg> lghampton: the obvious stuff at this point includes things like super longs strings or unicode strings and zeros.
[18:50:15] <sumanah> lghampton: I love http://thebraidytester.com/downloads/YouAreNotDoneYet.pdf as a source of edge cases :) and as you become more experienced as an engineer you start to pattern-match.
[18:50:29] <lghampton> pradyunsg: sumanah: ok, I have been doing some of that
[18:50:33] <sumanah> You know that in previous cases, we've had seams dealing with foo or bar
[18:51:08] <sumanah> lghampton: there must be a way to do this with requests, hmmm
[18:51:34] <lghampton> sumanah: I'm sure. I found https://www.ricston.com/blog/testing-apis-postman/ but it seems like too much
[18:54:48] <pradyunsg> lghampton: Usually, you also get an idea of what kind of edge cases exist _after_ you look at the code -- some things are optional but the PR doesn't consider that and stuff like that.
[18:55:13] <sumanah> lghampton: r = requests.get("http://localhost:80/simple/") worked for me!
[18:57:42] <pradyunsg> sumanah: I also like https://github.com/minimaxir/big-list-of-naughty-strings -- has some interesting string handling related edge cases. Maybe someone could try those out on Warehouse sometime?
[18:58:06] <lghampton> pradyunsg: oh, yes, the naughty strings :)
[18:58:26] <pradyunsg> lghampton: (resuming from interrupt) and other than the architecture, this is also when I look at things like, do the variable names make sense, is the code "looking good" (readability) and all the style stuff.
[18:59:20] <lghampton> pradyunsg: Yes, I have done that kind of code review where someone critiques my code for style and readability
[19:00:41] <pradyunsg> lghampton: They're tricky but I guess you know how to go about those. Having a linter running like warehouse does, makes life easier in these cases. :)
[19:01:04] <sumanah> pradyunsg: how is pip's linting?
[19:01:18] <lghampton> pradyunsg: yes, from what I have seen the linter is helpful
[19:01:35] <pradyunsg> sumanah: flake8, off the top of my head.
[19:01:56] <sumanah> pradyunsg: you happy with it or you think pip ought to add more linting?
[19:02:34] <pradyunsg> sumanah: It's super lax and I would like to enforce a more stricter style.
[19:02:46] <sumanah> pradyunsg: is there an open issue for that?
[19:03:03] <pradyunsg> sumanah: it does check line lengths, newlines and whitespace properly so, it's an overall benefit.
[19:05:16] <pradyunsg> sumanah: i'll have to look. I'd made https://github.com/pypa/pip/pull/4651 at one point, and I think I made one for better linting too...
[19:05:29] <pradyunsg> as in, an issue for discussion. Looking.
[19:06:20] <pradyunsg> I'd mentioned the same intent over in https://github.com/pypa/pip/pull/4844
[19:06:46] <pradyunsg> Never got around to making the issue (coz I'd have linked it to the above PRs)
[20:14:22] <sumanah> benjaoming: PyPI no longer has a UI for users to manage GPG or SSH public keys, and once the legacy site shuts down, GPG/PGP signatures for packages will no longer be visible in PyPI's web UI.
[20:14:43] <sumanah> benjaoming: you might want to look at https://mail.python.org/pipermail/distutils-sig/2018-March/032066.html for more context
[20:15:04] <sumanah> benjaoming: and Donald has written more about his thinking in https://caremad.io/posts/2013/07/packaging-signing-not-holy-grail/
[20:15:38] <sumanah> benjaoming: You'll still find GPG signatures for packages in the https://warehouse.readthedocs.io/api-reference/legacy/#simple-project-api Simple Project API, per https://www.python.org/dev/peps/pep-0503/ PEP 503
[20:17:35] <sumanah> benjaoming: if you talk a little about what you currently use PGP keys on your PyPI profile to do, we can talk about what other tools you could use to do that. Sorry for the difficulty
[20:35:43] <sumanah> I'm getting an error when I run `make initdb` locally:
[20:37:09] <sumanah> and going to localhost in my browser gives me: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
[20:38:09] <sumanah> EWDurbin: ^ can you help? this is blocking me from reviewing a Nicole PR
[20:38:40] <EWDurbin> probably best to try a `make purge` and a new `make up`
[20:42:32] <sumanah> EWDurbin: at least as far as I can remember I've been using the `make build` and `make serve` commands in the repo root directory on the host machine, like usual
[20:42:50] <sumanah> EWDurbin: I ran docker-compose down -v, then ran `make purge` and got the exact same permission denied errors
[20:44:44] <sumanah> EWDurbin: this can wait several hours because it's blocking Nicole but the magic of timezones means she is probably not blocked *right now*
[20:49:00] <sumanah> I don't see why this should have worked, but I closed a bpython session where I'd used `requests` to make requests of the `/simple` API locally, and the terminal it was in. Ran `make build`, opened a new terminal and ran `make serve`, and now `make initdb` is beetling along happily
[20:51:13] <benjaoming> sumanah: thanks! I find consolation in the mail thread, a nice exchange. Also nice to know that plans of proper authenticity are in the making. Is the signing-disabled version of Wheel released yet? Or does Pypi.org just anticipate it to be a final decision?
[20:51:51] <sumanah> benjaoming: good questions! :) I can refer you to agronholm for wheel-related policy and roadmap questions
[21:00:32] <toad_polo> What would trigger this going off? https://github.com/pypa/setuptools/blob/v38.7.0/pkg_resources/__init__.py#L199
[21:03:14] <sumanah> and benjaoming if you would like, you're welcome to reply to distutils-sig and ask there as well
[21:07:55] <cooperlees> EWDurbin: released new bandersnatch - but my .md failed :(
[21:08:07] <cooperlees> And then my push with said .md file changes failed too
[21:08:22] <cooperlees> So not having a good successful afternoon :\
[21:45:12] <EWDurbin> cooperlees: a kind of silly bug is that you have to push the tar.gz first before the wheel due to wheel not supporing the Description-Content-Type stuff
[21:45:22] <EWDurbin> next release of wheel will handle it
[21:45:28] <EWDurbin> PyPI takes the first metadata it gets :/
[22:07:41] <njs> benjaoming: the wheel signing feature discussed in that distutils-sig thread is actually a *different* way of signing packages than gpg signatures... The basic logic is the same though -- neither really does anything useful, and better to clear the ground of (redundant!) useless stuff than keep it around pretending like it's useful
[22:10:02] <njs> cooperlees: this is off-topic, but I am super curious about your comment yesterday that you can't understand twisted at all, but you're excited about moving things to asyncio, since I've always thought of them as essentially the same modulo methodNaming_conventions :-)
[22:26:06] <warner> hey, so I'm seeing intermittent failures of a Travis-CI OS-X build. I'm aware of the brownout, but 1: I'm pretty sure we've got pip-9.0.3, 2: it fails when it gets to a specific dependent package ("incremental") on multiple builds, and 3: I'm seeing the tox process successfully hit https://pypi.python.org/ lots of times just a few moments before it fails to fetch Incremental
[22:26:24] <warner> of course with travis OS-X builds lagging by several hours, it's not been easy to experiment :)
[22:27:50] <warner> https://travis-ci.org/tahoe-lafs/tahoe-lafs/jobs/359242783#L2054 in case anyone has any ideas
[22:28:08] <warner> "Couldn't find index page for 'incremental' (maybe misspelled)"
[22:32:05] <dstufft> warner: is incremental in setup_requires
[22:32:11] <dstufft> because if so, that's installed via setuptools not pip
[22:33:02] <warner> ah, ok, so that's what's special about it
[22:33:36] <njs> oh dear. well, I guess this might help convince people to stop using setup_requires...
[22:33:41] <warner> so.. am I looking for a way to upgrade setuptools, or would that help on an OS-X=10.12?
[22:34:03] <njs> warner: installing everything from homebrew might help I guess?
[22:34:25] <dstufft> warner: setuptools doesn't have the fallback to securetransport
[22:34:27] <warner> hm, yeah, I guess travis can do that
[22:34:37] <warner> dstufft: ok, so that's a pip-specific thing, got it
[22:35:15] <warner> has setup_requires= fallen out of favor? we're using it to require a setuptools that's new enough to understand things like python_requires=
[22:36:21] <dstufft> warner: you can't really use setup_requires to change the version of setuptols that is running setup.py
[22:36:43] <warner> ok, that matches our experience
[22:36:51] <warner> we got some really interesting error messages
[22:36:54] <dstufft> you're going to get 2 different versions of setuptools imported, so you might have half of the imported setuptools.* namespace be one version, and the other half be another version
[22:37:19] <warner> yeah, like https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/OS-X%2010.13/builds/14/steps/tox/logs/stdio
[22:37:19] <dstufft> warner: pip x has a solution!
[22:38:40] <dstufft> warner: in the meantime, you can probably just ``pip install setuptools incremental`` beforehand
[22:38:45] <warner> ok, so more setup.cfg, less setup.py
[22:38:58] <dstufft> sumanah: er, not officially, a friend of mine started calling it that and I picked it up as a habit
[22:39:19] <warner> hm, ok. This is being driven from tox, so I guess I need to do that manually from within my tox.ini instead of letting Twisted own it
[22:39:26] <sumanah> I'm actually liking it as long as there is actually a 10.0 thing, you know, for all the dependency management goodies
[22:40:34] <sumanah> njs: can I put you down as a maybe for https://wiki.python.org/psf/PackagingSprints ?
[22:41:15] <njs> warner: he means 'pip install -U setuptools incremental'
[22:42:18] <sumanah> njs: I shall leave you off the list then :)
[22:45:20] <warner> so under what circumstances do we get TLS-1.2? (pip-* under OS-X-10.13) OR (pip-9.0.3 under OS-X-*) and no version of setuptools-without-pip at all?
[22:45:40] <Alex_Gaynor> warner: setuptools on macOS 10.13+ is also fine
[22:45:52] <Alex_Gaynor> But there's no solution for setuptools on macOS<10.13
[22:49:23] <dstufft> in all cases here Python is jsut letting OpenSSL negiotiate the highest TLS it understands, just macOS was using 0.9.8<some letters> until it switched to libressl in 10.13
[22:50:05] <dstufft> and pip 9.0.3 has workarounds to use SecureTransport instead in the 0.9.8 using macs
[22:50:12] <warner> ok, so (mostly) any python on 10.13 should be ok because the system OpenSSL is really a modern-ish libressl, right?
[22:50:37] <dstufft> they removed the headers and everything
[22:50:43] <Alex_Gaynor> There haven't been headers for a while
[22:50:47] <dstufft> Homebrew etc are all bringing their own OpenSSL
[22:50:54] <warner> but on 10.12 you depend upon either 1: a better python, e.g. homebrew, that doesn't link against system OpenSSL because it's ancient, or 2: pip-9.0.3 which knows how to use OT
[22:50:56] <cooperlees> njs: TO be fair, I haven't twisted in year too. I'm sure it's a lot better. But I just understand asyncio naming and flows better I feel. Was there a particular question you have for me?
[22:57:02] <dstufft> I've talked at length with this to glyph & co, I'm pretty sure it boils down to (A) Twisted has a LOT of abstraactions at varying levels, and a lot of tutorials at using those abstractions, but not a lot of documentation at "unpealing" the abstractions, so as soon as an abstraction doesn't do what you want it to do, you're very very confused, whereas asyncio starts out without much, and most of the abstractions live outide of asyncio, so you
[22:57:02] <dstufft> start to layer them on as you understand things, versus trying to unpeal them and (B) asyncio makes coroutines first class, whereas Twisted really watns you to use callbacks, and callbacks do not fit my brain nearly as nicely as coro's do (and yes there is @inlineCallbacks, but none of the example code really uses it, and you used to often times get scoleded for using it)
[22:57:43] <cooperlees> I pretty much mirror those statements
[22:59:58] <techalchemy> dstufft: is pep518 going to become mandatory at some point/setup.py support dropped?
[23:00:36] <dstufft> techalchemy: setup.py will never be dropped, though it is very likely at some point that setup.py becomes implemented as an implicit PEP 518 backend.
[23:00:50] <techalchemy> that's roughly what I meant I guess
[23:01:09] <techalchemy> hmm does pip support that now?
[23:01:40] <dstufft> PEP 518 support is (partially I think?) in pip x
[23:01:45] <techalchemy> I guess I am fairly sure I haven't seen it in our vendored version of pip9
[23:02:34] <techalchemy> okay, I think we may need to prioritize an upgrade path on our end because anything that avoids us having to download every package to resolve setup.py when generating lockfiles will be a massive gain
[23:03:40] <dstufft> PEP 518 still downloads packages of course, not doing that requires a lot more than just a static setup_requires
[23:06:57] <techalchemy> dstufft: for our resolver, though, all it really demands is that pyproject.toml has install_requires enumerated and that that would be available via some api
[23:06:58] <njs> techalchemy: it's PEP 517 that lets you avoid calling setup.py, PEP 518 is just a replacement for setup_requires=
[23:10:01] <njs> cooperlees: the backstory is that I am for some reason obsessed with async usability, to the point that I have my own thing that competes with both twisted and asyncio :-)
[23:11:04] <njs> dstufft: there is something confusing about twisted's maze of abstractions, isn't there :-/
[23:14:57] <dstufft> njs: I want trio to be a thing I can use real bad :]
[23:16:35] <njs> dstufft: do you happen to know what the dividing line is for "thing you can use" vs not that? :-)
[23:17:18] <dstufft> njs: oh I think last time I looked at it, it told me not ot use it :)
[23:18:00] <sumanah> cooperlees: hey I am proceeding on the FB Secure the Net draft
[23:18:42] <dstufft> njs: think it could handle 500 million "events" (where 1 event = 1 line of bytes sent to it) a month? :D
[23:18:48] <njs> dstufft: oh, you can totally use it, as long as you're okay with a somewhat aggressive deprecation policy and a really tiny library ecosystem
[23:19:15] <cooperlees> sumanah: ok - Can't hurt to go both - Will go through different people
[23:20:02] <njs> dstufft: eh, speed-wise it should be within, like, a factor of 2 of anything else, and better than that if you can give us real benchmarks to target
[23:20:05] <dstufft> it's only like uh, 220 lines a second!
[23:20:19] <dstufft> njs: I have a thing using LineReceiver currently that could be rewritten in trio :]
[23:20:48] <dstufft> (it processes syslog streams to implement the metrics for PyPI)
[23:23:59] <njs> dstufft: http is a little more complicated. For clients there's 'asks', which is a from-scratch requests-like client (though missing fancy stuff like proxy support), there's an in-progress branch to add native support to urllib3/requests, and there's trio-asyncio which lets you use asyncio libraries like aiohttp
[23:24:57] <njs> dstufft: for server-side trio-asyncio is kinda the only thing right now, someone (maybe me I guess) needs to come up with an async WSGI-equivalent API and servers and frameworks written against it etc etc sigh