[issue38558] Data Structures documentation out of sync with new Walrus operator

2019-10-25 Thread Ammar Askar
Ammar Askar added the comment: Thank you for the report Matt! -- nosy: +ammar2 resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker

[issue35714] Document that the null character '\0' terminates a struct format spec

2019-10-25 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +16457 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16928 ___ Python tracker ___

[issue38595] io.BufferedRWPair doc warning may need clarification

2019-10-25 Thread Ryan Govostes
Ryan Govostes added the comment: The origin of this warning involves interleaving read and write operations, and was added here: https://bugs.python.org/issue12213 I'm not sure if it applies to sockets, pipes, etc. though. The pySerial documentation advises using io.BufferedRWPair(x, x)

[issue38595] io.BufferedRWPair doc warning may need clarification

2019-10-25 Thread Ryan Govostes
New submission from Ryan Govostes : The documentation for the io.BufferedRWPair class gives this warning: > BufferedRWPair does not attempt to synchronize accesses to its underlying raw > streams. You should not pass it the same object as reader and writer; use > BufferedRandom instead. I

[issue38570] Shlex does not parse commands containing single quotes correctly

2019-10-25 Thread Anthony Sottile
Anthony Sottile added the comment: Try with `sh`: (it prompts for continuation, I pressed ^D to end it) $ export F=$'\'' > > > > > sh: 8: Syntax error: Unterminated quoted string dollar-sign strings are a `bash` extension, I don't think they're supported by *sh*lex (maybe if there was

[issue38594] importlib.metadata documentation deficiencies

2019-10-25 Thread Gregory Szorc
New submission from Gregory Szorc : As I was attempting to implement the find_distributions() interface for PyOxidizer, I got confused by importlib.metadata's documentation. The documentation for this module states: ``` What this means in practice is that to support finding distribution

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Matthew Barnett
Matthew Barnett added the comment: If we did decide to remove it, but there was still a demand for octal escapes, then I'd suggest introducing \oXXX. -- ___ Python tracker

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Ma Lin
Ma Lin added the comment: > I'd still retain \0 as a special case, since it really is useful. Yes, maybe \0 is used widely, I didn't think of it. Changing is troublesome, let's keep it as is. -- ___ Python tracker

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Vedran Čačić
Vedran Čačić added the comment: Not very useful, surely (now that we have hex escapes). [I'd still retain \0 as a special case, since it really is useful.] But a lot more useful than a hundred backreferences. And I'm as a matter of principle opposed to changing something that's been in the

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Ma Lin
Ma Lin added the comment: Octal escape: \oooCharacter with octal value ooo As in Standard C, up to three octal digits are accepted. It only accepts UCS1 characters (ooo <= 0o377): >>> ord('\377') 255 >>> len('\378') 2 >>> '\378' == '\37' + '8' True

[issue38593] Python 3.7 does not catch infinite recursion for some values of sys.getrecursionlimit()

2019-10-25 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: I observed this issue in Python 3.7.2, 3.7.4, 3.7.5, however it seems to be fixed in 3.8.0. -- ___ Python tracker ___

[issue38591] Deprecate Process Child Watchers

2019-10-25 Thread STINNER Victor
STINNER Victor added the comment: > Regarding pidfd and kqueue -- I love to see pull requests with proposals. Now > nothing exists. The pidfd is available starting from the latest released > Linux 5.3; we need to wait for a decade before all Linux distros adopt it > and we can drop all

[issue38591] Deprecate Process Child Watchers

2019-10-25 Thread STINNER Victor
STINNER Victor added the comment: > ThreadedChildWatcher starts a thread per process but has O(1) complexity. But it spawns a new Python thread per process which can be a blocker issue if a server memory is limited. What if you want to spawn 100 processes? Or 1000 processes? What is the

[issue38591] Deprecate Process Child Watchers

2019-10-25 Thread Kyle Stanley
Kyle Stanley added the comment: > I think FastChildWatcher and SafeChildWatcher should go, ThreadedChildWatcher > should be kept default and MultiLoopChildWatcher is an option where > ThreadedChildWatcher is not satisfactory. Okay, I think I can understand the reasoning here. Do you think

[issue38334] zipfile: Seeking encrypted file breaks after seeking backwards

2019-10-25 Thread Daniel Hillier
Daniel Hillier added the comment: Hi, I have another patch I would like to contribute to the zipfile module but would like to request a review of this one to minimise conflicts with later patches. If anyone is able to review the patch, I would really appreciate it :) Also, with regards to

[issue38558] Data Structures documentation out of sync with new Walrus operator

2019-10-25 Thread miss-islington
miss-islington added the comment: New changeset cf028b57169499f82b73dd0977fe0bab40778a60 by Miss Skeleton (bot) in branch '3.8': bpo-38558: Mention `:=` in conditions tutorial (GH-16919) https://github.com/python/cpython/commit/cf028b57169499f82b73dd0977fe0bab40778a60 -- nosy:

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-25 Thread Ned Deily
Change by Ned Deily : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue38592] Add pt-br to the language switcher at the Python docs website

