[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-05-25 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +24946 pull_request: https://github.com/python/cpython/pull/26354 ___ Python tracker <https://bugs.python.org/issue43

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-01 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +25074 pull_request: https://github.com/python/cpython/pull/26479 ___ Python tracker <https://bugs.python.org/issue43

[issue23903] Generate PC/python3.def by scraping headers

2021-06-01 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 652 (bpo-43795) is now in; I'm closing this issue. A cross-platform C parser/checker would still be an improvement, but the constraints (no external dependencies in CPython) and benefits (not many compared to the goal of strict separation of int

[issue29086] Document C API that is not part of the limited API

2021-06-01 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 652 is now in, and with it a list of everything that *is* in the stable ABI: https://docs.python.org/3.10/c-api/stable.html#contents-of-limited-api I'm closing the issue. -- resolution: -> fixed stage: patch review -> resolved s

[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread Petr Viktorin
Petr Viktorin added the comment: +1, for adding the assertion. It's not trivial to see that env_file must be NULL here, even for me (a human). -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/is

[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset bdb56902a3bfe12b10f85a941d5dd0eae739f1a8 by stratakis in branch 'main': bpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486) https://github.com/python/cpython/commit/bdb56902a3bfe12b10f85a941d5dd0

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-08 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 257e400a19b34c7da6e2aa500d80b54e4c4dbf6f by Petr Viktorin in branch 'main': bpo-43795: Note Stable ABI PEP in What's New (GH-26479) https://github.com/python/cpython/commit/257e400a19b34c7da6e2aa500

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-08 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 75185561a9a3b6dede3ad87bd83bab66847bd425 by Miss Islington (bot) in branch '3.10': bpo-43795: Note Stable ABI PEP in What's New (GH-26479) (GH-26603) https://github.com/python/cpython/commit/75185561a9a3b6dede3ad87bd

[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

2021-06-09 Thread Petr Viktorin
Petr Viktorin added the comment: IMO, the functionality should only be preserved until distutils is removed. So: - distutils.sysconfig.parse_makefile should use TextFile as before, so projects that use it aren't broken *yet* - nothing else should call distutils.sysconfig.parse_makefil

[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

2021-06-11 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset fc98266ff627ba0f56f8ae241245b66bc983baa3 by Lumír 'Frenzy' Balhar in branch 'main': bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637) https://github.com/python/cpython/commit/fc98266ff627ba0f56f8

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Petr Viktorin
Petr Viktorin added the comment: > Can we remove this from the stable API during beta? It was added (to PC/python3.def) in 3.9, so removing in 3.10 beta wouldn't be good. It can be deprecated; should it? -- ___ Python tracker

[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

2021-06-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 2f2ea96c4429b81f491aa1cdc4219ef2fd6d37fb by Miss Islington (bot) in branch '3.10': bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637) (GH-26673) https://github.com/python/cpyt

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 10a5c806d4dec6c342dcc9888fbe4fa1fa9b7a1f by Erlend Egeberg Aasland in branch 'main': bpo-42064: Move sqlite3 types to global state (GH-26537) https://github.com/python/cpython/commit/10a5c806d4dec6c342dcc9888fbe4fa1fa9b7a1f -

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-15 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +25326 pull_request: https://github.com/python/cpython/pull/26740 ___ Python tracker <https://bugs.python.org/issue43

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-16 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 7cad9cb51bdae2144cbab330f13a607ba3471742 by Petr Viktorin in branch 'main': bpo-43795: Don't list private names in the limited API (GH-26740) https://github.com/python/cpython/commit/7cad9cb51bdae2144cbab330f

[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-17 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue1> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38829] Make the function flush_io accessible in the C-API

2021-06-22 Thread Petr Viktorin
Petr Viktorin added the comment: To follow up on the StackOverflow discussion: A call to PyErr_Print should invoke sys.excepthook. Unless sys.excepthook was changed, this should print the message *and* flush standard output. If it doesn't, I recommend investigating why. If that doe

[issue39078] __function.__defaults__ breaks for __init__ of dataclasses with default factory

2021-06-22 Thread Petr Viktorin
Change by Petr Viktorin : -- components: +Library (Lib) -C API ___ Python tracker <https://bugs.python.org/issue39078> ___ ___ Python-bugs-list mailing list Unsub

[issue39123] PyThread_xxx() not available when using limited API

2021-06-22 Thread Petr Viktorin
Petr Viktorin added the comment: In Python 3.10, the functions: PyThread_allocate_lock, PyThread_exit_thread, PyThread_free_lock, PyThread_get_stacksize, PyThread_get_thread_ident, PyThread_get_thread_native_id, PyThread_init_thread, PyThread_release_lock, PyThread_set_stacksize

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2021-06-22 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue39355> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39620] PyObject_GetAttrString and tp_getattr do not agree

2021-06-22 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue39620> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39767] create multiprocessing.SharedMemory by pointing to existing memoryview

2021-06-22 Thread Petr Viktorin
Change by Petr Viktorin : -- components: +Library (Lib) -C API ___ Python tracker <https://bugs.python.org/issue39767> ___ ___ Python-bugs-list mailing list Unsub

[issue40939] Remove the old parser

2021-06-22 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin nosy_count: 11.0 -> 12.0 pull_requests: +25434 pull_request: https://github.com/python/cpython/pull/26855 ___ Python tracker <https://bugs.python.org/issu

[issue40939] Remove the old parser

2021-06-22 Thread Petr Viktorin
Petr Viktorin added the comment: - The removed functions are still listed in the documentation; this is confusing. - `struct _node` is not very usable in the C API, but what I saw in mod_wsgi was giving gave PyParser_* output to PyNode_Compile. I tried to write porting notes for this usage

[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Petr Viktorin
Petr Viktorin added the comment: Please follow the backwards compatibility policy (PEP 387): - Have a discussion - Raise deprecation warnings - Wait at least two minor Python versions where warnings are raised - Consider any feedback - Then remove stuff (Or ask the SC for an exception, but

[issue40939] Remove the old parser

2021-06-24 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 29987f72650b7cccee4df216c8297e8484a44e6a by Petr Viktorin in branch 'main': bpo-40939: Remove documentation for `PyParser_*` & add porting notes (GH-26855) https://github.com/python/cpython/commit/29987f72650b7cccee4df216c8

[issue40939] Remove the old parser

2021-06-28 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset dc10264eb880ed63fcf42c17057f3f5d879a0a0c by Miss Islington (bot) in branch '3.10': bpo-40939: Remove documentation for `PyParser_*` & add porting notes (GH-26855) (GH-26898) https://github.com/python/

[issue25653] ctypes+callbacks+fork+selinux = crash

2021-06-30 Thread Petr Viktorin
Petr Viktorin added the comment: Here's a simpler reproducer. -- nosy: +petr.viktorin Added file: https://bugs.python.org/file50134/y.py ___ Python tracker <https://bugs.python.org/is

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9 by Erlend Egeberg Aasland in branch 'main': bpo-42064: Finalise establishing sqlite3 global state (GH-27155) https://github.com/python/cpython/commit/4c0deb25ac899fbe4da626ce3cb21f

[issue43629] fix _PyRun_SimpleFileObject create __main__ module and cache. Call this function multiple times, the attributes stored in the module dict will affect eachother.

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: The public function that calls _PyRun_SimpleFileObject is PyRun_SimpleStringFlags, and the behavior is as specified in its documentation: "Executes the Python source code from command in the __main__ module according to the flags argument. If __main__

[issue43334] venv does not install libpython

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: A venv does *not* create a replica of a python installation directory. Files shared with the main Python installation are not copied nor linked. This goes for the standard library, as well as the libraries and headers. (*Executables* are an exception; they&#x

[issue44663] Possible bug in datetime utc

2021-07-20 Thread Petr Viktorin
Change by Petr Viktorin : -- components: +Library (Lib) -C API ___ Python tracker <https://bugs.python.org/issue44663> ___ ___ Python-bugs-list mailing list Unsub

[issue42085] Add dedicated slot for sending values

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: Py_TPFLAGS_HAVE_AM_SEND is unnecessary and I'd like to remove it. It is not possible for type objects to have a different layout than the interpreter: - extensions using the regular ABI must be recompiled for each feature version of Python - extensions

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: The bit cannot be repurposed, since older extensions using the stable ABI might set it. It doesn't make much sense to remove the Py_TPFLAGS_HAVE_VERSION_TAG or Py_TPFLAGS_HAVE_FINALIZE defines; I'd let them stay to document that the bits ar

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2021-07-20 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +25805 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27260 ___ Python tracker <https://bugs.python.org/issu

[issue44588] Possible double Py_XDECREF in cpython typeobject.c

2021-07-20 Thread Petr Viktorin
Petr Viktorin added the comment: Please use Py_TPFLAGS_DEFAULT when creating objects. Do you have a reason to not do it? The flag Py_TPFLAGS_HAVE_VERSION_TAG is unneeded and Python should not check for it. There's bpo-42747 open for that already; I sent a PR for it. --

[issue44588] Possible double Py_XDECREF in cpython typeobject.c

2021-07-20 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +25808 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27260 ___ Python tracker <https://bugs.python.org/issu

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

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset c589992e09d0db7cb47d21d5948929e599fdbb94 by Miss Islington (bot) in branch '3.10': bpo-29298: Fix crash with required subparsers without dest (GH-3680) (GH-27303) https://github.com/python/cpython/commit/c589992e09d0db7cb47d21d5948929

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

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 097801844c99ea3916bebe1cc761257ea7083d34 by Miss Islington (bot) in branch '3.9': bpo-29298: Fix crash with required subparsers without dest (GH-3680) (GH-27304) https://github.com/python/cpython/commit/097801844c99ea3916bebe1cc76125

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 632e8a69593efb12ec58d90e624ddf249a7a1b65 by Miss Islington (bot) in branch '3.10': bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) (GH-27306) https://github.com/python/cpyt

[issue44727] Stable ABI should avoid `enum`

2021-07-23 Thread Petr Viktorin
New submission from Petr Viktorin : Adding a new enumerator to a C enum can change the size of the type, which would break the ABI. This is not often a problem in practice, but the rules around when it is a problem and when it isn't are complicated enough that I believe enum should no

[issue44727] Stable ABI should avoid `enum`

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: Devguide PR: https://github.com/python/devguide/pull/730 -- ___ Python tracker <https://bugs.python.org/issue44727> ___ ___

[issue44727] Stable ABI should avoid `enum`

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: As far as I can see, the current enums in the stable ABI are: PySendResult from object.h, return value of PyObject_Send: typedef enum { PYGEN_RETURN = 0, PYGEN_ERROR = -1, PYGEN_NEXT = 1, } PySendResult; (This is unlikely to

[issue41756] Do not always use exceptions to return result from coroutine

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: Hello! This change added an enum to the stable ABI: typedef enum { PYGEN_RETURN = 0, PYGEN_ERROR = -1, PYGEN_NEXT = 1, } PySendResult; Adding new values to enums might break the stable ABI in some (admittedly rare) cases; so

[issue41756] Do not always use exceptions to return result from coroutine

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: that is, bpo-44727 -- ___ Python tracker <https://bugs.python.org/issue41756> ___ ___ Python-bugs-list mailing list Unsub

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2021-07-23 Thread Petr Viktorin
Petr Viktorin added the comment: I usually wait until buildbots are green before closing the bpo, but I don't think there's anything else. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Pyt

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-07-27 Thread Petr Viktorin
Petr Viktorin added the comment: Sorry for the delay; getting 652 into Python 3.10 took up most of my time. So, in the current proposal: - `PyType_GetName(t)` is equivalent to `PyObject_GetAttrString(t, "__name__")` - for the qualified name you can use `PyObject_GetAt

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-07-27 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 890e22957d427ee994b85d62dfe4d5a7cbd34ec5 by Erlend Egeberg Aasland in branch 'main': bpo-42064: Migrate to `sqlite3_create_collation_v2` (GH-27156) https://github.com/python/cpython/commit/890e22957d427ee994b85d62dfe4d5

[issue43377] _PyErr_Display should be available in the CPython-specific API

2021-07-27 Thread Petr Viktorin
Petr Viktorin added the comment: If it should be exposed, it should be renamed to a public (non-underscored) name, like PyErr_DisplayToFile. It should also ideally get documentation and tests (along with PyErr_Display, which is sadly missing those as well). (Also, note that there are no no

[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-07-27 Thread Petr Viktorin
Petr Viktorin added the comment: Since PEP 652, PC/python3dll.c is generated from the stable ABI definition. Checking (i.e. running the tool without --generate) ensures it is up-to-date. -- resolution: -> fixed stage: patch review -> resolved status: open -&g

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

2021-07-27 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43377] _PyErr_Display should be available in the CPython-specific API

2021-07-28 Thread Petr Viktorin
Petr Viktorin added the comment: PyErr_Display (without underscore) is already exposed. This issue is about adding a variant with an additional output file argument. The function formats an exception "just as Python would". The exact output will naturally be different between ver

[issue44769] socketserver.shutdown should stop serve_forever() immediately

2021-07-28 Thread Petr Viktorin
New submission from Petr Viktorin : Currently, socketserver.serve_forever() sets a variable and serve_forever() polls for it, with a configurable interval. A comment in the code already says: # XXX: Consider using another file descriptor or connecting to the # socket to wake this up instead

[issue44769] socketserver.shutdown should stop serve_forever() immediately

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: This isn't a high priority for me, but I have a WIP branch in https://github.com/encukou/cpython/tree/http-server-poll Feel free to continue it if you get to it sooner than I do. -- ___ Python tracker &

[issue44688] [sqlite3] Remove ASCII limitation from sqlite3.Connection.create_collation()

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 5269c091458c5ea76eb625e4fabc9980b6309266 by Erlend Egeberg Aasland in branch 'main': bpo-44688: Remove ASCII limitation from `sqlite3` collation names (GH-27395) https://github.com/python/cpython/commit/5269c091458c5ea76eb625e4fabc99

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: > Can we create PyType_GetDataSlot function to return the data pointer? No, see the borrowed pointer issues above. > I will create another PR after PR-23903 merged. Great, thank you! -- ___ Python tracker

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset a390ebea17a96d1c93fc5f75b1e19916090a4561 by Hai Shi in branch 'main': bpo-42035: Add a PyType_GetName() to get type's short name. (GH-23903) https://github.com/python/cpython/commit/a390ebea17a96d1c93fc5f75b

[issue43565] PyUnicode_KIND macro does not has specified return type

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 47fd4726a2ce8599cc397ddeae40f70eb471e868 by Ammar Askar in branch 'main': bpo-43565: Document PyUnicode_KIND's return type as an unsigned int (GH-25724) https://github.com/python/cpython/commit/47fd4726a2ce8599cc397ddea

[issue43565] PyUnicode_KIND macro does not has specified return type

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset b5bdc0c407d2d0587e591989e390ada9b9709502 by Miss Islington (bot) in branch '3.10': bpo-43565: Document PyUnicode_KIND's return type as an unsigned int (GH-25724) (GH-27439) https://github.com/python

[issue43565] PyUnicode_KIND macro does not has specified return type

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 7922546859e746a0f20f53bc80ce0581b72030aa by Miss Islington (bot) in branch '3.9': bpo-43565: Document PyUnicode_KIND's return type as an unsigned int (GH-25724) (GH-27440) https://github.com/python

[issue43565] PyUnicode_KIND macro does not has specified return type

2021-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: Thank you for your attention to detail! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-08-02 Thread Petr Viktorin
Petr Viktorin added the comment: > 2. Use eval from C to create the class with a metaclass, eg. > class Foo(metaclass=MessageMeta) You can also call (PyObject_Call*) the metaclass with (name, bases, namespace); this should produce a class. Or not: >>> class Foo(

[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-03 Thread Petr Viktorin
Petr Viktorin added the comment: You are missing m_free. The clear function is used to break reference counts. In this case, there are no reference counts to be broken, so it is not called. Your custom_clear function is idempotent, so you can use it in both free and clear and let Python

[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-03 Thread Petr Viktorin
Petr Viktorin added the comment: I'm one of those who disagree with "make html" suddenly downloading code from the internet and running it, but I guess I'm in a minority. I'll switch to using `sphinx-build` directly. Still, I'd have appreciated a hea

[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-03 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +26085 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27581 ___ Python tracker <https://bugs.python.org/issu

[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-04 Thread Petr Viktorin
Petr Viktorin added the comment: The issue this (or lack of communication about it) caused in rc1 is tracked in https://bugs.python.org/issue44823 > @petr.viktorin a whatsnew entry was added, what more notice could have been > provided? Ideally, the python-dev mailing list (or Dis

[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-04 Thread Petr Viktorin
Petr Viktorin added the comment: I've sent a mail to python-dev: https://mail.python.org/archives/list/python-...@python.org/thread/MGPNI7OSA7UXNOTVDVW2I2GUMXV25FRS/ -- ___ Python tracker <https://bugs.python.org/is

[issue41103] Removing old buffer support

2021-08-05 Thread Petr Viktorin
Petr Viktorin added the comment: These should be removed from the *limited API*, but stay for the stable ABI. (PEP 652 mentions this can happen but doesn't give details, which will be a bit tricky. These are good candidates for figuring out the process.) I assigned this to myself; I&#

[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-05 Thread Petr Viktorin
Petr Viktorin added the comment: I see that I wrote "counts" rather than "cycles" before; that line should be: The clear function is used to break reference cycles. In this case, there are no reference cycles to be broken, so it is not called. Thanks to Pablo for the

[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread Petr Viktorin
Petr Viktorin added the comment: > Maybe the old behavior was better: if an extension uses the old API, share > its state between all interpreters. Yes, I think the old behavior was better: if an extension uses the old API, share its state between all interpreters. This is obvious

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 3e2c643ae0b21f9e596bfd9c8ec99ca546ea8d0f by Hai Shi in branch 'main': bpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551) https://github.com/python/cpython/commit/3e2c643ae0b21f9e596bfd9c8

[issue26871] Change weird behavior of PyModule_AddObject()

2021-08-17 Thread Petr Viktorin
Petr Viktorin added the comment: Since https://github.com/python/cpython/pull/23122, there is PyModule_AddObjectRef doesn't steal a reference. PyModule_AddObject is discouraged in the docs, but not formally deprecated. (As Stefan notes, the leaks are single references in case of a m

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset fcd651d16fc5ac3d07dd3f57f1001a861a2e7d23 by Hai Shi in branch 'main': bpo-42035: Enhance test_get_type_name() of _testcapi (GH-27649) https://github.com/python/cpython/commit/fcd651d16fc5ac3d07dd3f57f1001a

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin
Petr Viktorin added the comment: Now, I wonder if we should also introduce PyType_GetModuleName for __module__, or stop and close this as fixed. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-24 Thread Petr Viktorin
Petr Viktorin added the comment: I think the module could use a more comprehensive review for GIL handling, rather than doing it piecewise in individual PRs. I recommend that any function passed to SQLite (and only those) should - be named `*_callback`, for clarity - acquire the GIL at

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-24 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +26380 pull_request: https://github.com/python/cpython/pull/27931 ___ Python tracker <https://bugs.python.org/issue42

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-08-25 Thread Petr Viktorin
Petr Viktorin added the comment: The general policy is to only improve style for code you touch for some other reasons. You're changing lots of the callback code in bpo-42064, so I reckon making things more readable is fine. -- ___ Python tr

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread Petr Viktorin
Petr Viktorin added the comment: The macro PyUnicode_KIND is part of the documented public C API. It accesses the bit field "state.kind" directly. -- ___ Python tracker <https://bugs.python.o

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-30 Thread Petr Viktorin
Petr Viktorin added the comment: PyUnicode_KIND does *not* expose the implementation details to the programmer. If the internal representation os strings is switched to use masks and shifts instead of bitfields, PyUnicode_KIND (and others) can be adapted to the new details without breaking

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Petr Viktorin
Petr Viktorin added the comment: Here's a gotcha you might not be aware of: `create_callback_context` stashes away a pointer to `state`. I don't think we can prove that the `state` will always outlive the callback_context after it'll become possible to deallocate the mo

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 01dea5f12b31862999217c091399a318f23b460a by Petr Viktorin in branch 'main': bpo-42064: Offset arguments for PyObject_Vectorcall in the _sqlite module (GH-27931) https://github.com/python/cpython/commit/01dea5f12b31862999217c091399a3

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Petr Viktorin
Petr Viktorin added the comment: > Would it be sufficient to hold a reference to the connection object? Yes. -- ___ Python tracker <https://bugs.python.org/issu

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-09-06 Thread Petr Viktorin
Petr Viktorin added the comment: I think you will run into issues with allocating tp_members, because there isn't a good mechanism to for type objects to manage C-level data. But I encourage you to try, so you get a better understanding of the pr

[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: Marking as *potential* release blocker for 3.10. Pablo, without this change the newest pip (with [PR 10358]) will not work on Python 3.10 built --with-platlibdir. This configure option was added in 3.9 for distros that separate `/usr/lib` and `/usr/lib64

[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: Possibly together with PR28011. -- ___ Python tracker <https://bugs.python.org/issue44860> ___ ___ Python-bugs-list mailin

[issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: Here, I'm not sure. What do people use --home for? I don't think we need to match the `/usr/` scheme here. For Python software that's not part of a distro, I think just `lib/` is fine. -- nosy:

[issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: The use case is a "personal stash of Python modules", described here: https://docs.python.org/3/install/#alternate-installation-the-home-scheme We don't need the lib/lib64 distinction here. I'd revert the 3.11 change and

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 0474d06008f8c9eba660ed20d336ffdc5c4db121 by Erlend Egeberg Aasland in branch 'main': bpo-44991: Normalise `sqlite3` callback naming (GH-28088) https://github.com/python/cpython/commit/0474d06008f8c9eba660ed20d336ff

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 0474d06008f8c9eba660ed20d336ffdc5c4db121 by Erlend Egeberg Aasland in branch 'main': bpo-44991: Normalise `sqlite3` callback naming (GH-28088) https://github.com/python/cpython/commit/0474d06008f8c9eba660ed20d336ff

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: The remaining function_pinboard_* renames are part of PR-27940. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: I believe everything is in order now. -- ___ Python tracker <https://bugs.python.org/issue44860> ___ ___ Python-bugs-list mailin

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 979336de34e3d3f40cf6e666b72a618f6330f3c1 by Erlend Egeberg Aasland in branch 'main': bpo-42064: Pass module state to trace, progress, and authorizer callbacks (GH-27940) https://github.com/python/cpyt

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-09-07 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: AFAICS: this is a bug, but in deprecated code. Not worth fixing in 3.11, and definitely not worth fixing in a RC, and . People should stop using distutils, and those who can't won't be happy with changes to it. Consider that existing distutils iss

[issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: (Sorry for the extra `and`; I hit Submit too soon) -- ___ Python tracker <https://bugs.python.org/issue45035> ___ ___ Python-bug

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Petr Viktorin
New submission from Petr Viktorin : The `replace` method of `code` allows setting e.g. * co_filename to a subclass of str * co_consts to an arbitrary tuple and possibly more weird cases. This makes code objects unmarshallable. One way to create such a code object is to call

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Petr Viktorin
Change by Petr Viktorin : Added file: https://bugs.python.org/file50269/reproducer_compileall.py ___ Python tracker <https://bugs.python.org/issue45127> ___ ___ Pytho

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: How to fix this? I guess: * co_filename should be converted to an actual str, or reject subclasses with an exception * for co_consts, the [marshal docs] could be updated to add code objects to "containers". The [code docs] already say co_consts &

[issue42839] SourceFileLoader does not (fully) accept path-like objects

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: I just filed the slightly more general bpo-45127. -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue42

<    1   2   3   4   5   6   7   8   9   10   >