[issue45417] Enum creation non-linear in the number of values

2021-10-15 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman stage: patch review -> backport needed versions: -Python 3.9 ___ Python tracker ___

[issue45488] Powershell Commands no Longer Recognised

2021-10-15 Thread The Guy
New submission from The Guy : I am using pyinstaller to port my python programs into windows executables so that I can distribute them among my friends, and I recently assigned python to my windows PATH (I'm still not 100% sure what that means so idk if im even saying that right) and now a

[issue45490] [meta][C API] Avoid C macro pitfalls and usage of static inline functions

2021-10-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Meta comment :-) ... wouldn't it be better to enable the Github wiki feature for such collections ? -- nosy: +lemburg ___ Python tracker

[issue45427] importlib.readers.MultiplexedPath

2021-10-15 Thread Filipe Laíns
Filipe Laíns added the comment: The Traversable protocol does not guarantee you access to the file-system path. pathlib.Path happens to give you that information, but other traversables are not required to. The main reasoning for this is that traversables do not need to exist on the

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2021-10-15 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45442] Update `Virtual Environment` tutorial

2021-10-15 Thread miss-islington
miss-islington added the comment: New changeset 11b2ae7f5bc0e7ebbfe944bb746a0b3dfcd7ff43 by srinivasan in branch 'main': bpo-45442: Add deactivate step to venv tutorial. (GH-28981) https://github.com/python/cpython/commit/11b2ae7f5bc0e7ebbfe944bb746a0b3dfcd7ff43 -- nosy:

[issue45488] Powershell Commands no Longer Recognised

2021-10-15 Thread Eryk Sun
Eryk Sun added the comment: This tracker is for issues with the Python language and standard library. You can ask for help with configuration problems on the Users discussion forum: https://discuss.python.org/c/users/7 -- nosy: +eryksun resolution: -> not a bug stage: -> resolved

[issue45445] Fail if an invalid -X option is provided

2021-10-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I'm opening this again as, this is still not finished as we want to still extend the initialization API to allow a non static string to improve the error message. In general, the protocol is to ask if there is something else to be done before

[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf
Freek de Kruijf added the comment: When I try it in a few lines, there is no problem. So it is an issue in this bigger context with class definitions. In the few lines type(a[0]) reports ; in the bigger context type(a[0]) reports . I have no idea how to reduce this issue in a few lines. It

[issue45444] test.test_concurrent_futures fail in x86_ 64 architecture

2021-10-15 Thread tongxiaoge
tongxiaoge added the comment: I use the Linux operating system (openeuler), kernel version 4.19.90, GCC version 7.3.0. I directly run the following statement in the virtual machine: 1、python3 Lib/test/test_concurrent_futures.py 2、python3 -m test test_concurrent_futures The test cases are

[issue45475] gzip fails to read a gzipped file (ValueError: readline of closed file)

2021-10-15 Thread Inada Naoki
Inada Naoki added the comment: >>> ll = [l for l in gzip.GzipFile(filename='data/UTF-8-test_for_gzip.txt.gz')] This is bad code pattern because you don't close the file explicitly. Actually, the error caused by the optimization thet iter(GzipFile) returns underlaying faster iterator that

[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Eric V. Smith
Eric V. Smith added the comment: If you want us to check if there's a bug in Python here, please reduce this to 5 or 10 lines, with no external dependencies. As it is, we cannot run this code. You also need to show how you run the program, what version of Python you're using, and what

[issue45491] help() is too noisy for types used like functions

2021-10-15 Thread Raymond Hettinger
New submission from Raymond Hettinger : When someone requests help(range), help(zip), help(property), or help(classmethod), the expectation and need is to see something like what is shown in main documentation rather than being subjected to a listing of every standard dunder method. It

[issue45131] `venv` → `ensurepip` may read local `setup.cfg` and fail mysteriously

2021-10-15 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +dstufft, ncoghlan, pradyunsg ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35081] Move internal headers to Include/internal/

2021-10-15 Thread Eric Snow
Eric Snow added the comment: On Fri, Oct 15, 2021 at 3:56 AM STINNER Victor wrote: > New changeset 063abd931f064a4b6b478b0b6e9aa13ee38d2cff by Victor Stinner in > branch 'main': > bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969) FYI, _xxsubinterpretersmodule is supposed

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-15 Thread Eric Snow
Eric Snow added the comment: @MAL, who's maintaining Tools/freeze? I'm not aware of who's using it (other than you, of course). It looks like PyRun isn't compatible with anything newer than 3.5, so it seems like that isn't verifying that Tools/freeze still works. Neither does it have

