[issue42607] raw strings SyntaxError

2020-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: This is a FAQ: https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash Raw strings can't end with an odd number of backslashes. -- components: -Windows nosy: +eric.smith resolution: -> not a bug stage: ->

[issue42561] better error reporting in ast

2020-12-08 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42572] Better path handling with argparse

2020-12-08 Thread Xavier Morel
Xavier Morel added the comment: > What exactly do you do with a path argument? Because they mention "convert[ing] the string to a path", I would expect an output of `pathlib.Path`, optionally checked for existence / non-existence and / or kind (file, directory, symlink, ...). Obviously it

[issue31601] Availability of utimensat, futimens not checked correctly on macOS

2020-12-08 Thread Joshua Root
Joshua Root added the comment: Looks like this is fixed as of 3.9.1. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42560] Improve Tkinter Documentation

2020-12-08 Thread E. Paine
E. Paine added the comment: See issue34154. I'm personally against such changes because we don't know what Tk version to write them for. Our documentation could be both outdated and too recent, including kwargs not available to some people (because they are running an older version). The

[issue42587] memoryview rely on _Bool undefined behavior (test_buffer fails on Python built with GCC 11)

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- title: test_buffer fails on Python built with GCC 11 -> memoryview rely on _Bool undefined behavior (test_buffer fails on Python built with GCC 11) ___ Python tracker

[issue42587] test_buffer fails on Python built with GCC 11

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: See also: Behavior of struct “?” format (native _Bool) https://discuss.python.org/t/behavior-of-struct-format-native-bool/3774 -- ___ Python tracker

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: Linux 5.9 added close_range() syscall that we can use. Linux 5.10 may get a new CLOSE_RANGE_CLOEXEC flag for close_range(). https://lwn.net/Articles/837816/ We may use close_range() rather than iterating on /proc/self/fd/ in user space. It may be faster and

[issue42596] aarch64 Fedora Rawhide LTO + PGO 3.8 fails to build Python: /usr/bin/ld: error adding symbols: bad value

2020-12-08 Thread STINNER Victor
New submission from STINNER Victor : aarch64 Fedora Rawhide LTO + PGO 3.8: https://buildbot.python.org/all/#/builders/528/builds/243 /usr/bin/ld: /lib64/libgcc_s.so.1: .gnu.version_r invalid entry /usr/bin/ld: /lib64/libgcc_s.so.1: error adding symbols: bad value collect2: error: ld returned 1

[issue42597] Improve documentation of locals() w.r.t. "free variables" vs. global variables

2020-12-08 Thread Dominik V.
New submission from Dominik V. : The documentation of locals() mentions that: > Free variables are returned by locals() when it is called in function blocks > [...] The term "free variable" is defined in the documentation about the execution model

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-08 Thread Michael Felt
Michael Felt added the comment: Looking at https://github.com/python/cpython/pull/22088/files imho: the patch forced Windows behavior ("""Initialize the module as appropriate for NT""") to be equivalent to vars['SO'] - which is what the test used to compare. So, likely the change to the

[issue42561] better error reporting in ast

2020-12-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: This is a duplicate of issue 28964 -- nosy: +BTaskaya ___ Python tracker ___ ___

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-08 Thread Michael Felt
Michael Felt added the comment: On Windows - in distutils (?) did they perhaps make a change only for windows, for whatever reason. I don't have a python3.7 pr a 3.8 handy atm. Not sure what 'distutils' pip updates either - but with py36 and pip 20.2.4 and setuptools 40.6.2 I get: Python

[issue42599] Remove PyModule_GetWarningsModule() in pylifecycle.c

2020-12-08 Thread hai shi
hai shi added the comment: > But it would not harm to document the removal in > https://docs.python.org/dev/whatsnew/3.10.html#id4 section. Copy that. I will update it soon. -- ___ Python tracker

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset b6d98c10fff6f320f8fdf595c3f9a05d8be4e31d by Victor Stinner in branch 'master': bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642) https://github.com/python/cpython/commit/b6d98c10fff6f320f8fdf595c3f9a05d8be4e31d --

[issue31636] test_locale failure on OpenBSD

