[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15091 pull_request: https://github.com/python/cpython/pull/15381 ___ Python tracker ___ ___

[issue37792] xml.etree.ElementTree.Element.__eq__ does compare only objects identity

2019-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Closed since this issue contains several unrelated propositions, most of which have been rejected. If you want to add helper functions for comparing Elements (shallow and deep, with and without taking and order of attributes to account, with and without i

[issue37894] [win] shutil.which can not find the path if 'cmd' include directory path and not include extension name

2019-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to create a PR Eryk? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-b

[issue37910] argparse wrapping fails with metavar="" (no metavar)

2019-08-22 Thread paul j3
paul j3 added the comment: That usage formatting is extremely brittle. It's not just "" metavar that can mess it up. Other 'usual' characters can mess it in the same way. The underlying problem is that it formats the whole usage, and if it is too long tries to split it into pieces, and the

[issue17306] Improve the way abstract base classes are shown in help()

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is just a little more work to do on this. 1) The class level docstrings needs to display which methods are required. Sequence.__doc__ already does a good job of this but most of the other classes are missing docstrings or don't specific the needed

[issue24659] dict() built-in fails on iterators with a "keys" attribute

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This doesn't appear to have been an ongoing source of confusion. Over time, the existence of the glossary entries and the collections ABCs seems to have provided the needed clarity. -- resolution: -> out of date stage: needs patch -> resolved st

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2019-08-22 Thread Robert Smallshire
Robert Smallshire added the comment: > * no forward movement for a year and half For most of that year and a half my pull-request was sitting in Github awaiting review by two core devs, of which you Raymond, were one. I don't like to hassle peopl

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: rejected -> versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-l

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido, when you approved this did you intend for the numeric tower to be amended as well? We elected not to do so for as_integer_ratio() and the same choice should be made here (because it's hard to add methods to ABCs without breaking existing user clas

[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for enumerating the options. I think 1 and 2 are the best combination. It is a reasonable restriction to not tee across threads. If someone still does, then detecting it, raising an exception, and not crashing seem like a reasonable response. -

[issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +15092 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15382 ___ Python tracker __

[issue16468] argparse only supports iterable choices

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +newcomer friendly -patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue28988] Switch dict and set structures to PyVarObject

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Since I don't see a benefit from this change I leave both patches > to you Raymond. After more reflection, I also don't see any point of doing this. While there is a minor whiff of consistency when using Py_SIZE(), it makes the assignment look weird an

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: It seems like Windows buildbots are back to green (fixed), thanks ;-) -- nosy: +vstinner ___ Python tracker ___ __

[issue13451] sched.py: speedup cancel() method

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: I no longer think this should be done. For most applications, cancel() speed is the least important task and isn't worth adding any extra baggage to the run() loop. The current cancel() code is only slow if the length is somewhat large (atypical for a sc

[issue37528] test_tarfile: test_extractall_symlinks() fails on Windows with: [WinError 206] The filename or extension is too long

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: Hum, tests are still failing, example on AMD64 Windows8.1 Non-Debug 3.x: https://buildbot.python.org/all/#/builders/12/builds/2992 -- ___ Python tracker

[issue20727] Improved roundrobin itertools recipe

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the suggestion. I appreciate it even though I've decided to keep the current recipe. While he proposed recipe is really good at eliminating exhausted input sources, it is slower at its core task of yielding outputs (which is typically the imp

[issue37913] Document that __length_hint__ may return NotImplemented

2019-08-22 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : The special method __length_hint__ can return NotImplemented. In this case, the result is as if the __length_hint__ method didn't exist at all. This behaviour is implemented and tested but not documented. -- assignee: docs@python components: Docume

[issue37913] Document that __length_hint__ may return NotImplemented

2019-08-22 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +15093 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15383 ___ Python tracker ___ _

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +15094 pull_request: https://github.com/python/cpython/pull/15385 ___ Python tracker ___ _

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: Oh, I found an issue with regrtest and Windows processes. On Windows, when a process dies (crash or whatever), Popen.communicate() continues to hang in the parent if the died process has at least one child process which is still alive. Test attached kill_ti

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: The issue can be reproduced with regrtest: * Copy attached test_kill.py to Lib/test/ * Run: python -m test test_kill -v -j2 --timeout=5 I also applied the following changes to regrtest: diff --git a/Lib/test/libregrtest/runtest.py b/Lib/test/libregrtest/runte

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Elinaldo Monteiro
New submission from Elinaldo Monteiro : Hello, Does it make sense to exist theses 2 methods in class timedelta? @property def hours(self): return self._seconds // 3600 @property def minutes(self): return self._seconds // 60 -- messages: 350182 nosy: elinaldosoft priority: no

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue37907] speed-up PyLong_As*() for large longs

2019-08-22 Thread Ma Lin
Change by Ma Lin : -- nosy: +Ma Lin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue37915] Segfault in comparison between datetime.timezone.utc and putz.utc