[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf
Freek de Kruijf added the comment: The python program is called from a surrounding system called domoticz. I will include the python program. -- Added file: https://bugs.python.org/file50360/plugin.py ___ Python tracker

[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf
Freek de Kruijf added the comment: About what version of Python is used, I don't know. Both 2.7.18 and 3.6.12 are installed. I use the program on a Raspberry Pi 4B with openSUSE Leap 15.3. -- ___ Python tracker

[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf
Freek de Kruijf added the comment: The content of a[0] is something like '2021-10-15T15:02:11.486' -- ___ Python tracker ___ ___

[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Eric V. Smith
Eric V. Smith added the comment: It sounds like you're using python 2.7, which is unsupported. You've not even shown us what line produces the error you're seeing. I don't see "type(a[0])" anywhere in the code you posted. Lacking a way to reproduce this on our own with python 3.x, I'm going

[issue45465] logging messages are needlessly reformatted for every handler

2021-10-15 Thread Роман Донченко
Роман Донченко added the comment: But message formatting is controlled by the record, not by the handler. The same record will always be formatted the same way (assuming that getMessage is deterministic, which seems like a fair assumption). -- ___

[issue45465] logging messages are needlessly reformatted for every handler

2021-10-15 Thread Vinay Sajip
Vinay Sajip added the comment: Oh, I see what you mean now - I was thinking of the overall message formatted using a formatter. However, filters can still change a record's attributes and getMessage() could behave differently on different calls because of this. Changing things in this area

[issue45444] test.test_concurrent_futures fail in x86_ 64 architecture

2021-10-15 Thread tongxiaoge
tongxiaoge added the comment: I compared the log and found that test_socket.HAVE_SOCKET_QIPCRTR is false in x86_ 64, and the value is true in the build log on the aarch64 architecture. I don't know whether it is related to this value. -- Added file:

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

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27256 pull_request: https://github.com/python/cpython/pull/28968 ___ Python tracker ___

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-15 Thread Jonas H.
Jonas H. added the comment: I agree with your statement in principle. Here are numbers for the slowdown that's introduced: Without the change: ./python.exe -m timeit -s 'import re'\n'[re.compile(f"fill_cache{i}") for i in range(512)]'\n'pat = re.compile(".")' 're.match(pat, "asdf")'

[issue45479] clean up Py_UniversalNewlineFgets

2021-10-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 9ce9cfe595d64e3081e69de7296042cc54bccf18 by Benjamin Peterson in branch 'main': bpo-45479: Futher simplify Py_UniversalNewlineFgets. (GH-28967) https://github.com/python/cpython/commit/9ce9cfe595d64e3081e69de7296042cc54bccf18 --

[issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.

2021-10-15 Thread Dong-hee Na
Dong-hee Na added the comment: I will send this patch file, when I apply this patch file, my compiler did not raise _POSIX_C_SOURCE issue. (gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)) CPython affects - xmltok.c - xmlrole.c (Not yet applied to CPython code) Not affected - xmlfile.c

[issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.

2021-10-15 Thread Dong-hee Na
Dong-hee Na added the comment: Please take a look at the patch file that it will be okay to CPython code base :) -- ___ Python tracker ___

[issue44105] tempfile.TemporaryDirectory deleted after sleep in threads

2021-10-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45481] gc is disabled without explict calling gc.disable()

2021-10-15 Thread EricLin
New submission from EricLin : First, I would like to clarify that this is a Python 2.7.5 issue. I know python2 is no longer maintained, but I still wish to look for some help here. We have observed a long running Python 2.7.5 process leaking memory. I tried to inject some code into the

[issue35081] Move internal headers to Include/internal/

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue since there is still activity on it. -- resolution: fixed -> status: closed -> open ___ Python tracker ___

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

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8e5de40f90476249e9a2e5ef135143b5c6a0b512 by Victor Stinner in branch 'main': bpo-35134: Move classobject.h to Include/cpython/ (GH-28968) https://github.com/python/cpython/commit/8e5de40f90476249e9a2e5ef135143b5c6a0b512 --

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And compare it with pat.match("asdf"). If the performance is critical, use methods of pre-compiled patterns. -- ___ Python tracker ___

[issue45084] urllib.parse: remove deprecated functions (splittype, to_bytes, etc.)

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: pip uses deprecated functions indirectly: https://github.com/python/cpython/pull/28115 Python 3.11 seems to be too early to *remove* functions. We can attempt again in the next Python release ;-) -- resolution: -> postponed stage: patch review ->

[issue35081] Move internal headers to Include/internal/

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27257 pull_request: https://github.com/python/cpython/pull/28969 ___ Python tracker ___

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
New submission from STINNER Victor : Python has a types.SimpleNamespace type which is convenient to cheap a "simple namespace". I propose to make its C API public (but exclude it from the limited C API): add PySimpleNamespace_New() function. It's currently used in: * Modules/timemodule.c:

[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-15 Thread Petr Viktorin
Petr Viktorin added the comment: Just note that these were *not* part of the limited API, which is defined in Misc/stable_abi.txt rather than the #ifdefs: https://docs.python.org/3.10/c-api/stable.html#stable If they were, the functions would need to remain in the stable ABI. --

[issue45480] Missing link(s) to the "Python Module Index" page

2021-10-15 Thread Eric V. Smith
Eric V. Smith added the comment: I think https://github.com/python/pythondotorg/issues is the correct place to report issues with the web site. -- nosy: +eric.smith ___ Python tracker

[issue45481] gc is disabled without explict calling gc.disable()

2021-10-15 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry, but since this is a 2.7 issue, I'm going to close it here. I know this isn't the answer you wanted, but this is really the wrong venue. I suggest you ask on StackOverflow or the python-list mailing list

[issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.

2021-10-15 Thread Dong-hee Na
Dong-hee Na added the comment: Related PRs - https://github.com/python/cpython/commit/d413c503636cde2a6ab0ada25dccb0134633a8e6 by Dong-hee - https://github.com/python/cpython/commit/8177404d520e81f16324a900f093adf3856d33f8 by Pablo -

[issue45434] [C API] Clean-up the Python.h header file

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45480] Missing link(s) to the "Python Module Index" page

2021-10-15 Thread Mark Summerfield
New submission from Mark Summerfield : I mostly use the Python 3.8 docs since that's the Python I use. However, when I tried using the 3.9 and 3.10 docs I found that the top of each page has a long search bar (presumably for mobile devices?) but _no_ link to the python module index. I find

[issue45477] configure script cannot detect float word ordering on linux

2021-10-15 Thread Christian Heimes
Christian Heimes added the comment: Python uses the AX_C_FLOAT_WORDS_BIGENDIAN macro from autoconf-archive to detect byte order of floats. You can find the code at https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html . Please attach your config.log file and the

[issue45475] gzip fails to read a gzipped file (ValueError: readline of closed file)

2021-10-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This might be related to below commit : commit d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e Author: Inada Naoki Date: Tue Apr 13 13:51:49 2021 +0900 bpo-43787: Add __iter__ to GzipFile, BZ2File, and LZMAFile (GH-25353) python -m gzip

[issue45490] [meta][C API] Avoid C macro pitfalls and usage of static inline functions

2021-10-15 Thread STINNER Victor
New submission from STINNER Victor : C macros are really cool and useful, but there are a bunch of pitfalls which are better to avoid: https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html Some macros of the Python C API have been converted to static inline functions over the last years. It

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-45490: "[meta][C API] Avoid C macro pitfalls and usage of static inline functions" to discuss macros and static inline functions more generally. -- ___ Python tracker

[issue12872] --with-tsc crashes on ppc64

2021-10-15 Thread Irit Katriel
Change by Irit Katriel : -- stage: patch review -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x

2021-10-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +27271 pull_request: https://github.com/python/cpython/pull/28984 ___ Python tracker ___

[issue45379] Improve errors related to frozen modules.

2021-10-15 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45486] Stop using internal APIs in _xxsubinterpretersmodule.c.

2021-10-15 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45427] importlib.readers.MultiplexedPath

2021-10-15 Thread Filipe Laíns
Filipe Laíns added the comment: *realize I did *not* point this out :facepalm: sorry! -- ___ Python tracker ___ ___

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27272 pull_request: https://github.com/python/cpython/pull/28986 ___ Python tracker ___

[issue43139] test_ttk test_compound, test_tk test_type fail with Tk 8.6.11.1

2021-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See PR 6578. We already faced a similar problem when test_winfo_rgb was added. We finally found test colors which behave consistently on all tested platforms. But it turns out that not on all. -- ___ Python

[issue42222] Modernize integer test/conversion in randrange()

2021-10-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +27270 pull_request: https://github.com/python/cpython/pull/28983 ___ Python tracker ___

[issue45489] ForwardRef does not support | operator

2021-10-15 Thread Bobbey Reese
New submission from Bobbey Reese : Not positive this is a bug, but it seems like ForwardRef should support the pipe (|) operator for indicating Unions in Python 3.10: Python 3.10.0 (default, Oct 4 2021, 22:09:55) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more

[issue45427] importlib.readers.MultiplexedPath

2021-10-15 Thread Filipe Laíns
Filipe Laíns added the comment: Just to clarify, as I realize I did point this out in my reply, Traversable[1][2] is the protocol that objects returned by importlib.resources.files implement. [1] https://docs.python.org/3/library/importlib.html#importlib.abc.Traversable [2]

[issue45445] Fail if an invalid -X option is provided

2021-10-15 Thread Filipe Laíns
Change by Filipe Laíns : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.11 ___ Python tracker ___

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 00ffc4513df7b89a168e88da4d1e3ac367f7682f by Victor Stinner in branch 'main': bpo-45440: Remove pymath.c fallbacks (GH-28977) https://github.com/python/cpython/commit/00ffc4513df7b89a168e88da4d1e3ac367f7682f --

[issue30459] PyList_SET_ITEM could be safer

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 51f8196d05f0e271358eee0f90fe044b20449fb5 by Victor Stinner in branch 'main': bpo-30459: Use (void) in macros setting variables (GH-28982) https://github.com/python/cpython/commit/51f8196d05f0e271358eee0f90fe044b20449fb5 --

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: I created this issue while cleaning the C API. I'm not fully convinced that PySimpleNamespace_New() must be made public. The other choice is to move the function to the internal C API. -- ___ Python tracker

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-15 Thread E. Paine
E. Paine added the comment: Would it make sense, since this issue pretty much makes IDLE officially support .pyi files, to add the "Edit with IDLE" menu when right-clicking on a .pyi file in Windows explorer? -- ___ Python tracker

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread Gareth Rees
Gareth Rees added the comment: If the problem is accidental use of the result of PyFloat_AS_DOUBLE() as an lvalue, why not use the comma operator to ensure that the result is an rvalue? The C99 standard says "A comma operator does not yield an lvalue" in §6.5.17; I imagine there is similar

[issue45434] [C API] Clean-up the Python.h header file

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 105582e74c1817bc6a9d99bcb6540b34a3367292 by Victor Stinner in branch 'main': bpo-45434: Remove Include/eval.h header file (GH-28973) https://github.com/python/cpython/commit/105582e74c1817bc6a9d99bcb6540b34a3367292 --

[issue44113] [C API] Deprecate legacy API for configure Python initialization

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27262 pull_request: https://github.com/python/cpython/pull/28974 ___ Python tracker ___

[issue44113] [C API] Deprecate legacy API for configure Python initialization

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset a7f8dfd25a167ccfde9996c499fa38a2aba60022 by Victor Stinner in branch 'main': bpo-44113: Move the What's New entry to Deprecate section (GH-28974) https://github.com/python/cpython/commit/a7f8dfd25a167ccfde9996c499fa38a2aba60022 --

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-15 Thread Jonas H.
Jonas H. added the comment: pat.match() has 110 nsec. Feel free to close the issue and PR if you think this isn't worth changing. -- ___ Python tracker ___

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For reference, caching was introduced in b1aa19515ffdb84c6633ee0344196fd8bd50ade0 21 years ago, and initially it checked for pre-compiled patterns before looking up in the cache. But it was changed 2 months later in

[issue45428] py_compile fails to read filenames from stdin

2021-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 59a633d3e2071d65aa6638da5cf767a5c1310271 by Graham Inggs in branch 'main': bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848) https://github.com/python/cpython/commit/59a633d3e2071d65aa6638da5cf767a5c1310271 --

[issue45428] py_compile fails to read filenames from stdin

2021-10-15 Thread miss-islington
Change by miss-islington : -- keywords: +patch nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27259 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28971 ___ Python tracker

[issue32596] Lazy import concurrent.futures.process and thread

2021-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are issues with using global variable as import target? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: > The other choice is to move the function to the internal C API. I created GH-28975 for that. -- ___ Python tracker ___

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-15 Thread jerry chow
Change by jerry chow : -- nosy: +jerrylikerice1s ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45457] Documentation for ssl.load_default_certs is outdated

