[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

[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:

[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

[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 ___

[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 ___

[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:

[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

[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

[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

[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 ___

[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

[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

[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

[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.

[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

[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 ___ ___

[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

[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

[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

[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

[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 ___ ___

[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

[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 ___

[issue37482] Email address display name fails with both encoded words and special chars

2019-08-22 Thread B Siemerink
Change by B Siemerink : -- pull_requests: +15090 pull_request: https://github.com/python/cpython/pull/15380 ___ Python tracker ___

[issue37074] os.stat() does not work for NUL and CON

2019-08-22 Thread Eryk Sun
Eryk Sun added the comment: > Where it was fixed? It was addressed in issue 37834. PR 15231 includes a rewrite of win32_xstat_impl. The file type was needed, so the rewrite could also address the problem of character devices such as CON and NUL. --

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

2019-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I tried to solve this issue myself, and figured out that it is not so simple. It is possible to make tee() nor crashing, but it is not possible to guarantee the order of the output without using a lock in tee(). It you can get a sequence 1, 2, 4, 3, ...

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

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this as closed: * no forward movement for a year and half * opposition from multiple core devs Feel free to revive this if you truly think this is needed and want to get the debate going again. Also, expanding the numeric tower is always going

[issue32471] Add an UML class diagram to the collections.abc module documentation

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: See the rationale in the closed PR. I rather liked this idea but it didn't prove to be a net win during user testing. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: We should consider dedicated syntax for compile-time dedenting: d"""\ This would be left aligned but this would only have four spaces And this would be left-justified. """ # Am not sure what to do about this last

[issue37754] Persistence of Shared Memory Segment after process exits

2019-08-22 Thread Eryk Sun
Eryk Sun added the comment: > register the shared the shared_memory only when it's created and > not when it's attached. In Windows, the section object is reference counted. I haven't looked into the Unix implementation, but maybe it could use advisory locking. After opening shared memory

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

2019-08-22 Thread Marco Sulla
Marco Sulla added the comment: @rhettinger: "Deprecating [...] just cause disruption to existing, deployed code" How? Deprecating is used just to maintain intact the already existing code... "Please do not go down of the path of making yourself the arbiter of what is Pythonic or standard.

<    1   2