2020-12-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: -8617 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22561 pull_request: https://github.com/python/cpython/pull/23692 ___ Python tracker ___

[issue42599] Remove PyModule_GetWarningsModule() in pylifecycle.c

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0f91f586ae9b76c3bb44559bd8cd473b1b8de5ff by Hai Shi in branch 'master': bpo-42599: Remove useless PyModule_GetWarningsModule() (GH-23691) https://github.com/python/cpython/commit/0f91f586ae9b76c3bb44559bd8cd473b1b8de5ff --

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: > static int loaded = 0; I would like to limit an extension to once instance *per interpreter*. See the atexit module for an example. -- ___ Python tracker

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset f0e42ae03c41ec32fcb3064772f46ff7f2c5ff3b by Victor Stinner in branch '3.9': bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642) (GH-23692) https://github.com/python/cpython/commit/f0e42ae03c41ec32fcb3064772f46ff7f2c5ff3b --

[issue42599] Remove PyModule_GetWarningsModule() in pylifecycle.c

2020-12-08 Thread Petr Viktorin
Petr Viktorin added the comment: When was the visibility changed to hidden? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42601] [doc] add more examples and additional explanation to re.sub

2020-12-08 Thread Harvastum
New submission from Harvastum : This entire page: https://docs.python.org/3.10/library/re.html does not have a single occurrence of the word "lambda". In my humble opinion it's a pretty important trick to utilize capture groups in lambdas to e.g. use them to access value in a dictionary.

[issue41910] Document that object.__eq__ implements `a is b`

2020-12-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +22562 pull_request: https://github.com/python/cpython/pull/23695 ___ Python tracker ___

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40652] Test test_locale failed when running cpython test on Windows 10 x64 for version 3.9.0a6+

2020-12-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [Windows] locale.getdefaultlocale() issues on Windows: test_locale.test_getsetlocale_issue1813() ___ Python tracker

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-08 Thread Hynek Schlawack
New submission from Hynek Schlawack : This is something I've been procrastinating on for almost a year and working around it using my own version of asyncio.Condition because I wasn't sure how to describe it. So here's my best take: Consider the following code: ``` import asyncio async

[issue25191] test_getsetlocale_issue1813 failed on OpenBSD

2020-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem with this patch is that the second assert is the point of the test. Do get/set_locale work in the TR locale? Although this issue came first, I am closing it as a duplicate of #37945 as the latter has extensive, but to date inconclusive,

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22563 pull_request: https://github.com/python/cpython/pull/23696 ___ Python tracker ___

[issue42599] Remove PyModule_GetWarningsModule() in pylifecycle.c

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: It's not part of the C API and it's no longer exported in libpython since we (the default visibility was changed to "hidden"). IMHO it's safe to remove the function. But it would not harm to document the removal in

[issue31636] test_locale failure on OpenBSD

2020-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR-9178 was for #31608. I corrected the PR and unlinked it from here. This is a duplicate of #25191, with proposed patch. #37945 is the same issue for Windows, with extensive discussion. -- nosy: +terry.reedy resolution: -> duplicate stage: patch

[issue37945] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails

2020-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: This seemingly useless test is the only test failure for me with installed 3.9.1. Why keep it, at least on Windows. The failure with "locale.Error: unsupported locale setting" is not limited to Windows. #25191 and duplicate #31636 report the same error on

[issue42598] Some configure checks rely on implicit function declaration

2020-12-08 Thread Joshua Root
Change by Joshua Root : -- keywords: +patch pull_requests: +22558 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23690 ___ Python tracker ___

[issue42599] Remove PyModule_GetWarningsModule() in pylifecycle.c

2020-12-08 Thread hai shi
New submission from hai shi : PyModule_GetWarningsModule() of pylifecycle.c is useless when _warning module was converted to a builtin module in 2.6. So move it directly now is OK. -- components: Interpreter Core messages: 382727 nosy: petr.viktorin, shihai1991, vstinner priority:

[issue41617] __builtin_bswap16 is used without checking it is supported

2020-12-08 Thread Joshua Root
Joshua Root added the comment: Confirmed fixed in 3.9.1 and 3.10.0a3. Thanks Victor! -- ___ Python tracker ___ ___

