[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts
Floris Lambrechts added the comment: Based on the feedback received in GitHub here: https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b I made a new revision of the 'Absolute paths' chapter here:

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-02-24 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29450] xattr functions aren't in os.supports_fd, os.supports_follow_symlinks

2020-02-24 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +18014 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18653 ___ Python tracker

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Brandt Bucher
Brandt Bucher added the comment: My current PR plans are: - Docs. This will include the dict docs and the whatsnew 3.9. I assume we have no plans to cover this in the tutorials, etc. Let me know if I'm missing anything here. - collections.defaultdict, with tests. I don't think this needs

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Mike Frysinger
Mike Frysinger added the comment: if threading.active_count() returns 1, then you know there's one thread, and you're it, so it's not racey, and a lock ins't needed. thinking a bit more, what if the code just use a recursive lock ? that would restore the single threaded status quo without

[issue39747] test_os debug assertion failure

2020-02-24 Thread Ethan Smith
New submission from Ethan Smith : With CPython master branch and build.bat -e -p x64, if I run test_os I get the following (in a messagebox transcribed here for ease of consumption). Sorry if I am missing something. This means I am unable to run test_os to completion. I am on Windows

[issue39745] BlockingIOError.characters_written represents number of bytes not characters

2020-02-24 Thread Masahiro Sakai
Change by Masahiro Sakai : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report and for the initial patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker

[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Tim Peters
Tim Peters added the comment: Orion, you're using the interface as intended :-) While it's too late to change now, if Python started over from scratch I'd argue to leave "in" and "not in" out of this feature - chaining them is _usually_ an unintended behavior. Then again, sometimes it is

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: While the main code has been merged now, I propose to keep this issue open until some other things have happened: - Documentation - Add | operators to some dict subclasses in the stdlib - (What else?) -- ___

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset eb8ac57af26c4eb96a8230eba7492ce5ceef7886 by Brandt Bucher in branch 'master': bpo-36144: Dictionary Union (PEP 584) (#12088) https://github.com/python/cpython/commit/eb8ac57af26c4eb96a8230eba7492ce5ceef7886 --

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: PEP 584 has been approved by the Steering Council (at my recommendation). We will shortly begin landing PRs related to this. -- versions: +Python 3.9 -Python 3.8 ___ Python tracker

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag
Berker Peksag added the comment: New changeset daef21ce7dfd3735101d85d6ebf7554187c33ab8 by Miss Islington (bot) in branch '3.8': bpo-30566: Fix IndexError when using punycode codec (GH-18632) https://github.com/python/cpython/commit/daef21ce7dfd3735101d85d6ebf7554187c33ab8 --

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag
Berker Peksag added the comment: New changeset 55be9a6c09d4415f50b14212ce22eccefa83ca64 by Miss Islington (bot) in branch '3.7': bpo-30566: Fix IndexError when using punycode codec (GH-18632) https://github.com/python/cpython/commit/55be9a6c09d4415f50b14212ce22eccefa83ca64 --

[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Eryk Sun
Eryk Sun added the comment: For reference see the section on comparisons in the language reference: https://docs.python.org/3/reference/expressions.html#comparisons -- nosy: +eryksun resolution: -> not a bug ___ Python tracker

[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Orion Fisher
Orion Fisher added the comment: Ah, I see, thank you for the clear explanation. Chaining is so intuitive in the case it is always introduced with, yet I never knew it applied so generally. (New to the interface so I hope this is indeed where I must reply.) --

[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Orion Fisher
Change by Orion Fisher : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Tim Peters
Tim Peters added the comment: "!=" and "in" are comparison operators in Python, and _all_ comparison operators "chain". That is, x < y < z means x < y and y < z (although y is evaluated only once), and in the same way True != True in [False, False] means True != True and True in

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag
Berker Peksag added the comment: New changeset ba22e8f174309979d90047c5dc64fcb63bc2c32e by Berker Peksag in branch 'master': bpo-30566: Fix IndexError when using punycode codec (GH-18632) https://github.com/python/cpython/commit/ba22e8f174309979d90047c5dc64fcb63bc2c32e --

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +18012 pull_request: https://github.com/python/cpython/pull/18651 ___ Python tracker

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +18013 pull_request: https://github.com/python/cpython/pull/18652 ___ Python tracker ___

[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Orion Fisher
New submission from Orion Fisher : I found a strange issue with how the interpreter produces bytecode for an expression like True != True in [False, False]. Reading it, one would expect the value of the expression to be True, whether the inequality comparison is evaluated first, or the

[issue39745] BlockingIOError.characters_written represents number of bytes not characters

2020-02-24 Thread Masahiro Sakai
New submission from Masahiro Sakai : According to https://docs.python.org/3/library/exceptions.html#BlockingIOError , 'characters_written' is "An integer containing the number of characters written to the stream before it blocked". But I observed that it represents number of *bytes* not

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-24 Thread Zhibin Dong
Zhibin Dong added the comment: Yes, I think you are right. In the second solution, the callback of SIGINT will be append to the end of one task loop. If that code is defined in a task by some user, KeyboardInterrupt will not be raised. -- ___

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Reopening so that spending time on deciding this in the future at least stays on my radar. Your workaround sounds like the reasonable, if understandably not pretty approach for now. -- resolution: wont fix -> remind status: closed -> open

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +3.4regression, 3.5regression ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Mike Frysinger
Mike Frysinger added the comment: to be clear, there is no Python or OS restriction that you're aware of for your earlier statement ? you just want to make it into a new Popen restriction that didn't previously exist ? we came across this bug as we upgraded our existing Python 2.7 codebase

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: yes, Popen's use of a lock since that change means that Popen.wait() cannot be called in an asynchronous context where its own execution could be blocking the execution of code that would unlock the lock. at this point we should probably just document

[issue39744] asyncio.subprocess's communicate(None) does not close stdin

2020-02-24 Thread Marek Marczykowski-Górecki
Change by Marek Marczykowski-Górecki : -- keywords: +patch pull_requests: +18010 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18650 ___ Python tracker

[issue39744] asyncio.subprocess's communicate(None) does not close stdin

2020-02-24 Thread Marek Marczykowski-Górecki
Marek Marczykowski-Górecki added the comment: This is BTW similar to https://bugs.python.org/issue26848 -- ___ Python tracker ___

[issue39744] asyncio.subprocess's communicate(None) does not close stdin

2020-02-24 Thread Marek Marczykowski-Górecki
New submission from Marek Marczykowski-Górecki : Standard subprocess's communicate() called with None input (or no argument at all closes process stdin. The asyncio variant does not. This leads to issue with various processes that wait for EOF on stdin before terminating. Test script

[issue39743] variable quiet is not defined in function main.

2020-02-24 Thread SilentGhost
Change by SilentGhost : -- components: +Library (Lib) -Cross-Build resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> bad input crashes py_compile library type: -> behavior ___ Python tracker

[issue39743] variable quiet is not defined in function main.

2020-02-24 Thread Syed Habeeb Ullah Quadri
New submission from Syed Habeeb Ullah Quadri : 'quiet' is an argument of function "compile" in "pycompile.py". I do not understand why 'quiet' is used in function "main" when function main has arguments, None. Undefined 'quiet' variable is used in "main" function of "pycompile.py" in lines

[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-24 Thread Enji Cooper
Change by Enji Cooper : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-24 Thread Enji Cooper
New submission from Enji Cooper : getdtablesize({2,3}) is a wonderful library call/system call to have access to because it allows one to determine the descriptor limits at runtime in an easier manner than having to do the equivalent with os.sysconf(..): >>>

[issue39741] Argument Clinic name conflict

2020-02-24 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: After preparing the patch and transforming all arguments with a __clinic_ prefix, I saw there are some actions that are taken by relying on the parser code. An example;

[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread nono
nono added the comment: Okay, I will discuss this in tensorflow forum. Thanks for providing the information. -- ___ Python tracker ___

[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. I don't see anything here that would indicate that this is a core Python problem. This looks like something you'd need to take up with the tensorflow folks. (Investigations could conceivably turn up a CPython bug as the underlying cause, in which case

[issue39741] Argument Clinic name conflict

2020-02-24 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : Argument clinic uses some extra variables (like args, or noptargs, nargs etc.) for parsing. But there is a catch about these names, the generated code becomes wrong if there are any usages of them inside the signature. Encountered with this problem while

[issue20291] Argument Clinic should understand *args and **kwargs parameters

2020-02-24 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch nosy: +BTaskaya nosy_count: 9.0 -> 10.0 pull_requests: +18009 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18609 ___ Python tracker

[issue39740] Select module fails to build on Solaris 11.4

2020-02-24 Thread RobHammann
New submission from RobHammann : On an x86 Solaris 11.4 system, the standard procedure build of python from source fails to build the 'select' module. Make install then fails upon trying to import 'select'. In the make output, while gcc is building 'select', these errors are printed:

[issue34033] distutils is not reproducible

2020-02-24 Thread Matej Cepl
Change by Matej Cepl : -- nosy: -mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread nono
Change by nono : -- components: macOS nosy: leo212121, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python crash every time opening pycharm, seems related to tensorflow type: crash versions: Python 3.7 ___ Python

[issue39681] pickle.load expects an object that implements readinto

2020-02-24 Thread Nathan Goldbaum
Nathan Goldbaum added the comment: Thank you for the fix! Yes I'm planning to file an issue with flair about this and patch this use case in PyTorch itself. -- ___ Python tracker

[issue39737] Speed up list.__eq__ by about 6%

2020-02-24 Thread SilentGhost
Change by SilentGhost : -- nosy: +corona10, serhiy.storchaka, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39700] asyncio.selector_events._SelectorTransport: Add logging when sock.getpeername() fails

2020-02-24 Thread David
David added the comment: Hi asvetlov, Thank you for your reply. I'm currently trying to debug a network issue, but I cannot determine the root cause of it because of lack of logs. It would be extremely helpful for my debugging if we could log the error that was raised by getpeername. I

[issue38988] Killing asyncio subprocesses on timeout?

2020-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: asyncio doesn't kill subprocess by timeout, that's why test1() doesn't work. The kill is done by signal sending which is asynchronous. That's why test2 may fail at "FAIL(3)" point sometimes. 1-second sleep is enough to stop this case, but maybe not enough,

[issue39613] IsolatedAsyncioTestCase closes default event loop

2020-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: The behavior is intentional and follows asyncio.run() semantics. Moreover, every test should have a separate event loop instance, this is stressed by IsolatedAsyncioTestCase class name -- resolution: -> wont fix stage: -> resolved status: open ->

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread miss-islington
miss-islington added the comment: New changeset 1f4cf0c22b00fefb17611546755b65d3cb488330 by Miss Islington (bot) in branch '3.8': bpo-39128: Added algorithm description (GH-18624) https://github.com/python/cpython/commit/1f4cf0c22b00fefb17611546755b65d3cb488330 --

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, Ido -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +18008 pull_request: https://github.com/python/cpython/pull/18649 ___ Python tracker ___

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread miss-islington
miss-islington added the comment: New changeset 8af4712a16e4b7d1b60f1faec13cd7a88da95f6a by idomic in branch 'master': bpo-39128: Added algorithm description (GH-18624) https://github.com/python/cpython/commit/8af4712a16e4b7d1b60f1faec13cd7a88da95f6a --

[issue33840] connection limit on listening socket in asyncio

2020-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: For server applications, the reverse proxy in front of the application can limit the connection limit. It is a good workaround because the proxy is required (and most likely is used already) for any non-trivial server app. --

[issue39700] asyncio.selector_events._SelectorTransport: Add logging when sock.getpeername() fails

2020-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm not sure. Logging can pollute the logger and make it almost useless. Most of mentioned errno codes are programming errors, a few may happen due network issues. Would you share what reasons did you observe? --

[issue37373] Configuration of windows event loop for libraries

2020-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: >From my understanding, the issue is still desirable but we have a lack of >resources. Regarding the patch for tornado, using selectors.SelectSelector for implementing add_reader()/remove_reader() and add_writer()/remove_writer() in ProactorEventLoop looks

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: The second solution doesn't help with breaking infinite loops like while True: pass We need a more robust idea. -- ___ Python tracker

[issue39681] pickle.load expects an object that implements readinto

2020-02-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: The regression is fixed in git master and in the 3.8 branch. However, I would still advice against the idiom of handling a mmap object as a regular file when using pickle. -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue18837] multiprocessing.reduction is undocumented

2020-02-24 Thread Ronald van Elburg
Ronald van Elburg added the comment: Problem still exists in 3.7 documentation. It is unclear to me, even after inspecting issues and commits what proper usage of multiprocessing.reduction is. In case it is now fully internal to the module it would be reassuring to read that in the

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Mike Frysinger
Mike Frysinger added the comment: > fundamentally: this shouldn't work anyways. > > You are calling wait() from a signal handler. > That is a blocking operation. > You cannot do that from a signal handler. what definition/spec are you referring to here ? is this a Python limitation ? i

[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex
zd nex added the comment: Okay I have managed to crash it when exit() was called and also I am attaching output with -v python3.8 -X faulthandler ce_test_2.py start end --Return-- > /home/fractal/workspace/test_py_crash/ce_test_2.py(19)()->None -> breakpoint() (Pdb) exit() Traceback (most

[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex
zd nex added the comment: Okay I have tried to run it with breakpoint() but it does not crash on 3.8 -- ___ Python tracker ___ ___

[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread Andrei Daraschenka
Andrei Daraschenka added the comment: Yes, It's work for me $ uname -a Linux laptop 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ python3.8 --version Python 3.8.0 $ python3.8 ce_test_2.py start end Could you please write about the

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts
Floris Lambrechts added the comment: (sorry, didn't see the GitHub comments before... I'll process those first.) -- ___ Python tracker ___

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts
Floris Lambrechts added the comment: @ChrisBarker, Could you review the proposed addition to the documentation? https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b -- ___ Python tracker

[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex
zd nex added the comment: Ok I will try pdb -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex
zd nex added the comment: Hello, well and in 3.8 it does not crash for you? Is there some devel build of 3.9 for ubuntu which I can try? I have tested it on 3.7,3.8 and 3.6 and it crashed always when close was not present or when list was called in another function. --

[issue39738] mod operation with large number is not correct.

2020-02-24 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is a floating point issue, not a bug. Floats inherently only have a limited precision available, so they are not always the exact number you think they are. Using 1e9 forces the result to be a float, which introduces rounding errors into the

[issue39738] mod operation with large number is not correct.

2020-02-24 Thread wjzbf
New submission from wjzbf : hello python, when i calculate: 15147666057940416-15147666057940416//17 * (1e9+7) it returns 67534848.0 when i calculate 15147666057940416 % (1e9+7) it returns 67536199.0 the two values are not equal. how to explain it?

[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread Andrei Daraschenka
Andrei Daraschenka added the comment: Could you give more details for reproduce it because on the latest version cpython from master branch it's work You can debug it with help pdb. Just set breakpoint: ... test_shelve(data) breakpoint() data.close() ... And try run it step-by-step (press

[issue39717] Fix exception causes in tarfile module

2020-02-24 Thread Vedran Čačić
Vedran Čačić added the comment: I guess https://bugs.python.org/issue39728 is a perfect example of "previous exception not adding any value". :-) And I think it isn't a coincidence that it happens in "your" module. The morale: we think about exceptions in different ways, and it's hard to say

[issue39728] Instantiating enum with invalid value results in ValueError twice

2020-02-24 Thread Andrei Daraschenka
Change by Andrei Daraschenka : -- keywords: +patch nosy: +dorosch nosy_count: 4.0 -> 5.0 pull_requests: +18007 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/18641 ___ Python tracker