2021-10-15 Thread jerry chow
Change by jerry chow : -- nosy: +jerrylikerice1s ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45451] IDLE Shell GUI - remove window border

2021-10-15 Thread jerry chow
Change by jerry chow : -- nosy: +jerrylikerice1s ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27258 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28970 ___ Python tracker ___

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I am with Raymond on this one. If "protecting against wrong use" is the only reason to go down the slippery path of starting to rely on compiler optimizations for performance critical operations, the argument is not good enough. If people do use macros

[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: Petr: > Just note that these were *not* part of the limited API, which is defined in > Misc/stable_abi.txt rather than the #ifdefs: > https://docs.python.org/3.10/c-api/stable.html#stable > If they were, the functions would need to remain in the stable ABI.

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: For PyObject, I converted Py_REFCNT(), Py_TYPE() and Py_SIZE() to static inline functions to enforce the usage of Py_SET_REFCNT(), Py_SET_TYPE() and Py_SET_SIZE(). Only a minority of C extensions are affected by these changes. Also, there is more pressure

[issue35081] Move internal headers to Include/internal/

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 063abd931f064a4b6b478b0b6e9aa13ee38d2cff by Victor Stinner in branch 'main': bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969) https://github.com/python/cpython/commit/063abd931f064a4b6b478b0b6e9aa13ee38d2cff --