[issue31608] crash in methods of a subclass of _collections.deque with a bad __new__()

2020-12-08 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +22560 pull_request: https://github.com/python/cpython/pull/9178 ___ Python tracker ___

[issue41617] __builtin_bswap16 is used without checking it is supported

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: > Confirmed fixed in 3.9.1 and 3.10.0a3. Thanks Victor! Wt! -- ___ Python tracker ___ ___

[issue42598] Some configure checks rely on implicit function declaration

2020-12-08 Thread Joshua Root
New submission from Joshua Root : There are several cases in the configure script of exit being used without including stdlib.h, and one case of close being used without including unistd.h. A compiler that does not allow implicit function declaration, such as clang in Xcode 12, will error

[issue42599] Remove PyModule_GetWarningsModule() in pylifecycle.c

2020-12-08 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +22559 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23691 ___ Python tracker ___

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-08 Thread Petr Viktorin
Petr Viktorin added the comment: Is it really necessary to add a slot/flag for this? It can be done in about 10 lines as below, without complications like a global (or per-interpreter) registry of singleton modules. Are there many modules that need to be per-interpreter singletons, but may be

[issue42599] Remove PyModule_GetWarningsModule() in pylifecycle.c

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: > When was the visibility changed to hidden? In Python 3.9: commit 0b60f64e4343913b4931dc27379d9808e5b78fe1 Author: Vinay Sajip Date: Tue Oct 15 08:26:12 2019 +0100 bpo-11410: Standardize and use symbol visibility attributes across POSIX and

[issue41910] Document that object.__eq__ implements `a is b`

2020-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 4aa67853cc7d6ed4f9ebb726ceaa2c89f9feabda by Terry Jan Reedy in branch 'master': bpo-41910: move news entry (GH-23695) https://github.com/python/cpython/commit/4aa67853cc7d6ed4f9ebb726ceaa2c89f9feabda --

[issue41559] Add support for PEP 612 to typing.py

2020-12-08 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 1.0 -> 2.0 pull_requests: +22569 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23702 ___ Python tracker

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-08 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42572] Better path handling with argparse

2020-12-08 Thread paul j3
paul j3 added the comment: The pathlib.Path is new since I paid much attention to os matters (I cut my teeth on py2.5). Off hand it looks like the user could import pathlib parser.add_argument('-p', type=pathlib.Path) to convert a string into a Path object. A custom type function

[issue41910] Document that object.__eq__ implements `a is b`

2020-12-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +22564 pull_request: https://github.com/python/cpython/pull/23697 ___ Python tracker ___

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-08 Thread Petr Viktorin
Petr Viktorin added the comment: Are there any other examples? In my view, atexit is very special, and very closely tied to interpreter. I don't think it's good to design general API for one module. -- ___ Python tracker

[issue42602] seekable() returns True on pipe objects in Windows

2020-12-08 Thread Myungbae Son
New submission from Myungbae Son : >>> import os >>> r, w = os.pipe() >>> os.lseek(w, 10, 0) 10 >>> wf = open(w, 'w') >>> wf.seekable() True This happens on Windows. Consequently seek() works for these objects but they seems to be no-op. This may confuse libraries that depend on seeking. The

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-08 Thread Dong-hee Na
Dong-hee Na added the comment: > another solution is to move the "module state" into the interpreter, I am +1 on this solution if this module is a very special case. -- ___ Python tracker

[issue41910] Document that object.__eq__ implements `a is b`

2020-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset b947b305a6833cc059214d5bdd2065edd65024c4 by Terry Jan Reedy in branch '3.8': [3.8] bpo-41910: move news entry (GH-23698) https://github.com/python/cpython/commit/b947b305a6833cc059214d5bdd2065edd65024c4 --

[issue41910] Document that object.__eq__ implements `a is b`

2020-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset a3a4bf3b8dc79e4ec4f24f59bd1e9e2a75229112 by Terry Jan Reedy in branch '3.9': [3.9] bpo-41910: move news entry (GH-23697) https://github.com/python/cpython/commit/a3a4bf3b8dc79e4ec4f24f59bd1e9e2a75229112 --

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22567 pull_request: https://github.com/python/cpython/pull/23700 ___ Python tracker ___

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22568 pull_request: https://github.com/python/cpython/pull/23701 ___ Python tracker ___

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 ___ Python tracker ___