2019-10-25 Thread Ned Deily
Change by Ned Deily : -- assignee: -> mdk components: +Documentation nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list

[issue38558] Data Structures documentation out of sync with new Walrus operator

2019-10-25 Thread Zachary Ware
Zachary Ware added the comment: New changeset cb2cf06b0aad1851f54999497c1b50c381d1fdd8 by Zachary Ware (Ammar Askar) in branch 'master': bpo-38558: Mention `:=` in conditions tutorial (GH-16919) https://github.com/python/cpython/commit/cb2cf06b0aad1851f54999497c1b50c381d1fdd8 --

[issue38558] Data Structures documentation out of sync with new Walrus operator

2019-10-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +16456 pull_request: https://github.com/python/cpython/pull/16926 ___ Python tracker ___

[issue38533] v3.7.5 py script run ok with python.exe but not pythonw.exe (python silent console not working)

2019-10-25 Thread Steve Dower
Steve Dower added the comment: > FWIW, the very first thing that I checked was the dependencies of pythonw.exe The version in the Store has a different build of pythonw.exe (because it has to be able to determine its user site-packages location differently). Dump of file C:\Program

[issue38592] Add pt-br to the language switcher at the Python docs website

2019-10-25 Thread Marco Rougeth
Change by Marco Rougeth : -- keywords: +patch pull_requests: +16454 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16924 ___ Python tracker ___

[issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables

2019-10-25 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> test needed versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue38591] Deprecate Process Child Watchers

2019-10-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: ThreadedChildWatcher starts a thread per process but has O(1) complexity. MultiLoopChildWatcher doesn't spawn threads, it can be used safely with asyncio loops spawn in multiple threads. The complexity is O(N) plus no other code should contest for SIG_CHLD

[issue38583] The activate script in Windows is not correct for venvs created in git-bash

2019-10-25 Thread Steve Dower
Steve Dower added the comment: I agree this would be better, though it may not be that easy to do. If you're running Windows Python from WSL, then your "bash style" path should be "/mnt/c/some/path", not "/c/some/path". So the answer isn't as simple as .replace('\\', '/'). I did some quick

[issue38557] PyTuple_GetSlice docs minor inaccuracy

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The part about "new tuple" can be removed. The documentation olready contains an automatically generated note about a new reference. PR 16925 improves the documentation for getting/setting items/slices of lists and tuples. -- nosy:

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-10-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: #38541 reports a severe attribute access slowdown in 3.7.4 in some situations. (Fixed by the enhancement in #36922, which I presume cannot be backported.) -- nosy: +terry.reedy ___ Python tracker

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Kyle Stanley
Kyle Stanley added the comment: > Kyle, why are you resetting the status to "Pending"? That was an accident, I think I had that set already on the page and submitted my comment just after you did yours. I'm going to change the title of the issue to "Deprecate Process Child Watchers". I

[issue38593] Python 3.7 does not catch infinite recursion for some values of sys.getrecursionlimit()

2019-10-25 Thread Valentyn Tymofieiev
Change by Valentyn Tymofieiev : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38593] Python 3.7 does not catch infinite recursion for some values of sys.getrecursionlimit()

2019-10-25 Thread Valentyn Tymofieiev
New submission from Valentyn Tymofieiev : While investigating an issue[1] in Apache Beam, we observed that Python 3.7 does not catch an infinite recursion for some values of sys.getrecursionlimit(). Repro steps: docker run -it --entrypoint=/bin/bash python:3.7-stretch git clone

[issue38557] PyTuple_GetSlice docs minor inaccuracy

2019-10-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16455 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16925 ___ Python tracker

[issue38571] Segfault with StopIteration

2019-10-25 Thread Kevin Chen
Kevin Chen added the comment: Sorry for the noise. I upgraded my gevent (1.3.5 to 1.4.0) and greenlet (0.4.13 to 0.4.15) libraries, and that appears to have resolved the issue. I assume there was an incompatibility in one or both of the older versions of these libraries with python 3.7,

[issue38434] sys.addaudithook event is not documented

2019-10-25 Thread Steve Dower
Steve Dower added the comment: The import audit event is also not documented. -- ___ Python tracker ___ ___ Python-bugs-list

[issue38592] Add pt-br to the language switcher at the Python docs website

