[issue38869] Unexpectedly variable result

2019-11-20 Thread Zachary Ware
Zachary Ware added the comment: I don't see anything here to indicate a bug in CPython or the standard library, so I'm closing the issue. I would recommend asking for help with this on python-l...@python.org (comp.lang.python) or StackOverflow. If you can reduce it to a bug in either numpy

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16793 pull_request: https://github.com/python/cpython/pull/17301 ___ Python tracker ___ __

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : As discussed in https://mail.python.org/archives/list/python-...@python.org/thread/JAQDBMC23HW2PQ27HQNJ7G244T423IDD/ I propose to expose the unparse.py tool as part of the standard library in the ast module. The exposed function will have the inter

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Kyle Stanley
Kyle Stanley added the comment: > There are some platforms (Linux pre-3.9 kernels) that don't have > SO_REUSEPORT. I wish I could say I don't care about such platforms; alas, I > just had to compile Python 3.7 on a system running a 2.6 kernel last month at > a client site. Based on https://

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +16794 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17302 ___ Python tracker __

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Jukka Väisänen
Jukka Väisänen added the comment: > We just chose an unfortunate default for one of them I'd like to point out that it is also documented completely wrong up to this point in time and thus people who chose True are most likely to be unaware of the actual consequences. A user's explicit choice

[issue38868] Shutil cannot delete a folder that contains an .ini file

2019-11-20 Thread Eryk Sun
Eryk Sun added the comment: What is the system error code (winerror) of the PermissionError? -- nosy: +eryksun ___ Python tracker ___ _

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: After PR17302 is merged we need to fix the following cosmetic issues indicated by Victor: (*) unparse adds many useless parentheses. The algorithm seems naive. For example, it adds "()" to "class _AddedDllDirectory():". It also adds parenthesis around

[issue38871] lib2to3 generates invalid code with filter and ternary operator