[issue41910] Document that object.__eq__ implements `a is b`

2020-12-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +22565 pull_request: https://github.com/python/cpython/pull/23698 ___ Python tracker ___

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: I'm not 100% sure that preventing to create multiple module instances is needed. For the atexit module, another solution is to move the "module state" into the interpreter, as it has been done for other modules like _warnings. --

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset b5cf308de8b19bf8f77053013f7e8a944159e1aa by Victor Stinner in branch '3.8': bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642) (GH-23692) (GH-23696) https://github.com/python/cpython/commit/b5cf308de8b19bf8f77053013f7e8a944159e1aa

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thanks for the fix and backports! -- resolution: fixed -> stage: resolved -> patch review status: closed -> open versions: +Python 3.7 ___ Python tracker

[issue42602] seekable() returns True on pipe objects in Windows

2020-12-08 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Yes, despite that MSVCRT knows the type of the file descriptor because it calls GetFileType() on its creation, it doesn't check it in lseek() implementation and simply calls SetFilePointer(), which spuriously succeeds for pipes. MSDN says the following[1]:

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-08 Thread hai shi
hai shi added the comment: > another solution is to move the "module state" into the interpreter, OK, I am agree victor's solution too. It's a more simpler way. -- ___ Python tracker

[issue42111] Make the xxlimited module an example of best extension module practices

2020-12-08 Thread miss-islington
miss-islington added the comment: New changeset c168b5078f88874b9acd993ac886f82269c780dd by Petr Viktorin in branch 'master': bpo-42111: Make the xxlimited module an example of best extension module practices (GH-23226)

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: It's now fixed in 3.8, 3.9 and master branches. Thanks for the bug report tianjg. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 ___ Python tracker

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-08 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +22566 pull_request: https://github.com/python/cpython/pull/23699 ___ Python tracker ___

[issue42603] Tkinter: pkg-config is not used to get location of tcl and tk headers/libraries

2020-12-08 Thread Manolis Stamatogiannakis
New submission from Manolis Stamatogiannakis : This is indirectly related to 42541: If pkg-config settings are honoured, it is made easier to compile Python against a modern version of TCL/TK. -- components: Tkinter messages: 382756 nosy: m000 priority: normal severity: normal status:

[issue42603] Tkinter: pkg-config is not used to get location of tcl and tk headers/libraries

2020-12-08 Thread E. Paine
Change by E. Paine : -- components: +Build nosy: +epaine, serhiy.storchaka type: compile error -> enhancement versions: -Python 3.8, Python 3.9 ___ Python tracker ___

[issue42572] Better path handling with argparse

2020-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: The more I think about this, the more I think it shouldn't be in the stdlib. paul.j3 is correct that the simple case is just type=pathlib.Path. For something more adventurous you could start with: @dataclass(eq=True, frozen=True) class ArgumentPath:

[issue24110] zipfile.ZipFile.write() does not accept bytes arcname

2020-12-08 Thread Irit Katriel
Irit Katriel added the comment: That part of the documentation was updated here by Serhiy: https://github.com/python/cpython/pull/10592 -- nosy: +iritkatriel ___ Python tracker

[issue41907] Regression in IntFlag behaviour in f-string

2020-12-08 Thread Ethan Furman
Ethan Furman added the comment: New changeset 14eaa7d75282d8458455c41e9e871c56db8b9a10 by Miss Islington (bot) in branch '3.9': bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) (GH-23703) https://github.com/python/cpython/commit/14eaa7d75282d8458455c41e9e871c56db8b9a10

[issue41907] Regression in IntFlag behaviour in f-string

2020-12-08 Thread Ethan Furman
Ethan Furman added the comment: New changeset cbfcc67170d459bcf3e9d63d2f44eadec740bf69 by Miss Islington (bot) in branch '3.8': bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) (GH-23704) https://github.com/python/cpython/commit/cbfcc67170d459bcf3e9d63d2f44eadec740bf69

