[issue12849] Cannot override 'connection: close' in urllib2 headers

2020-03-09 Thread henrik242
henrik242 added the comment: Correction: My problem in Issue 39875 was not related to Connection: Close, but with weird POST handling in Solr. -- ___ Python tracker ___ _

[issue27115] IDLE goto should use query.Query subclass

2020-03-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +18229 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/18871 ___ Python tracker ___ ___

[issue39909] Assignment expression in assert causes SyntaxError

2020-03-09 Thread Михаил Кыштымов
New submission from Михаил Кыштымов : Assignment expression in assert causes SyntaxError Minimal case: ``` assert var := None ``` Error: ``` File "", line 1 assert var := None ^ SyntaxError: invalid syntax ``` Workaround: ``` assert (var := None) ``` My use case: ``` my_d

[issue39909] Assignment expression in assert causes SyntaxError

2020-03-09 Thread Eric V. Smith
Eric V. Smith added the comment: I believe this is by design, as is the same restriction on statement-level assignment expressions. And if requiring parens discourages the use of assignment expressions in asserts, I think that's a good thing. Why not just use the workaround you've already id

[issue39909] Assignment expression in assert causes SyntaxError

2020-03-09 Thread Михаил Кыштымов
Михаил Кыштымов added the comment: if this is by design i'm fine with somebody closing this issue. i've not found mention of such case in pep so i though it's not by design. docs say `assert` just takes "expression" and "assignment expression" has "expression" in it's name. https://docs.python

[issue39909] Assignment expression in assert causes SyntaxError

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > assert var := None It's good that this syntax is rejected: it looks like a typo (assert var == None). Moreover, it's part of of the PEP 572 design. https://www.python.org/dev/peps/pep-0572/#exceptional-cases Python works as expected, I suggest to close the

[issue39909] Assignment expression in assert causes SyntaxError

2020-03-09 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this, since I can't imagine this restriction being relaxed. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue39909] Assignment expression in assert causes SyntaxError

2020-03-09 Thread Михаил Кыштымов
Михаил Кыштымов added the comment: ok -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: Antoine: "I agree with Serhiy. If you hit a rare situation that you don't want to handle, use Py_FatalError(), not Py_UNREACHABLE()." Py_UNREACHABLE() documentation still says "Use this when you have a code path that you do not expect to be reached." and "U

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: The GCC documentation contains a good example: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html """ Another use for __builtin_unreachable is following a call a function that never returns but that is not declared __attribute__((noreturn)), as in this ex

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: """ Use this when you have a code path that cannot be reached by design. For example, in the default: clause in a switch statement for which all possible values are covered in case statements. Use this in places where you might be tempted to put an assert(0)

[issue14126] Speed up list comprehensions by preallocating the list where possible

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > Isn't this the same as https://bugs.python.org/issue36551 ? Yes. -- ___ Python tracker ___ ___

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > So it isn't valid to skip calling the cleanup functions just because md_state > is NULL - we have no idea what Py_mod_create might have done that needs to be > cleaned up. In your example, I don't see what m_clear/m_free would be supposed to clear/free.

[issue39905] Cannot load sub package having a 3-dot relative import

2020-03-09 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2020-03-09 Thread Владимир Мартьянов
Владимир Мартьянов added the comment: I have Python 3.7.4 and have the same exception: print (socket.gethostbyaddr("127.0.0.1")) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 6: invalid continuation byte My OS is Win7 and my computer name contains cyrillic characters. -

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18230 pull_request: https://github.com/python/cpython/pull/18872 ___ Python tracker ___ __

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2020-03-09 Thread Steve Dower
Steve Dower added the comment: Looks like what was actually applied was changed to PyUnicode_DecodeFSDefault, which was later changed on Windows to be always UTF-8. They'll need to be normalised throughout Modules/socketmodule.c (I can't tell at a quick glance which need updating). We should

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > AttributeError: module 'subprocess' has no attribute 'check_output' I wrote PR 18872 to implement it for setup.py. Michael Felt: Can you please test it on AIX? -- ___ Python tracker

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2020-03-09 Thread Steve Dower
Steve Dower added the comment: If someone wants to do the extra work to use the native Windows socket functions on Windows instead of the POSIX-ey wrappers, that should happen under a new issue. This bug is for a regression that we ought to fix back as far as we can. -- priority: no

[issue23592] SIGSEGV on interpreter shutdown, with daemon threads running wild

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: I believe that this issue cannot occur in Python 3.8 thanks for bpo-36475. According to the backtrace, a thread does crash in PyEval_EvalFrameEx(). I understand that it's a daemon thread. To execute PyEval_EvalFrameEx(), a daemon thread must hold the GIL. Wi

[issue36475] PyEval_AcquireLock() and PyEval_AcquireThread() do not handle runtime finalization properly.

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-23592 as duplicate of this issue. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue30519] [threading] Add daemon argument to Timer

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: Daemon threads are very fragile by design. I would prefer to not promote their usage. See for example bpo-39877 for a recent example. I would prefer to remove support for daemon threads, rather than adding more daemon threads! I reject the issue. Moreover,

[issue26037] Crash when reading sys.stdin.buffer in a daemon thread

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: The problem is that Py_FinalizeEx() tries to close the sys.stdin object in _PyImport_Cleanup(), but closing the buffered object requires the object lock which is hold by _thread(). _thread() is blocked on waiting for a newline character. I suggest to use no

[issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > I'm reducing the severity from release blocker to high and keep the ticket in > pending to give Eric a change to review the commits. Python 3.8.0 is released with the fix. It's now time to close the issue. -- stage: commit review -> resolved status

[issue39910] os.ftruncate on Windows should be sparse

2020-03-09 Thread Mingye Wang
New submission from Mingye Wang : Consider this interaction: cmd> echo > 1.txt cmd> python -c "__import__('os').truncate('1.txt', 1024 ** 3)" cmd> fsutil sparse queryFlag 1.txt Not only takes a long time as is typical for a zero-write, but also reports non-sparse as an actual write would sugg

[issue13077] Windows: Unclear behavior of daemon threads on main thread exit

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: I can only reproduce the behavior (other thread continues to run after CTRL+C) on Windows, not on Linux. -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, vstinner, zach.ware title: Unclear behavior of daemon threads on main thread e

[issue38691] importlib: PYTHONCASEOK should be ignored when using python3 -E

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset fc72ab6913f2b5337ae7fda711f2de846d38f479 by idomic in branch 'master': bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627) https://github.com/python/cpython/commit/fc72ab6913f2b5337ae7fda711f2de846d38f479 -- ___

[issue38691] importlib: PYTHONCASEOK should be ignored when using python3 -E

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This optimisation was also hinted at https://bugs.python.org/issue26032#msg257653 -- nosy: +pitrou, serhiy.storchaka, xtreak ___ Python tracker __

[issue39659] pathlib calls `os.getcwd()` without using accessor

2020-03-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue39906] pathlib.Path: add `follow_symlinks` argument to `stat()` and `chmod()`

2020-03-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue39893] Add set_terminate() to logging

2020-03-09 Thread wyz23x2
Change by wyz23x2 : -- versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18231 pull_request: https://github.com/python/cpython/pull/18873 ___ Python tracker ___ __

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not so easy. There was reason why it was not done earlier. scandir() wastes more limited resource than memory -- file descriptors. It should also be properly closed and do not depend on the garbage collector. Consider the example: def traverse(path,

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > So I changed 'pthread_cond_timedwait' to 'take_gil' and this didn't seem to > have an effect on the unit test. Maybe you forgot to run "make" to copy Tools/gdb/libpython.py as python-gdb.py. Anyway, I wrote PR 18873 and I tested manually that it does fix t

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18232 pull_request: https://github.com/python/cpython/pull/18874 ___ Python tracker _

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 88944a44aa84b0f3674939019b1befbc7a9dc874 by Serhiy Storchaka in branch 'master': bpo-39903: Fix double decref in _elementtree.Element.__getstate__ (GH-18850) https://github.com/python/cpython/commit/88944a44aa84b0f3674939019b1befbc7a9dc874 -

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +18233 pull_request: https://github.com/python/cpython/pull/18875 ___ Python tracker ___ __

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-09 Thread miss-islington
miss-islington added the comment: New changeset 80be9c344f9fa619c24712c699b70126fc202315 by Miss Islington (bot) in branch '3.7': bpo-39903: Fix double decref in _elementtree.Element.__getstate__ (GH-18850) https://github.com/python/cpython/commit/80be9c344f9fa619c24712c699b70126fc202315 --

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-09 Thread miss-islington
miss-islington added the comment: New changeset 97bbdb28b4ab9519780f924e3267ac70af1cd5b8 by Miss Islington (bot) in branch '3.8': bpo-39903: Fix double decref in _elementtree.Element.__getstate__ (GH-18850) https://github.com/python/cpython/commit/97bbdb28b4ab9519780f924e3267ac70af1cd5b8 --

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39822] Use NULL instead of None for empty attrib in C implementation of Element

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e by Serhiy Storchaka in branch 'master': bpo-39822: Use NULL instead of None for empty attrib in Element. (GH-18735) https://github.com/python/cpython/commit/dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e --

[issue39822] Use NULL instead of None for empty attrib in C implementation of Element

2020-03-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39893] Add set_terminate() to logging

2020-03-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- title: Problems with /usr/lib64 builds. -> Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE ___ Python tracker ___ _

[issue1294959] Problems with /usr/lib64 builds.

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: lib64_tests-2.py: Updated test for PR 18381. It now uses sys.platlibdir and it tests also Makefile LIBPL variable. -- Added file: https://bugs.python.org/file48962/lib64_tests-2.py ___ Python tracker

[issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue39911] "AMD64 Windows7 SP1 3.x" buildbot doesn't build anymore

2020-03-09 Thread STINNER Victor
New submission from STINNER Victor : "AMD64 Windows7 SP1 3.x" buildbot worker fails to build Python. It should either be fixed, or the worker should be removed. -- components: Build, Tests messages: 363729 nosy: pablogsal, steve.dower, vstinner priority: normal severity: normal status:

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6012f30beff7fa8396718dfb198ccafc333c565b by Pablo Galindo in branch 'master': bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) https://github.com/python/cpython/commit/6012f30beff7fa8396718dfb198ccafc333c565b --

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +18234 pull_request: https://github.com/python/cpython/pull/18876 ___ Python tracker ___ ___

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +18235 pull_request: https://github.com/python/cpython/pull/18877 ___ Python tracker ___ ___

[issue39893] Add set_terminate() to logging

2020-03-09 Thread Vinay Sajip
Vinay Sajip added the comment: There's no need for a method to do this. You can do any of: 1. Set the terminator attribute to whatever you need in logging.StreamHandler (if all code you ever use must use a different terminator). 2. Set it in individual instances of StreamHandler. 3. Set it

[issue39912] warnings.py should not raise AssertionError when validating arguments

2020-03-09 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Currently simplefilter() and filterwarnings() don't validate their arguments when using -O and AssertionError is not the most appropriate exception to raise. I will post a PR shortly. -- components: Library (Lib) messages: 363732 nosy: remi.lapeyre pr

[issue39912] warnings.py should not raise AssertionError when validating arguments

2020-03-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +18236 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18878 ___ Python tracker ___

[issue39321] AMD64 FreeBSD Non-Debug 3.x: main regrtest process killed by SIGKILL (Signal 9)

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > If it fails again in the same manner, please re-open The issue is back. Two examples. -- Today: https://buildbot.python.org/all/#/builders/214/builds/405 (...) 0:15:40 load avg: 3.11 [366/420] test_pickletools passed -- running: test_multiprocessing_fork

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Barney Gale
Barney Gale added the comment: Ah, right you are! The globbing helpers call `list(os.scandir(...))` - perhaps we should do the same here? -- ___ Python tracker ___ __

[issue39913] Document warnings.WarningMessage ?

2020-03-09 Thread daniel hahler
New submission from daniel hahler : I've noticed that `warnings.WarningMessage` is not documented, i.e. it does not show up in the intersphinx object list. I'm not sure how to document it best, but maybe just describing its attributes? Ref: https://github.com/blueyed/cpython/blob/598d29c51c7

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be slower and less reliable implementation of os.listdir(). -- ___ Python tracker ___

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 2235e04170503673471d5ec2e7c693cdadcbdc65 by Pablo Galindo in branch '3.7': [3.7] bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) (GH-18877) https://github.com/python/cpython/commit/2235e04170503673471d5ec2e7c693

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 3ede1bc794a575a73c6cc74addb5586f4e33a1f5 by Pablo Galindo in branch '3.8': [3.8] bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) (GH-18876) https://github.com/python/cpython/commit/3ede1bc794a575a73c6cc74addb558

[issue39913] Document warnings.WarningMessage ?

2020-03-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: warnings.WarningMessage was added in https://bugs.python.org/issue26568 at the same time than _showwarnmsg_impl() and _formatwarnmsg_impl(). The goal was to have public functions that took them instead of multiple arguments so it could be easily extended in the

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-09 Thread Guido van Rossum
Guido van Rossum added the comment: I guess it's similar to the 'return' vs. 'returns' issue, but I feel much stronger about it here. I would have written that as "make the spam module more spammy". Just read a bunch of commits using e.g. `git log --oneline` to see what the prevailing style is

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Barney Gale
Barney Gale added the comment: Less reliable how? Doesn't appear any slower: barney.gale@heilbron:~$ python3 -m timeit -s "import os; os.listdir('/usr/local')" 1 loops, best of 3: 0.0108 usec per loop barney.gale@heilbron:~$ python3 -m timeit -s "import os; list(os.scandir('/usr/loca

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is not how timeit works, you just measured the time taken by an empty loop, you can look at `python3 -m timeit -h` to get help how to call it. I think a correct invocation would be: (venv) ➜ ~ python3 -m timeit -s 'from os import scandir' "list(scandir('

[issue35775] Add a general selection function to statistics

2020-03-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-03-09 Thread Julin
Julin added the comment: Can't this be implemented? This is something that a user would expect. Intuitive. And it looks as if it is an easy change to make that doesn't disturb anything else. -- nosy: +ju-sh ___ Python tracker

[issue39914] logging.config: '.' (dot) as a key is not documented

2020-03-09 Thread Yuta Okamoto
New submission from Yuta Okamoto : I noticed that Configurators in logging.config module accepts '.' (dot) as a key to fill attributes for filters, formatters, and handlers directly like the following: handlers: syslog: class: logging.handlers.SysLogHandler .:

[issue39914] logging.config: '.' (dot) as a key is not documented

2020-03-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue39829] __len__ called twice in the list() constructor

2020-03-09 Thread Eric Snow
Eric Snow added the comment: FWIW, I encouraged Kim to file this. Thanks Kim! While it isn't part of any specification, it is an unexpected change in behavior that led to some test failures. So I figured it would be worth bringing up. :) I did find it surprising that we were not caching t

[issue39829] __len__ called twice in the list() constructor

2020-03-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks Kim and Eric! I think it still makes sense to do some quick benchmarking and research on passing down the calculated length. I can try to produce a draft PR so we can discuss with something more tangible. -- __

[issue39829] __len__ called twice in the list() constructor

2020-03-09 Thread Eric Snow
Eric Snow added the comment: I'm not opposed. :) I just don't want to impose on your time. -- assignee: -> pablogsal resolution: not a bug -> stage: resolved -> status: closed -> open ___ Python tracker

[issue39915] AsyncMock doesn't work with asyncio.gather

2020-03-09 Thread Mads Sejersen
New submission from Mads Sejersen : When calling asyncio.gather the await_args_list is not correct. In the attached minimal example it contains only the latest call and not each of the three actual calls. Expected output: [call(0), call(1), call(2)] [call(1), call(2), call(3)] # or any permu

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-09 Thread Michael Felt
Michael Felt added the comment: Almost. The command is run, but not enough of the bootstrap is finished - it seems. File "/data/prj/python/git/python3-3.9/Lib/_aix_support.py", line 54, in _aix_bosmp64 out = out.decode("utf-8").strip().split(":") # type: ignore AttributeError: 'str' o

[issue39916] More reliable use of scandir in Path.glob()

2020-03-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Path.glob() uses os.scandir() in the following code. entries = list(scandir(parent_path)) It properly closes the internal file descriptor opened by scandir() if success because it is automatically closed closed when the iterator is exhausted. But if

[issue39916] More reliable use of scandir in Path.glob()

2020-03-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +18237 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18880 ___ Python tracker ___

[issue39911] "AMD64 Windows7 SP1 3.x" buildbot doesn't build anymore

2020-03-09 Thread Jeremy Kloth
Jeremy Kloth added the comment: Well, it only doesn't build on 3.9+ (master) due to not being supported going forward. The *buildmaster* needs to be fixed to stop submitting those jobs to unsupported platforms. We need to continue testing 3.7 and 3.8 on Win7 until they go EOL to ensure tha

[issue39911] "AMD64 Windows7 SP1 3.x" buildbot doesn't build anymore

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: Ah, "x86 Windows7 3.x" worker has the same issue: https://buildbot.python.org/all/#/builders/150/builds/434 -- ___ Python tracker ___ __

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Less reliable how? See issue39916. > so it looks like scandir as a small overhead when accumulating all results > and not using the extra info it returns. Try with larger directories. The difference may be not so small. $ python3 -m timeit -s 'from os

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: > AttributeError: 'str' object has no attribute 'decode' Oops, it should now be fixed by my second commit. Please retry PR 18872. -- ___ Python tracker

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2020-03-09 Thread Guido van Rossum
Change by Guido van Rossum : -- versions: -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2020-03-09 Thread Guido van Rossum
Guido van Rossum added the comment: If we introduce a PEG-based parser, we can do this without hacking the tokenizer. See https://github.com/gvanrossum/pegen/issues/229 I'd propose to aim for Python 3.10 (if the PEG parser happens). -- nosy: +gvanrossum _

[issue39915] AsyncMock doesn't work with asyncio.gather

2020-03-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +lisroach, xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue34822] Simplify AST for slices

2020-03-09 Thread Guido van Rossum
Guido van Rossum added the comment: I'm going to review the actual code next. Regarding the omission of parentheses in various contexts, I am all for that, but I consider it a separate issue (as it only pertains to ast.unparse()). The fix in https://github.com/python/cpython/pull/17892 shoul

[issue39904] Move handling of one-argument call of type() from type.__new__() to type.__call__()

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 413f01352a8268fb62bb47bde965462d7b82a06a by Serhiy Storchaka in branch 'master': bpo-39904: Move handling of one-argument call of type() from type.__new__() to type.__call__(). (GH-18852) https://github.com/python/cpython/commit/413f01352a826

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e5ccc94bbb153431698b2391df625e8d47a93276 by Serhiy Storchaka in branch 'master': bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863) https://github.com/python/cpython/commit/e5ccc94bbb

[issue39904] Move handling of one-argument call of type() from type.__new__() to type.__call__()

2020-03-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6d0ee60740f2862a878f009671b1aaa75aeb0c2a by Victor Stinner in branch 'master': bpo-36184: Port python-gdb.py to FreeBSD (GH-18873) https://github.com/python/cpython/commit/6d0ee60740f2862a878f009671b1aaa75aeb0c2a -- __

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18238 pull_request: https://github.com/python/cpython/pull/18881 ___ Python tracker _

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +18239 pull_request: https://github.com/python/cpython/pull/18882 ___ Python tracker ___ __

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2020-03-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2020-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eebaa9bfc593d5a46b293c1abd929fbfbfd28199 by Serhiy Storchaka in branch 'master': bpo-38249: Expand Py_UNREACHABLE() to __builtin_unreachable() in the release mode. (GH-16329) https://github.com/python/cpython/commit/eebaa9bfc593d5a46b293c1abd

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread miss-islington
miss-islington added the comment: New changeset 5854d451cb35ac38bc07b95afeb077e8a35d5c7d by Miss Islington (bot) in branch '3.8': bpo-36184: Port python-gdb.py to FreeBSD (GH-18873) https://github.com/python/cpython/commit/5854d451cb35ac38bc07b95afeb077e8a35d5c7d -- ___

[issue36184] [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread miss-islington
miss-islington added the comment: New changeset 1695836123609a8ae97f2cfbe180a028dcd650a3 by Miss Islington (bot) in branch '3.7': bpo-36184: Port python-gdb.py to FreeBSD (GH-18873) https://github.com/python/cpython/commit/1695836123609a8ae97f2cfbe180a028dcd650a3 -- ___

[issue36184] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- keywords: -easy resolution: -> fixed stage: patch review -> resolved status: open -> closed title: [EASY] test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD -> test_gdb.test_threads() is specific to _POSIX_THREADS, fail on FreeBSD _

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Barney Gale
Change by Barney Gale : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Barney Gale
Barney Gale added the comment: Thanks Rémi and Serhiy! Closing this ticket as the patch doesn't provide any sort of improvement. -- ___ Python tracker ___

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18240 pull_request: https://github.com/python/cpython/pull/18883 ___ Python tracker ___ __

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3225b9f9739cd4bcca372d0fa939cea1ae5c6402 by Victor Stinner in branch 'master': bpo-39877: Remove useless PyEval_InitThreads() calls (GH-18883) https://github.com/python/cpython/commit/3225b9f9739cd4bcca372d0fa939cea1ae5c6402 -- __

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18241 pull_request: https://github.com/python/cpython/pull/18884 ___ Python tracker ___ __

  1   2   >