2019-11-20 Thread Zoran Simic
New submission from Zoran Simic : This code snippet exposes a small edge case in lib2to3, where syntactically invalid code is generated: data = [1, 2, 3, 4, 5] x = filter(lambda x: True if x > 2 else False, data) print(x) lib2to3 transforms 2nd line above to: x = [x for x in data if True if

[issue17582] xml.etree.ElementTree does not preserve whitespaces in attributes

2019-11-20 Thread Emiliano Heyns
Emiliano Heyns added the comment: I don't see newlines currently preserved in attributes: elem = ET.parse(StringIO('')).getroot() print(ET.tostring(elem)) -- components: -XML nosy: +Emiliano Heyns versions: -Python 3.4, Python 3.5, Python 3.6 _

[issue38823] Improve stdlib module initialization error handling.

2019-11-20 Thread miss-islington
miss-islington added the comment: New changeset e5d1f734db135e284af8e8868e7ccc85355952b9 by Miss Islington (bot) (Brandt Bucher) in branch 'master': bpo-38823: Clean up _xxtestfuzz initialization. (GH-17216) https://github.com/python/cpython/commit/e5d1f734db135e284af8e8868e7ccc85355952b9 -

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Ned Deily
Ned Deily added the comment: (Provisionally marking this as a security-related deferred blocker issue for backporting) -- nosy: +ned.deily priority: normal -> deferred blocker type: behavior -> security versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___

[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2019-11-20 Thread Galen Han
Change by Galen Han : -- nosy: +Galen Han ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-20 Thread Lisa Roach
Lisa Roach added the comment: New changeset 046442d02bcc6e848e71e93e47f6cde9e279e993 by Lisa Roach (Jason Fried) in branch 'master': bpo-38857: AsyncMock fix for awaitable values and StopIteration fix [3.8] (GH-17269) https://github.com/python/cpython/commit/046442d02bcc6e848e71e93e47f6cde9e

[issue38021] pep425 tag for AIX is inadequate

2019-11-20 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +16795 pull_request: https://github.com/python/cpython/pull/17303 ___ Python tracker ___

[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-20 Thread Lisa Roach
Change by Lisa Roach : -- pull_requests: +16796 pull_request: https://github.com/python/cpython/pull/17304 ___ Python tracker ___ __

[issue38021] pep425 tag for AIX is inadequate

2019-11-20 Thread Ned Deily
Ned Deily added the comment: PEP 425 tags are now in the Python Packaging Authority realm. People from there should also be reviewing this issue and the new PR. CC-ing Brett and Nick for guidance. Also, assuming the feature is approved, I don't think it would be appropriate to backport to

[issue38872] Document exec symbol for codeop.compile_command

2019-11-20 Thread Cheryl Sabella
New submission from Cheryl Sabella : codeop.compile_command accepts 'exec' as a symbol, but it is not documented. Opening this bug report for an issue initially reported in PR3179. -- assignee: docs@python components: Documentation messages: 357118 nosy: cheryl.sabella, docs@python p

[issue36277] pdb's recursive debug command is not listed in the docs

2019-11-20 Thread miss-islington
miss-islington added the comment: New changeset 9391f6c3ef24f7962c534c42ccb792debdbef509 by Miss Islington (bot) (Dave Nguyen) in branch 'master': bpo-36277: Add document for pdb debug and retval commands (GH-12872) https://github.com/python/cpython/commit/9391f6c3ef24f7962c534c42ccb792debdbe

[issue36277] pdb's recursive debug command is not listed in the docs

2019-11-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +16798 pull_request: https://github.com/python/cpython/pull/17309 ___ Python tracker ___ __

[issue36277] pdb's recursive debug command is not listed in the docs

2019-11-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +16797 pull_request: https://github.com/python/cpython/pull/17308 ___ Python tracker ___ __

[issue36277] pdb's recursive debug command is not listed in the docs

2019-11-20 Thread Cheryl Sabella
Cheryl Sabella added the comment: @Antony.Lee, thank you for the report, @remi.lapeyre, thank you for the research, and @dvnguyen, thank you for the PR. -- nosy: +cheryl.sabella resolution: -> fixed stage: patch review -> resolved status: open -> closed _

[issue36277] pdb's recursive debug command is not listed in the docs

2019-11-20 Thread miss-islington
miss-islington added the comment: New changeset 97c301bfc5ea278c32dc5fabe425d8981ec5d3b1 by Miss Islington (bot) in branch '3.7': bpo-36277: Add document for pdb debug and retval commands (GH-12872) https://github.com/python/cpython/commit/97c301bfc5ea278c32dc5fabe425d8981ec5d3b1 --

[issue36277] pdb's recursive debug command is not listed in the docs

2019-11-20 Thread miss-islington
miss-islington added the comment: New changeset d5d41d39366214c9628b2680fa18fb8d085bcdbc by Miss Islington (bot) in branch '3.8': bpo-36277: Add document for pdb debug and retval commands (GH-12872) https://github.com/python/cpython/commit/d5d41d39366214c9628b2680fa18fb8d085bcdbc --

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Kyle Stanley
Kyle Stanley added the comment: > I'd like to point out that it is also documented completely wrong up to this > point in time and thus people who chose True are most likely to be unaware of > the actual consequences. A user's explicit choice based on misinformation is > not really demonstra

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Kyle Stanley
Kyle Stanley added the comment: > My preference for create_datagram_endpoint() would be: > - make the "reuse_address" parameter a no-op, and raise an error when > "reuse_address=True" is passed > - do that in 3.8 as well This solution would more elegant, but my concern is that it will leave

[issue38873] find_library for libcrypto and libssl on Catalina returns the unversioned library

2019-11-20 Thread Sarah Harvey
New submission from Sarah Harvey : I've been tracking this through a bunch of different projects now. With the release of Mac OS X Catalina, libcrypto.dylib is a dummy library that causes an automatic segfault, to prevent upstream software from relying on it. However a large amount of softwar

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Yury Selivanov
Yury Selivanov added the comment: > My preference for create_datagram_endpoint() would be: > - make the "reuse_address" parameter a no-op, and raise an error when > "reuse_address=True" is passed > - do that in 3.8 as well Yeah, I like this prposal; we can apply this to all Python's from 3.

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Kyle Stanley
Change by Kyle Stanley : -- keywords: +patch pull_requests: +16799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17311 ___ Python tracker ___ ___

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Kyle Stanley
Kyle Stanley added the comment: > Yeah, I like this prposal; we can apply this to all Python's from 3.5 to 3.8. > With a proper documentation update this should be OK. Oh in that case, would you like me to close or modify GH-17311? I didn't think you'd approve of making the more extensive c

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Kyle Stanley
Change by Kyle Stanley : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Yury Selivanov
Yury Selivanov added the comment: > Oh in that case, would you like me to close or modify GH-17311? I didn't > think you'd approve of making the more extensive changes all the way back to > 3.5. After reading the comments here I think Antoine's solution makes sense. But... let's wait a bit

[issue38874] asyncio.Queue: putting items out of order when it is full

2019-11-20 Thread Junyeong Jeong
New submission from Junyeong Jeong : Hi The python document says that asyncio.Queue is FIFO queue. But it is not true when the queue is full and multi tasks are putting items into it simultaneously. I know the document does not explicitly mention that asyncio.Queue is multi producer queue, but

[issue38874] asyncio.Queue: putting items out of order when it is full

2019-11-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: The items that haven't finished the put aren't actually "in" the queue yet, so I don't see how non-FIFO order of insertion violates any FIFO guarantees for the contents of the queue; until the items are actually "in", they're not sequenced for the purposes o

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Guido van Rossum
Guido van Rossum added the comment: (Don't wait for me, I am preoccupied with other things this week.) -- title: UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port -> UDP sockets created by create_datagram_endpoint() allow by

[issue38874] asyncio.Queue: putting items out of order when it is full

2019-11-20 Thread Junyeong Jeong
Junyeong Jeong added the comment: > The items that haven't finished the put aren't actually "in" the queue yet, > so I don't see how non-FIFO order of insertion violates any FIFO guarantees > for the contents of the queue; until the items are actually "in", they're not > sequenced for the pu

[issue38871] lib2to3 generates invalid code with filter and ternary operator

2019-11-20 Thread Dong-hee Na
Dong-hee Na added the comment: I can reproduce on the latest master branch. ./python Tools/scripts/2to3 2.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optiona

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Siwon Kang
Change by Siwon Kang : -- pull_requests: +16800 pull_request: https://github.com/python/cpython/pull/17312 ___ Python tracker ___ __

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Siwon Kang
Change by Siwon Kang : -- pull_requests: -16785 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: PR-17098 basically reverts https://bugs.python.org/issue33695. Not good. =) I think we can simply consume the iterator immediately as in: def copytree(src, ...): with os.scandir(src) as itr: entries = list(itr) return _copyt

[issue38863] Improve is_cgi() in http.server

2019-11-20 Thread Siwon Kang
Siwon Kang added the comment: Hi Donghee, Since you said this is not a bug, I changed the title describing this is a matter of improvement. For your comment, I would say sorry first that I have made you confused. My mention about apache is just to give you an example for the other module tha

[issue38863] Improve is_cgi() in http.server

2019-11-20 Thread Dong-hee Na
Dong-hee Na added the comment: Thanks, Siwon Kang, I now understood what you want to say. I left some comments on your PR 17312. -- ___ Python tracker ___

[issue38863] Improve is_cgi() in http.server

2019-11-20 Thread Dong-hee Na
Dong-hee Na added the comment: @martin.panter, @asvetlov I add the core developers who looks like to be experts on this module. Can you follow up on Siwon's PR? Thanks for your understanding. -- nosy: +asvetlov, martin.panter versions: -Python 3.6 __

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: After PR 17302 is accepted, I'll work on refactorings including a precedence algorithm to find when to parentheses. -- nosy: +Batuhan Taskaya ___ Python tracker __

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5dcc06f6e0d7b5d6589085692b86c63e35e2325e by Victor Stinner in branch 'master': bpo-38858: Allocate small integers on the heap (GH-17301) https://github.com/python/cpython/commit/5dcc06f6e0d7b5d6589085692b86c63e35e2325e --

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-20 Thread STINNER Victor
STINNER Victor added the comment: > bpo-38858: Allocate small integers on the heap (GH-17301) I associated this change to this issue because I had troubles when I tried to call _PyLong_Fini() in subinterpreters. I'm now trying to have different small integers per interpreter. -- __

<    1   2