[issue42572] Better path handling with argparse

2020-12-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Agreed that we should not include new functionality here and instead just update the docs to show what can currently be done. I'll write-up a documentation patch for this. -- assignee: -> rhettinger components: +Documentation -Library (Lib)

[issue41907] Regression in IntFlag behaviour in f-string

2020-12-08 Thread Ethan Furman
Ethan Furman added the comment: New changeset 37440eef7f9a0c27e13fc9ce0850574bb00688b0 by Ethan Furman in branch 'master': bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) https://github.com/python/cpython/commit/37440eef7f9a0c27e13fc9ce0850574bb00688b0 --

[issue41907] Regression in IntFlag behaviour in f-string

2020-12-08 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41559] Add support for PEP 612 to typing.py

2020-12-08 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for working on this -- let me know when you have a question for me. Once this is ready we should also add it to the typing_extensions module so people can use it on older Python versions.

[issue41907] Regression in IntFlag behaviour in f-string

2020-12-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +22570 pull_request: https://github.com/python/cpython/pull/23703 ___ Python tracker

[issue41907] Regression in IntFlag behaviour in f-string

2020-12-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +22571 pull_request: https://github.com/python/cpython/pull/23704 ___ Python tracker ___

[issue42603] Tkinter: pkg-config is not used to get location of tcl and tk headers/libraries

2020-12-08 Thread Manolis Stamatogiannakis
Manolis Stamatogiannakis added the comment: I already have a patch to fix this. Waiting for my CLA to be registered before creating a PR. -- ___ Python tracker ___

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22573 pull_request: https://github.com/python/cpython/pull/23709 ___ Python tracker ___

[issue42572] Better path handling with argparse

2020-12-08 Thread paul j3
paul j3 added the comment: One caution - the type parameter is a callable (function) that takes one string as argument. I proposed `pathlib.Path` because it does that, returning a Path object. It's a class instance creator. I believe the module has other class initiators. bool() has

[issue42569] Callers of _Py_fopen/_Py_wfopen may be broken after addition of audit hooks

2020-12-08 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Great approach :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42604] EXT_SUFFIX too short on FreeBSD and AIX

2020-12-08 Thread mattip
Change by mattip : -- keywords: +patch pull_requests: +22572 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23708 ___ Python tracker ___

[issue41439] test_uuid.py and test_ssl.py failure on OSes without os.fork (VxWorks RTOS)

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: Thanks Peixing Xin, I merged your fix. Terry: > I could merge and backport I don't think that it's worth it to backport to 3.9: Python 3.9 doesn't support VxWorks. I prefer to only merge VxWorks changes in the master branch. Terry: > We do not put

[issue41443] some test cases in test_posix.py fail if some os attributes are not supported

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset eb7594f85741ef809b1ee337ee3431df20e6f8bb by pxinwr in branch 'master': bpo-41443: Add more attribute checking in test_posix (GH-21688) https://github.com/python/cpython/commit/eb7594f85741ef809b1ee337ee3431df20e6f8bb -- nosy:

[issue41443] some test cases in test_posix.py fail if some os attributes are not supported

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

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22574 pull_request: https://github.com/python/cpython/pull/23711 ___ Python tracker ___

[issue41559] Add support for PEP 612 to typing.py

2020-12-08 Thread Ken Jin
Ken Jin added the comment: I have a one question: Should ParamSpec be treated as a type of TypeVar? This mostly pertains to adding it to __parameters__ of generic aliases. Type substitution/chaining, seems inappropiate for it right now. Thanks for your help! --

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: > pyside2 https://bugzilla.redhat.com/show_bug.cgi?id=1898974 I proposed a fix upstream: https://bugreports.qt.io/browse/PYSIDE-1436 I also wrote a fix in Fedora: https://src.fedoraproject.org/rpms/python-pyside2/pull-request/7 The issue is now tracked in

[issue42572] Better path handling with argparse

2020-12-08 Thread Austin Scola
Austin Scola added the comment: I think that type=pathlib.Path is probably all that I was looking for here. I was unaware types could be passed easily like that and so updated documentation would definitely be helpful. The predicates such as existence would just have been nice-to-haves, but