2019-10-25 Thread Marco Rougeth
New submission from Marco Rougeth : The translation of the Python docs for Brazilian Portuguese is at around 20%. The Brazilian community have been working hard on it for the past 2 years, and as discussed with Julien, we believe this is a good moment to add the pt-br language switcher.

[issue38557] PyTuple_GetSlice docs minor inaccuracy

2019-10-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Verified from Python. >>> t = (1,2,3) >>> t2 = t[:] >>> id(t), id(t2) (1672756229504, 1672756229504) A partial slice cannot the original tuple, so I presume that the emphasis is about returning a (new) *tuple*, rather than some sort of view of the original.

[issue38591] Deprecate Process Child Watchers

2019-10-25 Thread Kyle Stanley
Change by Kyle Stanley : -- title: Deprecating MultiLoopChildWatcher -> Deprecate Process Child Watchers ___ Python tracker ___ ___

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Yury Selivanov
Yury Selivanov added the comment: Kyle, why are you resetting the status to "Pending"? > I think it will be necessary to fix the issues in the near future if we want > to keep MultiLoopChildWatcher in 3.8 (as they apply to 3.8 and 3.9). I would > certainly not be ecstatic about the idea of

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Kyle Stanley
Kyle Stanley added the comment: > Speaking of watchers -- big +1 from me to drop them all at some point. I > would start as early as 3.9. Yeah that was my initial plan, to start the deprecation in 3.9 and finalize the removal in 3.11. We might be able to make an exception for

[issue38541] Performance degradation of attribute accesses in Python 3.7.4

