[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2020-02-19 Thread Tal Einat
Tal Einat added the comment: Please do, Ananthakrishnan! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39660] Contextvars: Optional callbacks on state change

2020-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: > Unfortunately, if Python is used as a frontend for a native libray (eg > accessed via ctypes), and in case that the state of interest is managed in > the native library, contextvar API is insufficient. Please elaborate with a clearer example. --

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-02-19 Thread Geoffrey Bache
Geoffrey Bache added the comment: I have been experiencing what I thought was this issue in my embedded Python code. We have been using Python 3.7, so I thought upgrading to 3.8.1 would fix it, but it doesn't seem to have made any difference. My C++ code essentially can call

[issue39693] tarfile's extractfile documentation is misleading

2020-02-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: I want to do a PR,if this is still needeed. -- nosy: +Ananthakrishnan ___ Python tracker ___ ___

[issue39693] tarfile's extractfile documentation is misleading

2020-02-19 Thread Josh Rosenberg
New submission from Josh Rosenberg : The documentation for extractfile ( https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractfile ) says: "Extract a member from the archive as a file object. member may be a filename or a TarInfo object. If member is a regular file or a

[issue38872] Document exec symbol for codeop.compile_command

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: code.compile_command takes _exec_ as symbol.As it is not documented or mentioned anywhere I can't find any details about that.Can anyone please tell me what it does? -- nosy: +Ananthakrishnan ___ Python tracker

[issue26532] build fails with address sanitizer

2020-02-19 Thread Henry Royal
Change by Henry Royal : -- title: sanitizer -> build fails with address sanitizer versions: +Python 3.6, Python 3.7 -Python 3.9 ___ Python tracker ___

[issue26532] build fails with address sanitizer

2020-02-19 Thread Henry Royal
Change by Henry Royal : -- versions: +Python 3.5 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26532] sanitizer

2020-02-19 Thread Henry Royal
Change by Henry Royal : -- title: build fails with address sanitizer -> sanitizer versions: +Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker ___

[issue39684] PyUnicode_IsIdentifier has two if/thens that can be combined

2020-02-19 Thread Andy Lester
Change by Andy Lester : -- pull_requests: -17937 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39684] PyUnicode_IsIdentifier has two if/thens that can be combined

2020-02-19 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +17947 pull_request: https://github.com/python/cpython/pull/18565 ___ Python tracker ___

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2020-02-19 Thread Ben Sokol
Change by Ben Sokol : -- type: behavior -> crash versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list

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

2020-02-19 Thread Zhibin Dong
Zhibin Dong added the comment: Ubuntu 18.04.4 with kernel 5.3.0-28-generic. Additionally Python version is 3.7.3. -- ___ Python tracker ___

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2020-02-19 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +17945 pull_request: https://github.com/python/cpython/pull/18564 ___ Python tracker ___

[issue39692] Subprocess using list vs string

2020-02-19 Thread Niklas Smedemark-Margulies
New submission from Niklas Smedemark-Margulies : Most (all?) of the functions in subprocess (run, Popen, etc) are supposed to accept either list or string, but the behavior when passing a list differs (and appears to be wrong). For example, see below - invoking the command "exit 1" should

[issue39298] add BLAKE3 to hashlib

2020-02-19 Thread Maor Kleinberger
Change by Maor Kleinberger : -- nosy: +kmaork ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39517] runpy calls open_code with Path object

2020-02-19 Thread Maor Kleinberger
Maor Kleinberger added the comment: Not a direct solution, but I have offered that io.open_code should be changed to support pathlike objects: https://bugs.python.org/issue39691 -- nosy: +kmaork ___ Python tracker

[issue39691] Allow passing Pathlike objects to io.open_code

2020-02-19 Thread Maor Kleinberger
New submission from Maor Kleinberger : As in many functions in python3, io.open_code should probably accept pathlike objects and not just path strings. Below is open_code's docstring: > Opens the provided file with the intent to import the contents. > This may perform extra validation beyond

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

2020-02-19 Thread Nathan Goldbaum
Nathan Goldbaum added the comment: So I *think* I've pieced together what caused the user crash that originated in the flair library. It turns out that pickle.load, via torch.load, is getting passed an mmap.mmap.

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

2020-02-19 Thread Andy Lester
Change by Andy Lester : -- nosy: +petdance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39589] Logging QueueListener should support context manager

2020-02-19 Thread Vinay Sajip
Vinay Sajip added the comment: See my comments on the PR. I think this issue and the PR should be closed. -- ___ Python tracker ___

[issue39540] Logging docs don't address the creation of multiple loggers when a hierarchy is provided

2020-02-19 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39686] add dump_json to ast module

2020-02-19 Thread Richard K
Richard K added the comment: > I don't think the clang argument holds because clang is a command-line tool > after all and it makes sense that it can produce several outputs while the > ast module is exposes APIs that you can further process inside the language. > Having json from the clang

[issue39690] Compiler warnings in unicodeobject.c