[issue45445] Fail if an invalid -X option is provided

2021-10-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +27260 pull_request: https://github.com/python/cpython/pull/28972 ___ Python tracker ___

[issue45434] [C API] Clean-up the Python.h header file

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27261 pull_request: https://github.com/python/cpython/pull/28973 ___ Python tracker ___

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 15.10.2021 11:43, STINNER Victor wrote: > Again, I'm not aware of any performance issue caused by short static inline > functions like Py_TYPE() or the proposed PyFloat_AS_DOUBLE(). If there is a > problem, it should be addressed, since Python uses

[issue45465] logging messages are needlessly reformatted for every handler

2021-10-15 Thread Vinay Sajip
Vinay Sajip added the comment: A developer may wish to format messages differently for different audiences (i.e. different handlers) - for example, omit stack traces. This behaviour is by design. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue45445] Fail if an invalid -X option is provided

2021-10-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 79bc5e1dc6f87149240bded3654574b24168f1ac by Pablo Galindo Salgado in branch 'main': bpo-45445: Remove incorrectly commited test file (GH-28972) https://github.com/python/cpython/commit/79bc5e1dc6f87149240bded3654574b24168f1ac

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27263 pull_request: https://github.com/python/cpython/pull/28975 ___ Python tracker ___

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27267 pull_request: https://github.com/python/cpython/pull/28979 ___ Python tracker ___