2019-08-22 Thread Tom Augspurger
New submission from Tom Augspurger : The following crashes with Python 3.8b3 ``` import sys import pytz import datetime print(sys.version_info) print(pytz.__version__) print(datetime.timezone.utc == pytz.utc) ``` When run with `-X faulthandler`, I see ``` sys.version_info(major=3, minor=8, m

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +15095 pull_request: https://github.com/python/cpython/pull/15386 ___ Python tracker ___ _

[issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin)

2019-08-22 Thread Jakub Piotr Cłapa
New submission from Jakub Piotr Cłapa : On a macOS hosts the system ranlib does not understand ELF files so using the "ranlib" command causes errors during cross-compilations. The simplest way to fix it is to pass the RANLIB parameter provided to setup.py through to the distutils compiler machi

[issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin)

2019-08-22 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +15096 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15387 ___ Python tracker ___ __

[issue37907] speed-up PyLong_As*() for large longs

2019-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +15098 pull_request: https://github.com/python/cpython/pull/15388 ___ Python tracker ___ _

[issue37915] Segfault in comparison between datetime.timezone.utc and putz.utc

2019-08-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am adding 3.8 regression since the code works with 3.7 though it involves pytz. -- keywords: +3.8regression nosy: +belopolsky, p-ganssle, xtreak ___ Python tracker

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- title: Segfault in comparison between datetime.timezone.utc and putz.utc -> Segfault in comparison between datetime.timezone.utc and pytz.utc ___ Python tracker __

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was already proposed several times before. The problem is that what do you expect to get from timedelta(hours=24).hours? The idiomatic way to convert a timedelta object to a number of hours is: td = timedelta(...) number_of_hours = td // timedelta(hours

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Elinaldo Monteiro
Elinaldo Monteiro added the comment: Imagine the following scenario. from datetime import timedelta diff = timedelta(hours=23, minutes=59) - timedelta(hours=20, minutes=45) Which is the simplest ? diff.hours diff.total_seconds() // 3600 -- ___ P

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems this is due to issue37685 (dde944f9df) on bisecting datetime related changes. Adding Serhiy. I guess this could be marked as release blocker. Here is a simplified reproducer on extracting pytz.utc source [0] which is an object of simple subcla

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2019-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: It should not go on the numeric tower. -- --Guido (mobile) -- ___ Python tracker ___ ___ Pytho

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-22 Thread Eryk Sun
Eryk Sun added the comment: > It seems like self.stdout.read() hangs even after the child process > has been killed. This is an issue when the standard handles are inherited or duplicated to a grandchild process, and so on. In the case of Popen(sys.executable), the system is duplicating the

[issue37884] Optimize Fraction() and statistics.mean()

2019-08-22 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: May I propose PR 15327 as alternative? It solves some of the same issues as the PR on this issue, in particular supporting arbitrary objects with as_integer_ratio(). It also improves performance somewhat for certain inputs, but that's more by accident.

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-22 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +15099 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15389 ___ Python tracker ___ __

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +15100 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15390 ___ Python tracker __

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-22 Thread Steve Dower
Steve Dower added the comment: Thanks Zackery for the patch! > The problem is just console pseudohandles in Windows 7 and earlier. Should we add a version check as well [1]? I'm not totally comfortable with bitmasking a handle here, but if we only do this additional check on Win7 then I'm o

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Tom Augspurger
Tom Augspurger added the comment: Thanks for debugging this Karthikeyan and for the quick fix Pablo! -- ___ Python tracker ___ ___

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is due to an incorrect type check in the timezone_richcompare, it should be a comparison against PyDateTime_TimeZoneType not against PyDateTime_TZInfoType. The segfault is due to an invalid casting to PyDateTime_TimeZoneType (the child) from the

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks, Tom and Karthikeyan for the finding and the debugging :) -- ___ Python tracker ___ ___

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset a38e9d139929a227e3899fbb638bc46c6cc6d8ba by Pablo Galindo (Sergey Fedoseev) in branch 'master': bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388) https://github.com/python/cpython/commit/a38e9d139929a22

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15101 pull_request: https://github.com/python/cpython/pull/15392 ___ Python tracker ___ __

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15102 pull_request: https://github.com/python/cpython/pull/15393 ___ Python tracker ___ __

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Michael Anckaert
Michael Anckaert added the comment: I would support this addition. The timedelta class already has accessors for days and seconds, why not for hours and minutes? The implementation should make use of the idiomatic way as Serhiy mentioned. >>> timedelta(hours=25).seconds // 3600 1 Is wro

[issue17306] Improve the way abstract base classes are shown in help()

2019-08-22 Thread Michael Anckaert
Michael Anckaert added the comment: I would be very interested and motivated to work on this. I'll start by taking a look at the pointers Raymond gave. If anyone can chime in with some more information / guidance that would be awesome. -- nosy: +michaelanckaert _

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Paul Ganssle
Paul Ganssle added the comment: > I would support this addition. The timedelta class already has accessors for > days and seconds, why not for hours and minutes? The `timedelta.days` and `timedelta.seconds` accessors do not do what is being requested here. The component accessors just give

[issue37917] Warning regarding collections ABCs still present in 3.9

2019-08-22 Thread Michael Anckaert
New submission from Michael Anckaert : When importing an ABC from the collections module in Python 3.9 there is a warning that this is deprecated since Python 3.3 and will stop working in Python 3.9. Should this warning be removed and lead to an ImportError? Python 3.9.0a0 (heads/master:a3

[issue37914] class timedelta, support the method hours and minutes in field accessors

2019-08-22 Thread Michael Anckaert
Michael Anckaert added the comment: Thank you for the clarification Paul. It makes sense to me now to not include those accessors. On Thu, 22 Aug 2019 at 17:46, Paul Ganssle wrote: > > Paul Ganssle added the comment: > > > I would support this addition. The timedelta class already has acces

[issue37918] What about an enum for open() modes?

2019-08-22 Thread Marco Sulla
New submission from Marco Sulla : As title. I just created it: https://pastebin.com/pNYezw2V I think it could be useful to have a more descriptive way to declare a file open mode. Many languages has an enum for this. Maybe open(), os.fdopen(), os.popen() and pathlib.Path.open() can just acce

[issue37917] Warning regarding collections ABCs still present in 3.9

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: It's a work-in-progress: see bpo-37324. -- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> collections: remove deprecated aliases to ABC classes ___ Python tracke

[issue37917] Warning regarding collections ABCs still present in 3.9

2019-08-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Please see discussion at issue36953 and issue37324. It's currently blocked by Jinja that doesn't have a release with the fix to be used in CI. -- nosy: +xtreak ___ Python tracker

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 2878f378e02990303a8fe4bedd5386bd90efc26d by Miss Islington (bot) in branch '3.8': bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388) https://github.com/python/cpython/commit/2878f378e02990303a8fe4bedd5386bd90ef

[issue27961] remove support for platforms without "long long"

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset d0da97de65985ea4fc69cade2343d931f8b9efcd by Miss Islington (bot) in branch '3.7': bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388) https://github.com/python/cpython/commit/d0da97de65985ea4fc69cade2343d931f8b9

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 4109263a7edce11194e301138cf66fa2d07f7ce4 by Raymond Hettinger in branch 'master': bpo-14050: Note that not all data can be sorted (GH-15381) https://github.com/python/cpython/commit/4109263a7edce11194e301138cf66fa2d07f7ce4 -- _

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15103 pull_request: https://github.com/python/cpython/pull/15395 ___ Python tracker ___ __

[issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset d0cdeaab76fef8a6e5a04665df226b6659111e4e by Raymond Hettinger in branch 'master': bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382) https://github.com/python/cpython/commit/d0cdeaab76fef8a6e5a04665df226b6659111e4e ---

[issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread George Zhang
George Zhang added the comment: I renamed mousescroll to handlescroll as it's an independent callback function and I think it fits its use case better. I can keep it as mousescroll if you like though. The handlescroll function is now a standalone module function in tree.py and the EditorWi

[issue28556] typing.py upgrades

2019-08-22 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +15104 pull_request: https://github.com/python/cpython/pull/15396 ___ Python tracker ___ _

[issue23987] docs about containers membership testing wrong for broken objects

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like the identity-implies-equality part of this has already been taken care of. The __hash__ invariant also appears to now have extensive coverage, some in the glossary and much more in the data model section of the reference. Cute puzzles lik

[issue24413] Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) returns NotImplemented, but {}.keys().__or__(x) raises TypeError

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If this is only a theoretical problem, might it make sense > to just leave it as is? I'm fine with that. In the last four years, I'm the only one who ever noticed, so it doesn't appear to be a problem in practice. -- resolution: -> wont fix s

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset cb8de91dadf15925fb95069cb190398e1d485f56 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-14050: Note that not all data can be sorted (GH-15381) (GH-15395) https://github.com/python/cpython/commit/cb8de91dadf15925fb95069cb1903

[issue14050] Tutorial, list.sort() and items comparability

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37919] nntplib throws spurious NNTPProtocolError

2019-08-22 Thread Mark Sapiro
New submission from Mark Sapiro : This is really due to an nntp server bug, but here's the scenerio. A connection is opened to the server. An article is posted via the connection's post() method. The server responds to the article data with 240 Article posted but due to the server bug, if

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +15105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15397 ___ Python tracker __

[issue28556] typing.py upgrades

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 8889627b53e1eea2e32590f1867fbb0b0fc7407f by Miss Islington (bot) (Ivan Levkivskyi) in branch 'master': bpo-28556: Add a regression test to typing (GH-15396) https://github.com/python/cpython/commit/8889627b53e1eea2e32590f1867fbb0b0fc7407f

[issue37918] What about an enum for open() modes?

2019-08-22 Thread Brett Cannon
Change by Brett Cannon : -- priority: normal -> low type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread George Zhang
George Zhang added the comment: Also, how should I get the new code coverage percentage (or should it be ignored for now)? I'm thinking of adding a few more tests that send invalid events which would raise KeyError but I don't think that this behaviour will be used (and it's not documente

[issue37890] Modernize several tests in test_importlib

2019-08-22 Thread Brett Cannon
Brett Cannon added the comment: I would just read through the other tests files under test_importlib to see how other tests were done. -- ___ Python tracker ___ _

[issue37660] Drop support for Aspen magic directories in venv's activate scripts

2019-08-22 Thread Brett Cannon
Brett Cannon added the comment: Fixed by issue37663. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37663] Making venv activation script prompts consistent

2019-08-22 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37661] venv activation scripts erroneously check if __VENV_PROMPT__ is defined

2019-08-22 Thread Brett Cannon
Brett Cannon added the comment: Fixed by issue37663. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue28556] typing.py upgrades

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15106 pull_request: https://github.com/python/cpython/pull/15398 ___ Python tracker ___ __

[issue28556] typing.py upgrades

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 5fda09cc1ebcb364a660bc5a831ef8f6463d810b by Miss Islington (bot) in branch '3.8': bpo-28556: Add a regression test to typing (GH-15396) https://github.com/python/cpython/commit/5fda09cc1ebcb364a660bc5a831ef8f6463d810b -- _

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Cameron Trando
New submission from Cameron Trando : Currently os.PathLike[str] causes a runtime error; however, typeshed sees it as valid and mypy does not throw any errors on it. mypy treats it as os.PathLike[AnyStr] I already filed a bug on typeshed, see https://github.com/python/typeshed/issues/3202

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'mousescroll' was not exact because the mouse is also used to scroll with the scrollbar. 'handlescroll' is worse. 'wheelscroll' seems awkward. 'scrollwheel' (scroll with the mouse wheel) is specific. At least in idlelib, event handlers are routinely calle

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Don't worry more about tests until I look at what you have done already. -- ___ Python tracker ___ __

[issue35654] Remove 'guarantee' that sorting only relies on __lt__ from sorting howto

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Well, if this is indeed by design (and I missed the > list.sort() reference) then I agree the HOWTO should not be changed It is in fact by design :-) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue34302] Avoid inefficient way to find start point in deque.index

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like deque.index() now has a fast searcher. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lukasz.langa priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-

[issue11846] Remove non-guaranteed implementation details from docs.

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: The current wording seems to have sufficed for users of the C API. Also, it is an implementation detail subject to change. Discussions on being able to mutate anything in C are covered in the ctypes module. -- resolution: accepted -> not a bug s

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15107 pull_request: https://github.com/python/cpython/pull/15399 ___ Python tracker ___ __

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread miss-islington
miss-islington added the comment: New changeset 4be11c009abe88175fa164b45e4838e7267dfa97 by Miss Islington (bot) (Pablo Galindo) in branch 'master': bpo-37915: Fix comparison between tzinfo objects and timezone objects (GH-15390) https://github.com/python/cpython/commit/4be11c009abe88175fa164

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: Making an existing stdlib class generic has to be considered carefully, otherwise it may break backward compatibility. As I wrote in the typeshed issue, I actually think the status quo is fine. But I'd like to hear you out about how it causes problems in V

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: There is an (old) similar proposal https://github.com/python/typing/issues/402 btw. Taking into account that this can be made only in 3.9, what is the benefit over ``from __future__ import annotations`` (that one can use already) do you see? IMO there are

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Cameron Trando
Cameron Trando added the comment: What happened is that we have a hard time analyzing PathLike because in the pathlib stub they use PathLike[str], so when we try to analyze Path which inherits from PathLike[str], because PathLike is not generic, then we think it's an instance of an object an

[issue37921] Improve zipfile: add support for symlinks

2019-08-22 Thread Pierre-Jean Grenier
New submission from Pierre-Jean Grenier : The module tarfile contains some methods for knowing whether an archive member is a regular file/a directory/a symlink. Apart from an "is_dir()" method, there was nothing alike in the zipfile module. For an on-going project, I needed to know whether a

[issue37921] Improve zipfile: add support for symlinks

2019-08-22 Thread Pierre-Jean Grenier
Change by Pierre-Jean Grenier : -- keywords: +patch pull_requests: +15108 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15401 ___ Python tracker

[issue37920] Support subscripting os.PathLike and make it valid at runtime

2019-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds like you are mixing up analyzing .pyi and .py files. Anyway, let's not do this. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: > This is an issue when the standard handles are inherited or duplicated to a > grandchild process, and so on. In the case of Popen(sys.executable), the > system is duplicating the standard handles implicitly because sys.executable > is a console process (as

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 657008ea0336ff4f275ed3f0c2b6dd2e52de2bba by Raymond Hettinger in branch 'master': bpo-30550: Clarify JSON ordering guarantees (GH-15397) https://github.com/python/cpython/commit/657008ea0336ff4f275ed3f0c2b6dd2e52de2bba -- _

[issue30550] Document order-preserving dictionary output in json

2019-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +15110 pull_request: https://github.com/python/cpython/pull/15403 ___ Python tracker ___ __

[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)

2019-08-22 Thread Leonard Truong
New submission from Leonard Truong : Here's a case where `inspect.getsource` returns the wrong class definition when a file contains multiple class definitions with the same name. This pattern is valid runtime behavior when the class definitions are inside different scopes (e.g. a factory patt

[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)

2019-08-22 Thread Leonard Truong
Leonard Truong added the comment: Turns out this is a documented issue in the source code: https://github.com/python/cpython/blob/3.7/Lib/inspect.py#L794-L796 -- ___ Python tracker _

  1   2   >