2020-02-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Objects/clinic/unicodeobject.c.h: In function ‘unicode_isidentifier’: Objects/unicodeobject.c:12245:22: warning: ‘wstr’ may be used uninitialized in this function [-Wmaybe-uninitialized] ch = wstr[i]; ^~~

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-19 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-19 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset f2ee21d858bc03dd801b97afe60ee2ea289e2fe9 by ananthan-123 in branch 'master': bpo-39479:Add math.lcm() function: Least Common Multiple (#18547) https://github.com/python/cpython/commit/f2ee21d858bc03dd801b97afe60ee2ea289e2fe9 --

[issue39686] add dump_json to ast module

2020-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Just to clarify: ast.dump *will* fail with a more deph object as well, I am not claiming that ast.dump will parse everything because of course suffers the same problem. -- ___ Python tracker

[issue39686] add dump_json to ast module

2020-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > There seems to be movement towards a general usage. For instance, take a look > at clang, in particular the flag '-ast-dump=json'. I don't think the clang argument holds because clang is a command-line tool after all and it makes sense that it can

[issue39686] add dump_json to ast module

2020-02-19 Thread Richard K
Richard K added the comment: Batuhan & Pablo thank you for your thoughts! Just wanted to reply to a few of the comments to clarify my position on the issue. > IMHO this is not a feature that has a general usage. If you want, as far as I > can see, there are some packages for doing that in

[issue39589] Logging QueueListener should support context manager

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

[issue39589] Logging QueueListener should support context manager

2020-02-19 Thread Simon
Change by Simon : -- pull_requests: +17944 pull_request: https://github.com/python/cpython/pull/18563 ___ Python tracker ___ ___

[issue39688] tarfile: GNU sparse 1.0 pax tar header offset not properly computed

2020-02-19 Thread Valentin Samir
Change by Valentin Samir : -- keywords: +patch pull_requests: +17942 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18562 ___ Python tracker ___

[issue39379] sys.path[0] is already absolute path

2020-02-19 Thread Ananthakrishnan
Change by Ananthakrishnan : -- keywords: +patch pull_requests: +17941 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18561 ___ Python tracker ___

[issue39589] Logging QueueListener should support context manager

2020-02-19 Thread Simon
Simon added the comment: The QueueListener in the logging library starts a background thread to monitor the log event queue. The context manager support is ideal in this case, making the code simpler, more consistent with other classes (e.g. multiprocessing.Pool) and prompts stopping the

[issue39688] tarfile: GNU sparse 1.0 pax tar header offset not properly computed

2020-02-19 Thread Valentin Samir
Valentin Samir added the comment: hum trying to be clever and I am doing mistakes. This commit is simpler and effectively fixes the issue https://github.com/nitmir/cpython/commit/682138a3544a2d7de457c88712e738938568f908 tarinfo.offset_data is where tarfile start reading the file data and

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

2020-02-19 Thread Nathan Goldbaum
Nathan Goldbaum added the comment: In this case the tests are explicitly testing that a file-like object that does not implement readinto works with torch.load (which is using pickles under the hood). See https://github.com/pytorch/pytorch/blob/master/test/test_serialization.py#L416-L429,

[issue39560] PyUnicode_FromKindAndData kind transformation is not documented

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: Can i add a pull request for this. -- nosy: +Ananthakrishnan ___ Python tracker ___ ___

[issue39688] tarfile: GNU sparse 1.0 pax tar header offset not properly computed

2020-02-19 Thread Valentin Samir
Valentin Samir added the comment: This commit fix the issue https://github.com/nitmir/cpython/commit/50c1f686054e41738f14de453ede30e942064200 I am currently unable to create pull request on github (error 500) -- ___ Python tracker

[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-02-19 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Failed assertion here: https://github.com/python/cpython/blob/master/Lib/test/test_struct.py#L520 -- ___ Python tracker ___

[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-02-19 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : The clang build was recently added for that buildbot and it seems on that particular architecture, test_struct fails with: == FAIL: test_bool (test.test_struct.StructTest)

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Go for it. Use the same bug number. On Wed, Feb 19, 2020 at 02:30 Ananthakrishnan wrote: > > Ananthakrishnan added the comment: > > yes,I'm interested in writing docs for the `__required_keys__` and > `__total_keys__` attributes. > > -- > >

[issue39632] variadic function call broken on armhf when passing a float argument

2020-02-19 Thread Nicolas Dessart
Change by Nicolas Dessart : -- versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue39688] tarfile: GNU sparse 1.0 pax tar header offset not properly computed

2020-02-19 Thread Valentin Samir
New submission from Valentin Samir : When tarfile open a tar containing a sparse file where actual data is bigger than 0o777 bytes (~8GB), it fails listing members after this file. As so, it is impossible to access/extract files located after a such file inside the archive. A tar

[issue35081] Move internal headers to Include/internal/

2020-02-19 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39686] add dump_json to ast module

2020-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks, Richard for your proposal. I concur with Batuhan: I am -1 as well on this addition. Echoing some of the same ideas, I think this is specialized enough that does not make sense to have it in the standard library, especially if a Pypi package

[issue39686] add dump_json to ast module

2020-02-19 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > The proposed enhancement would provide a complementary function, `dump_json` > as in a json representation of the ast. IMHO this is not a feature that has a general usage. If you want, as far as I can see, there are some packages for doing that in PyPI

[issue17422] language reference should specify restrictions on class namespace

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: I just addded a PR for this issue. -- nosy: +Ananthakrishnan ___ Python tracker ___ ___

[issue39632] variadic function call broken on armhf when passing a float argument

2020-02-19 Thread Nicolas Dessart
Change by Nicolas Dessart : -- pull_requests: +17940 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18560 ___ Python tracker ___

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

2020-02-19 Thread STINNER Victor
STINNER Victor added the comment: > Yes I saw those in the morning, thanks for patching it up. I will debug this > over the weekend and will update. Ok, perfect. In the meanwhile, as announced, I reverted the change to be able to notify other regressions. Once we get a fix, we can reapply

[issue39687] re.sub behaves inconsistent between versions with * repetition qualifier

2020-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is correct and documented behavior. ".*" matches two substrings: the whole string "bc" and an empty string at the end of the string. See https://docs.python.org/3/library/re.html#re.sub and

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

2020-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4dee92b0ad9f4e3ea2f5253340801bb92dc7 by Victor Stinner in branch 'master': Revert "bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)" (GH-18553)

[issue39676] test_shutil fails with OSError: [Errno 28] No space left on device on "PPC64LE Fedora Stable LTO + PGO 3.x" buildbot

2020-02-19 Thread Petr Viktorin
Petr Viktorin added the comment: Indeed, builds are green: https://buildbot.python.org/all/#/builders/449 Thanks Victor for reporting and Harris for fixing this. -- nosy: +petr.viktorin resolution: -> fixed stage: -> resolved status: open -> closed

[issue39686] add dump_json to ast module

2020-02-19 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-02-19 Thread Maor Kleinberger
Maor Kleinberger added the comment: On which OS did that happen? -- nosy: +kmaork ___ Python tracker ___ ___ Python-bugs-list

[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values

2020-02-19 Thread Maor Kleinberger
Maor Kleinberger added the comment: > This could sometimes make the output verbose We could limit the length of the recursive __repr__ functions, and display partial reprs suffixed with ..., like in numpy for example. We can define that the maximum wanted length of a task repr would be,

[issue9182] document “--” as a way to distinguish option w/ narg='+' from positional argument in argparse

2020-02-19 Thread hai shi
hai shi added the comment: It exists in master, so it still need a patch. -- nosy: +rhettinger, shihai1991 versions: +Python 3.9 -Python 2.7, Python 3.2 ___ Python tracker ___

[issue39687] re.sub behaves inconsistent between versions with * repetition qualifier

2020-02-19 Thread Yves
New submission from Yves : On different platforms and versions the following expression has different results: python -c 'import re; print(re.compile("(.*)", 0).sub("a\\1", "bc"))' As far is I observed: Linux/Python 3.6.9 => abc MacOS/Python 3.7.1 => abca Repl.it/Python 3.8.1 =>

[issue39676] test_shutil fails with OSError: [Errno 28] No space left on device on "PPC64LE Fedora Stable LTO + PGO 3.x" buildbot

2020-02-19 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: The issue has been fixed. root was 15GB, but there was still 30GB of un-allocated space in the volume group, so just expanded the logical volume. -- ___ Python tracker

[issue17422] language reference should specify restrictions on class namespace

2020-02-19 Thread Ananthakrishnan
Change by Ananthakrishnan : -- pull_requests: +17939 pull_request: https://github.com/python/cpython/pull/18559 ___ Python tracker ___

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: yes,I'm interested in writing docs for the `__required_keys__` and `__total_keys__` attributes. -- ___ Python tracker ___

[issue13672] Add co_qualname attribute in code objects

2020-02-19 Thread Alex Hall
Alex Hall added the comment: I think this would be very useful in tracebacks. If a traceback line had a more useful name like `MyClass.__init__` instead of just `__init__` or `my_decorator..wrapper` instead of just `wrapper` it would provide useful context to the frame. -- nosy:

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2020-02-19 Thread Henning von Bargen
Henning von Bargen added the comment: As a side-note: In my case I am embedding Python in a C program for several reasons: - Added an additional module (generated with SWIG) - This module needs a licence key, which I supply in the C program (to make it more difficult to extract it). - I need

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2020-02-19 Thread Henning von Bargen
Change by Henning von Bargen : -- nosy: +Henning.von.Bargen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Right, I think at some point during the PEP 574 implementation review, we decided that the input object had to be a proper file implementation (for example, deriving from io.BufferedIOBase). I think it should be easy for PyTorch to fix this internally (by