PMXBOT Log file Viewer

Help | Karma | Search:

#pypa-dev logs for Monday the 4th of June, 2018

(Back to #pypa-dev overview) (Back to channel listing) (Animate logs)
[12:01:35] <sumanah> hi ncoghlan!
[12:02:07] <ncoghlan> IRC client still works! (I don't fire it up very often since I left RH)
[13:57:44] <techalchemy> o/ @ ncoghlan
[13:59:10] <ncoghlan> o/ techalchemy
[13:59:29] <techalchemy> i always wonder what youre supposed to do with the other arm
[13:59:32] <ronny> ncoghlan: just a quick question - wil python 3.6. move docstrings into the module again or will it stay as is
[13:59:50] <techalchemy> ban docstrings!
[14:00:13] <ncoghlan> ronny: not clear yet, but my own predication is that we'll make DocString a new AST node type
[14:00:20] <ncoghlan> rather than making it an attribute again
[14:00:35] <ronny> ok, so pytest il lhandle somehow
[14:01:23] <sumanah> techalchemy: I do not get the joke
[14:01:25] <sumanah> !logs
[14:01:25] <pmxbot> http://kafka.dcpython.org/channel/pypa-dev
[14:01:32] <sumanah> ohhhh
[14:01:34] <sumanah> o/
[14:01:38] <sumanah> \o/ :)
[14:01:41] <techalchemy> yeah, waving arm :p
[14:01:52] <techalchemy> but that one is just celebrating
[14:02:02] <techalchemy> :p
[14:02:08] <sumanah> I was briefly wondering if you were making an ARM reference, like, chips and stuff
[14:02:30] <ronny> ncoghlan: another question - whats necessary to get a strucutrally consistent version of itemgetter, unpacking a tuple will cause different results dependong on whether its 1 element or more elements
[14:02:52] <techalchemy> ronny: that's not just true when using itemgetter...
[14:04:28] <techalchemy> ncoghlan: I am planning to cut a release today(?) with a bunch of fixes, no idea if I will get anything to handle the multiple inline `-e <thing>` case in this one
[14:05:12] <techalchemy> release is dependent upon what looks like an out of order non-deterministic resolution failure probably related to forking out suprocesses to do installations before we actually make a virtualenv
[14:05:18] <ncoghlan> techalchemy: no worries - I don't think that's urgent, since it was more the behaviour inherited from `pip` that surprised me
[14:05:28] <techalchemy> so they resolve and install and lock in the previous test's virtualenv
[14:05:28] <ronny> techalchemy: its stopping me from doing one pure python optimization in pluggy since unpacking one element to itemgetter makes it return elements and n elements returns tuples
[14:05:37] <ronny> techalchemy: i need a variant that always returns tuples
[14:06:11] <ronny> (the optimization gets bad yield when there is need for a single element workaround)
[14:06:25] <techalchemy> makes sense
[14:08:17] <ronny> hmm, im puzzled, why is it no longer c code now that i check again
[14:09:18] <ncoghlan> ronny: I think it's C code with a pure Python fallback
[14:10:52] <ronny> ncoghlan: interesting, im getting a pure fallback
[14:15:39] <ronny> ncoghlan: anyway - for both attrgetter and itemgetter there dont seem to be from_iterable versions that always return a tuple - what would be the process to get that fixed?
[14:16:51] <ncoghlan> ronny: tricky since they're kind of oddball additions to the operator module anyway
[14:17:28] <ncoghlan> it was one thing when they just replicated what the syntax can do (appropriate for the operator module), something else entirely when they went beyond it
[14:18:02] <ncoghlan> so trying to fix it highlights the fact that it was a mistake to extend those APIs with non-operator functionality in the first place
[14:19:07] <ronny> ncoghlan: well, extending them per se wasnt wrong, but it wasnt done in a thought out manner
[14:20:12] <sumanah> EWDurbin: may I PM?
[14:20:39] <EWDurbin> sumanah: yes
[14:21:37] <sumanah> cool
[14:26:58] <ronny> ncoghlan: its getting more and more regular that i have to approach python as a language whose stdlib cant be used nicely :/
[14:27:15] <ncoghlan> ronny: something I'd personally like to see is opreator.getitems() and opreator.getattrs(), which could then be combined with functools.partialmethod
[14:30:05] <ronny> ncoghlan: that might be nice as well
[14:30:30] <ronny> ncoghlan: i presume for that a pep is needed?
[14:31:17] <ncoghlan> ronny: nah, not for the operator module - python-ideas discussion, then (hopefully) a tracker issue and PR
[14:32:57] <ncoghlan> the fact the status quo has a weird special case for length 1 tuples, whereas partialmethod(getitems, *keys) would consistently return a tuple should help make the case
[14:33:41] <ronny> btw, is partialmethod new ?
[14:34:04] <techalchemy> ncoghlan: doesn't everything behave strangely with one-length tuples though
[14:34:40] <ronny> ncoghlan: ah - in my usecase it would be partial not partialmethod
[14:35:19] <techalchemy> like if I go through the legacy codebase at work I can find tons of examples of people doing: `tuple = (thing,)` because `tuple = (thing)` was functionally the same as `tuple = thing`
[14:35:42] <ronny> ncoghlan: for context - what i do is take a set of full kwargs and call a hook that implements a subset of them with them applied as positional arguments
[14:36:06] <ncoghlan> @techalchemy That's different - that's the fact that it's "," that makes a tuple literal, not parentheses
[14:36:37] <techalchemy> ronny: can't you use the normal methodcaller there?
[14:37:11] <ronny> techalchemy: hooks arent methods per se, and the nromal methodcaller doesnt do safe calls last i checked
[14:37:32] <ronny> i get a input of dict(foo=1, bar=2) and want to safely call def hook(bar): ...
[14:38:09] <ncoghlan> @ronny If you're currently using itemgetter, then the replacement would be partialmethod so the first late bound positional arg gets used as the first arg to the underlying function.
[14:38:26] <techalchemy> that's super neat
[14:38:33] <techalchemy> I think I need that too
[14:40:06] <techalchemy> ncoghlan: the number of bugs the "," literal for tuples has caused people is probably quite large, and I think it's mostly because of the large # of blog posts describing how calling the 'tuple' function or the 'list' function is inefficient or whatever
[14:41:15] <ncoghlan> "tuple(arg)" has its own ('p', 'e', 'r', 'i', 'l', 's')
[14:41:27] <techalchemy> nice
[14:41:38] <techalchemy> so the comma literal is necessary
[14:41:55] <ncoghlan> yup
[14:42:28] <techalchemy> probably the ugliest part of our codebase
[14:42:40] <techalchemy> all 200k lines of it :p
[14:42:41] <ncoghlan> The fact () is the empty tuple instead of (,) definitely doesn't help
[14:43:21] <ncoghlan> anyway, time for me to head to bed - g'night all!
[14:44:31] <techalchemy> night
[16:15:20] <sumanah> btw, folks who like to use Etherpads, I have started using https://pad.sfconservancy.org/
[16:25:37] <cooperlees> well now Brett and Steve own all our repos ... even more M$ power ...
[16:27:32] <sumanah> cooperlees: literally "M$" -- that takes me back.
[16:28:04] <cooperlees> sumanah: I emailed you link to request access to pya-committers
[16:28:06] <cooperlees> *pypa
[16:28:13] <sumanah> cooperlees: I saw! need to click that
[16:28:14] <cooperlees> Napster Bad.
[17:44:04] <Pharyngeal> Is there a way to be added to the CI system for Pipenv? I want to see the errors, but I get a 404.
[17:44:12] <Pharyngeal> I'm not getting any errors locally
[17:48:48] <sumanah> techalchemy: ^
[18:05:27] <techalchemy> only if you pay kenneth or something
[18:05:28] <techalchemy> lol
[18:05:41] <techalchemy> Pharyngeal: link me to the pr
[18:32:03] <Pharyngeal> techalchemy: It's 2281, https://github.com/pypa/pipenv/pull/2281
[18:32:45] <Pharyngeal> techalchemy: Also, as part of that PR I need to adjust the deps resolver, but it looks like resolve.py is called directly instead of used as a module
[18:32:58] <Pharyngeal> With various flags passed.
[18:33:27] <Pharyngeal> Should I add an additional command line arg to resolve.py to accomodate the mirrors?
[18:33:34] <Pharyngeal> Or will someone dislike that
[18:38:09] <techalchemy> Pharyngeal: oh that's you
[18:38:11] <techalchemy> thanks a ton for that work
[18:38:17] <techalchemy> you should update the resolve.py file directly
[18:39:19] <techalchemy> Pharyngeal: I rebuilt your failing build, anytime appveyor passes and buildkite fails you should assume it means you're fine
[18:42:36] <Pharyngeal> techalchemy: That's what I figured, I just wasn't 100% sure. Thanks! For the resolver.py, that's the plan. The issue is, it's not being used as a module, so I can't just add an extra arg to a function
[18:42:54] <Pharyngeal> It's seemingly called using python within the venv
[18:43:26] <Pharyngeal> So I'd need to pass the mirror in as a command line arg
[18:55:17] <sixninetynine> hey are there any pip maintainers about? my PR is in limbo and I'd love some input/direction (#5404)
[19:02:17] <sumanah> hi sixninetynine
[19:03:21] <sumanah> sixninetynine: dstufft may be around, and I don't see Pradyun or Paul here.
[19:03:33] <sumanah> sixninetynine: my sympathies on the limbo
[19:04:00] <sixninetynine> sokay, I don't want to come off as pesky or pushy. I know everyone's time is a limited and valuable resource :)
[19:04:16] <sumanah> :)
[19:05:30] <sumanah> sixninetynine: so I have a few suggestions for things that *might* help. I am not a pip maintainer and I may be wrong
[19:05:30] <techalchemy> Pharyngeal: should be pretty straightforward that just takes args and drops them into a function call
[19:06:11] <sixninetynine> sumanah: i'm all ears!
[19:06:12] <sumanah> sixninetynine: 1 is to look at other pip issues/PRs and see if you can answer any questions
[19:06:22] <sumanah> based on your knowledge of the code and expected behavior
[19:06:23] <Pharyngeal> techalchemy: Right. The issue is, it only expects switches right now, so I'll have to make some modifications to accept parameters
[19:06:26] <Pharyngeal> Not a big deal
[19:07:56] <sumanah> sixninetynine: and my other suggestion is: this is enough of a policy implementation decision that you could send a heads-up to https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/ and https://mail.python.org/mailman/listinfo/wheel-builders to ask for feedback
[19:09:20] <sixninetynine> thanks sumanah ! both great suggestions
[19:09:26] <sumanah> Thanks!
[19:09:35] <sumanah> sixninetynine: will you be at EuroPython in July?
[19:09:39] <sumanah> or SciPy?
[19:09:41] <Pharyngeal> techalchemy: Will anyone ever call resolver.py directly? Things will be easier if I can do --key=value rather than --key value
[19:10:02] <sixninetynine> sumanah: unfortunately no, though I believe we met (albeit briefly) at the packaging open space at PyCon
[19:10:14] <sumanah> sixninetynine: oh! hello! Sorry I don't remember your name?
[19:10:21] <sumanah> or rather, no, I do remember now!
[19:10:25] <sumanah> (thanks whois)
[19:10:28] <sixninetynine> no worries! :D
[19:13:24] <techalchemy> Pharyngeal: people do, for debugging purposes, and we call it directly in utils.py '
[19:14:25] <techalchemy> we use paramters already though, we give it a list of packages to resolve
[19:14:36] <techalchemy> (in a newline separated environment variable, it's very hacky)
[19:15:40] <Pharyngeal> techalchemy: Right. What I'm saying is, there'd have to be some additional logic to handle something that isn't a switch, yet isn't a package item
[19:15:57] <techalchemy> oh yeah for sure
[19:16:04] <techalchemy> all code requires additional logic :p
[19:16:18] <techalchemy> but i mean that code doesn't actually do any resolving
[19:16:19] <Pharyngeal> Something like pypi_mirror = sys.argv.pop(sys.argv.index('--pypi-mirror') + 1)
[19:16:35] <techalchemy> oh i see
[19:16:44] <techalchemy> yeah don't worry about that
[19:16:47] <Pharyngeal> Since there's no real argument parser here
[19:17:00] <techalchemy> if people need to debug there we can grab it from an environment variable
[19:17:06] <techalchemy> (in the actual resolver)
[19:17:43] <Pharyngeal> techalchemy: I need to add support there so all of the calls from venv_resolve_deps work
[19:18:10] <techalchemy> why?
[19:18:30] <Pharyngeal> are you suggesting I have venv_resolve_deps set its new pypi_mirror parameter as an environment variable before resolver.py is called?
[19:18:55] <techalchemy> I'm considering the alternatives, I haven't thought about the implications much
[19:19:04] <techalchemy> my 'why' is a sincere one
[19:19:12] <Pharyngeal> Instead of supplying it as a CLI to the execution of resolver.py
[19:19:16] <Pharyngeal> cli arg*
[19:19:21] <techalchemy> yeah that would be the alternative
[19:19:41] <Pharyngeal> techalchemy: any operation that calls do_lock needs to accept a pypi_mirror param
[19:19:50] <Pharyngeal> And a bunch call do_lock
[19:20:02] <techalchemy> yeah the example I'm thinking of is 'system'
[19:20:07] <techalchemy> aka 'allow_global'
[19:20:09] <Pharyngeal> The trace eventually goes from venv_resolve_deps to respover.py
[19:20:16] <Pharyngeal> resolver.py*
[19:20:32] <techalchemy> we have 'PIPENV_USE_SYSTEM'
[19:20:54] <techalchemy> which is a global I believe
[19:21:00] <techalchemy> rather than being an environment variable itself
[19:21:06] <techalchemy> it's just a global we pass around
[19:21:47] <Pharyngeal> techalchemy: That would be an option if it weren't for the execution method of resolver.py, which is not used as a module
[19:21:48] <techalchemy> then you can set it as an environment variable temporarily when you call 'venv_resolve_deps' and pick it up again
[19:21:58] <Pharyngeal> I see
[19:22:12] <techalchemy> that's kind of messy and hard to follow
[19:22:53] <techalchemy> but you can also just set the flag as an environment variable the same way we do with packages for now
[19:23:10] <techalchemy> since it saves having to build an argument parser for the file
[19:23:15] <Pharyngeal> techalchemy: I've got to find an example of that
[19:24:00] <Pharyngeal> techalchemy: Also, unrelated, maybe I'm just missing something entirely, but why the .joins here? https://ncry.pt/p/gfOn#8B5ghvMJQOURFsibrj0-4sOJKT50bRExqBrILpUMrdE
[19:24:09] <techalchemy> @Pharyngeal: https://github.com/pypa/pipenv/blob/master/pipenv/utils.py#L344
[19:24:32] <techalchemy> no idea
[19:24:37] <techalchemy> i touch that code as little as possible
[19:25:49] <sumanah> Hi pradyunsg!
[19:26:10] <pradyunsg> Hi sumanah! :)
[19:27:58] <Pharyngeal> techalchemy: thank you, that looks like it's what I am looking for.
[19:28:32] <pradyunsg> !logs
[19:28:32] <pmxbot> http://kafka.dcpython.org/channel/pypa-dev
[19:30:31] <techalchemy> Pharyngeal: also, seriously, thanks for you effort on this, it is tremendously appreciated
[19:30:39] <techalchemy> brb
[19:58:38] <pradyunsg> sumanah ping?
[19:58:49] <sumanah> Sure! hi pradyunsg
[20:04:45] <sumanah> pradyunsg: what's up?
[20:05:54] <pradyunsg> Nothing much really. Mom's much better now so, I'm sorta happy lately. :)
[20:12:30] <sumanah> I'm glad she is well, pradyunsg
[20:18:13] <pradyunsg> ^.^