You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
max() over itertools.ifilter() is broken in 0.18.0 #510
This affects older versions of keyring library using similar code to select keychain backend where it wants max priority backend but returns the wrong one.
Also it looks like it depends on the order of the list.
I think I'm running into a related issue. The new min and new max function consume the first item of an iterator before passing to the underlying min and max functions. I'll take a stab at a PR if I get time tonight.
Activity
[-]max() over ifilter() is broken in 0.18.0[/-][+]max() over itertools.ifilter() is broken in 0.18.0[/+]jmadler commentedon Oct 17, 2019
Can you submit a bugfix please? I'll include it in a release in the next few days.
xeron commentedon Oct 17, 2019
Sorry, I have no idea how to fix this. We've just downgraded to
0.17.1for now.gazpachoking commentedon Oct 17, 2019
I think I'm running into a related issue. The new min and new max function consume the first item of an iterator before passing to the underlying min and max functions. I'll take a stab at a PR if I get time tonight.
Fix behavior of new min/max with generators. fix PythonCharmers#510
megies commentedon Oct 21, 2019
I'm running into problems with with min/max of generators as well. Can't tell what the above code is doing, but it sounds related.
For me specifically, the problem seems to be
min()ormax()over a generator with only a single item in it. Here is a minimal example:I bisected this and it starts failing on master with commit f141395.
I checked current state of #514 and can confirm that it fixes this issue. Thanks @gazpachoking
jmadler commentedon Oct 24, 2019
Thanks megies for the confirmation!
Thanks all for helping make this software better :)
xeron commentedon Oct 24, 2019
Fix has not been merged yet, right?
megies commentedon Oct 25, 2019
It's been merged now :)