2019-10-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added a note to #28866 about this. The fix in #36922 is likely an enhancement that cannot be backported. Please retest with 3.7.5 if you can, though I have no expectation of any change. -- nosy: +serhiy.storchaka, terry.reedy

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Yury Selivanov
Yury Selivanov added the comment: > but perhaps if we go through with that we should remove MultiLoopChildWatcher > from 3.8 (if it's not too late to do so) instead of deprecating it. I'll leave that up to Andrew to decide, but I'd be +1 to drop it asap, especially if we want to eventually

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Kyle Stanley
Kyle Stanley added the comment: > Didn't we just add MultiLoopChildWatcher in 3.8? Yep, that's correct: https://docs.python.org/3/library/asyncio-policy.html#asyncio.MultiLoopChildWatcher I wasn't aware of that, but it would explain the current lack of usage. I'm generally in favor of

[issue38533] v3.7.5 py script run ok with python.exe but not pythonw.exe (python silent console not working)

2019-10-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: For me, 'pyw -3.7 -m idlelib' in Command Prompt opens IDLE with 3.7.5. So does the equivalent run by clicking the IDLE icon: C:\Programs\Python37\pythonw.exe "C:\Programs\Python37\Lib\idlelib\idle.pyw" This report reminds me that I should continue to

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Yury Selivanov
Yury Selivanov added the comment: Didn't we just add MultiLoopChildWatcher in 3.8? -- status: pending -> open ___ Python tracker ___

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Kyle Stanley
Change by Kyle Stanley : -- assignee: -> aeros nosy: +vstinner status: open -> pending ___ Python tracker ___ ___ Python-bugs-list

[issue38591] Deprecating MultiLoopChildWatcher

2019-10-25 Thread Kyle Stanley
New submission from Kyle Stanley : Proposal: Deprecate the alternative process watcher implementation to ThreadedChildWatcher, MultiLoopChildWatcher. Motivation: The idea for this proposal came from a comment from Andrew Svetlov in GH-16552: "I believe after polishing ThreadedChildWatcher we

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-25 Thread Batuhan
Batuhan added the comment: > I do not think that adding an extra parameter to .read() will solve any > problem. There is a use case of this (which some of tools depends) about checking if configuration exists and if not, raising an error. Now, they can solve this by just adding check_exist

[issue38590] argparse unexpected behavior with argument group inside mutually exclusive group

2019-10-25 Thread Tim Sanders
New submission from Tim Sanders : argparse allows adding argument_groups inside of mutually_exclusive_groups, but the behavior is unintuitive and a bit buggy. Demo: import argparse parser = argparse.ArgumentParser() single_group = parser.add_argument_group(title='single_group')

[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-10-25 Thread Jeong-Min Lee
Change by Jeong-Min Lee : -- nosy: +falsetru ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38286] tarfile forgets set sgid when targetpath has it

2019-10-25 Thread Charles Coulombe
Change by Charles Coulombe : Removed file: https://bugs.python.org/file48626/tarfile_sgid.patch ___ Python tracker ___ ___ Python-bugs-list

[issue38286] tarfile forgets set sgid when targetpath has it

2019-10-25 Thread Charles Coulombe
Change by Charles Coulombe : Added file: https://bugs.python.org/file48678/tarfile_sgid.patch ___ Python tracker ___ ___ Python-bugs-list

[issue28833] cross compilation of third-party extension modules

2019-10-25 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-25 Thread Y3Kv Bv
New submission from Y3Kv Bv : Since Python 3.7 I'm getting broken shortcut to Python 3.x Manuals: the installer doesn't seem to check for correct path to hh.exe; sets "C" as drive letter. (Yet path to python3xx.chm starts with correct drive letter.) -- messages: 355369 nosy: Y3Kv Bv

[issue29270] super call in ctypes sub-class fails in 3.6

2019-10-25 Thread Clement Rouault
Clement Rouault added the comment: Hello, I have a Python2 project that relies heavily on ctypes and I cannot migrate this project to Python3 due to this bug. (I target 3.6) I have some experience with CPython and submitting patchs and I would like to know what I can do to help moving this

[issue38588] Use-after-free in dict/list

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your investigation LCatro! Do you mind to create a pull request? -- components: +Interpreter Core type: security -> crash versions: +Python 2.7, Python 3.7, Python 3.9 ___ Python tracker

[issue38588] Use-after-free in dict/list

2019-10-25 Thread LCatro
New submission from LCatro : Code : The varanit bval forget call Py_INCREF to add reference in dict_equal() b->ma_keys->dk_lookup(b, key, ep->me_hash, ); <--- ... if (bval == NULL) { Py_DECREF(key); Py_DECREF(aval); if (PyErr_Occurred()) return -1;

[issue38564] test_asyncio: test_run_coroutine_threadsafe_with_timeout() has a race condition

2019-10-25 Thread Kyle Stanley
Kyle Stanley added the comment: > IHMO a test must not depend on time. I would agree, the tests should optimally not depend on time. My above comment was primarily to confirm that the failure was able to be consistently reproduced, along with the minimum conditions to do so. Yury had been

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think that adding an extra parameter to .read() will solve any problem. You need to read the documentation of read() to use this feature. You need to change your code, and this will work only in new version of Python, so you will need to support

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2019-10-25 Thread STINNER Victor
STINNER Victor added the comment: I did my tests on Fedora 30 on my laptop which has 4 cores (8 logical CPUs). -- ___ Python tracker ___

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2019-10-25 Thread Kyle Stanley
Kyle Stanley added the comment: > I'm able to reproduce the issue locally using the command: ./python -m test test_asyncio --match=test.test_asyncio.test_subprocess.SubprocessMultiLoopWatcherTests.test_close_kill_running -v -F -j20 --timeout=30.0 I was unable to reproduce this locally on

[issue38564] test_asyncio: test_run_coroutine_threadsafe_with_timeout() has a race condition

2019-10-25 Thread STINNER Victor
STINNER Victor added the comment: IHMO a test must not depend on time. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38564] test_asyncio: test_run_coroutine_threadsafe_with_timeout() has a race condition

2019-10-25 Thread Kyle Stanley
Kyle Stanley added the comment: I can confirm Victor's method of reproducing the failure consistently, by using asyncio.sleep(1e-9) within `RunCoroutineThreadsafeTests.add()` instead of the current asyncio.sleep(0.05). I also experimented with adjusting the sleep time, to figure out the

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Vedran Čačić
Vedran Čačić added the comment: The documentation clearly says: > This special sequence can only be used to match one of the first 99 groups. > If the first digit of number is 0, or number is 3 octal digits long, it will > not be interpreted as a group match, but as the character with octal

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread veaba
veaba <908662...@qq.com> added the comment: Aha, it's me. It's the mysterious power from the East. I just learned python. I've solved my problem. It's a very simple replace replacement, and it's solved in three lines. I'm trying to solve the problem of inadvertently finding out in the

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not believe somebody uses handwritten regular expressions with more than 100 groups. But if you generate regular expression, you can use named groups (?P...) (?P=g12345). -- ___ Python tracker

[issue38583] The activate script in Windows is not correct for venvs created in git-bash

2019-10-25 Thread Mo
Mo added the comment: The issue comes as a result of abspath on line 59 of venv/__init__.py: env_dir = os.path.abspath(env_dir) This returns a Windows-style path, and os.path.abspath returning in this way is *probably* correct, as the OS is Windows, despite trying to forget that by

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread veaba
veaba <908662...@qq.com> added the comment: Yes, this is not a good place to use regular expressions. Using regular expressions: def actual_re_demo(): import re # This is an indefinite string... text = "tf.where(condition, x=None, y=None, name=None) tf.batch_gather ..." #

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Vedran Čačić
Vedran Čačić added the comment: I have no problem with long regexes. But those are not only long, those must be _deeply nested_ regexes, where simply 100 is an arbitrary limit. I'm quite sure if you really need depth 100, you must also need a dynamic depth of nesting, which you cannot really