[issue41625] Add splice() to the os module

2020-12-08 Thread Michael Felt
Michael Felt added the comment: Sorry Victor - family matters - so I was not watching for several days. -- ___ Python tracker ___

[issue42604] EXT_SUFFIX too short on FreeBSD and AIX

2020-12-08 Thread mattip
New submission from mattip : Continuation of bpo 39825, this time for FreeBSD and AIX. As commented there, the test added in the fix to 39825 fails on FreeBSD and AIX: FAIL: test_EXT_SUFFIX_in_vars (test.test_sysconfig.TestSysConfig)

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 815506d852daabc40e14ff0987c1142c0205fbe7 by Victor Stinner in branch 'master': bpo-32381: Rewrite PyErr_ProgramText() (GH-23700) https://github.com/python/cpython/commit/815506d852daabc40e14ff0987c1142c0205fbe7 --

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset fe6e5e7cfd68eeaa69fd1511f354a1b4d8d90990 by Victor Stinner in branch 'master': bpo-35134: Add Include/cpython/pythonrun.h file (GH-23701) https://github.com/python/cpython/commit/fe6e5e7cfd68eeaa69fd1511f354a1b4d8d90990 --

[issue41439] test_uuid.py and test_ssl.py failure on OSes without os.fork (VxWorks RTOS)

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 98a54171932584883cb3973f78dd30f92d7a3a78 by pxinwr in branch 'master': bpo-41439: Skip test_ssl and test_uuid tests if fork() is not supported (GH-21684) https://github.com/python/cpython/commit/98a54171932584883cb3973f78dd30f92d7a3a78

[issue41442] test_posix.PosixTester.test_getgroups fail on operating systems without supporting unix shell

2020-12-08 Thread STINNER Victor
Change by STINNER Victor : -- superseder: -> Python should support VxWorks RTOS ___ Python tracker ___ ___ Python-bugs-list

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 550e4673be538d98b6ddf5550b3922539cf5c4b2 by Victor Stinner in branch 'master': bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709) https://github.com/python/cpython/commit/550e4673be538d98b6ddf5550b3922539cf5c4b2 --

[issue42569] Callers of _Py_fopen/_Py_wfopen may be broken after addition of audit hooks

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 23711 (for bpo-32381) which removes half of the problem: it removes _Py_fopen() :-) -- ___ Python tracker ___

[issue42606] Support POSIX atomicity guarantee of O_APPEND on Windows

2020-12-08 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : On POSIX-conforming systems, O_APPEND flag for open() must ensure that no intervening file modification occurs between changing the file offset and the write operation[1]. In effect, two processes that independently opened the same file with O_APPEND

[issue42606] Support POSIX atomicity guarantee of O_APPEND on Windows

2020-12-08 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +22575 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23712 ___ Python tracker ___

[issue42607] raw strings SyntaxError

2020-12-08 Thread 安迷
New submission from 安迷 : [test@test ~]# python3 -c 'print(r"\n")' \n [test@test ~]# python3 -c 'print(r"n\")' File "", line 1 print(r"n\") ^ SyntaxError: EOL while scanning string literal -- components: Windows messages: 382785 nosy: anmikf, paul.moore, steve.dower,

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: > bitarray https://bugzilla.redhat.com/show_bug.cgi?id=1897536 I created https://github.com/ilanschnell/bitarray/pull/109 -- ___ Python tracker

[issue42605] dir_util.copy_tree crashes if folder it previously created is removed

2020-12-08 Thread Aleksey Vlasenko
New submission from Aleksey Vlasenko : Minimal example: import os import shutil from distutils import dir_util shutil.rmtree('folder1') os.makedirs('folder1/folder2/folder3/') with open('folder1/folder2/folder3/data.txt', 'w') as fp: fp.write('hello')

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-12-08 Thread STINNER Victor
STINNER Victor added the comment: > boost https://bugzilla.redhat.com/show_bug.cgi?id=1896382 I proposed https://github.com/boostorg/python/pull/330 fix. See also https://github.com/boostorg/python/pull/329 -- ___ Python tracker

  1   2   >