[issue45473] Enum: add "name" and "value" keywords to call syntax

2021-10-15 Thread Ethan Furman
Ethan Furman added the comment: > Are there any other names that you would contemplate besides `from_name` and > `from_value`? No. > My reading of your response indicates that you are fundamentally opposed to > the addition of class methods, since they would limit the space of possible >

[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf
New submission from Freek de Kruijf : In a piece of code I have pT = datetime.strptime(a[0],"%Y-%m-%dT%H:%M:%S.%f") When I check type(a[0]) I got type(a[0]): not In this case I get: message attribute of type 'NoneType' is not callableTraceback When I use str(a[0]) instead of a[0], the issue

[issue43725] Create a release branch ABI stability regression test

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: > the dump needs to be generated in a docker container using the same compiler > version that is used in the CI I'm not used to docker and I don't know how to get a docker similar than the one used by GitHub Action. Is there a documentation somewhere giving

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 547d26aa08aa5e4ec6e4f8a5587b30b39064a5ba by Victor Stinner in branch 'main': bpo-43760: Add PyThreadState_EnterTracing() (GH-28542) https://github.com/python/cpython/commit/547d26aa08aa5e4ec6e4f8a5587b30b39064a5ba --

[issue45481] gc is disabled without explict calling gc.disable()

2021-10-15 Thread Zachary Ware
Change by Zachary Ware : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes. After this issue is done, we should open a new issue and nosy Steve Dower, who is in charge of that for Windows, and Ned Deily, in case anything should be done on mac. -- ___ Python tracker

[issue43725] Create a release branch ABI stability regression test

2021-10-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I will add something to the devguide explaining how to do it. In any case, the RM should be ideally the one doing this because every potential ABI breakage need to be supervised by the RM (even if is a false positive). --

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: The most straightforward change for macOS is to add “pyi” to the list of extensions in “Mac/IDLE/IDLE.app/Contents/Info.plist”. That way IDLE will be seen as a valid editor for .pyi files. -- nosy: +ronaldoussoren

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: > bpo-43760: Add PyThreadState_EnterTracing() (GH-28542) I created changes to use it: * pythoncapi_compat: https://github.com/pythoncapi/pythoncapi_compat/commit/10fde24739cab4547e9c27c31c8804a25e23e8a0 * Cython: https://github.com/cython/cython/pull/4411 *

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: PyThreadState.cframe.use_tracing format changed again: set value set to 0 or 255. https://github.com/python/cpython/commit/bd627eb7ed08a891dd1356756feb1ce2600358e4 -- ___ Python tracker

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 14.10.2021 22:56, Eric Snow wrote: > > @MAL, what's the best way to make sure Tools/freeze is still working? I > don't see any tests for it in the test suite. I tried running the test in > Tools/freeze/test, but I can't get that to work on main (or

[issue45428] py_compile fails to read filenames from stdin

2021-10-15 Thread miss-islington
miss-islington added the comment: New changeset 2b6eb8149656541044884e76212495175e061a0a by Miss Islington (bot) in branch '3.10': bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848) https://github.com/python/cpython/commit/2b6eb8149656541044884e76212495175e061a0a

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- title: [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions -> [C API] Disallow using PyFloat_AS_DOUBLE() as l-value ___ Python tracker

  1   2   >