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

2021-04-20 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +24207 pull_request: https://github.com/python/cpython/pull/25482 ___ Python tracker <https://bugs.python.org/issue43

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

2021-04-20 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks for linking to the issues/documentation! I see that Py_GetArgcArgv it was exported in python3.def (i.e. stable ABI) in bpo-40910, which got backported to 3.9. And the removal of PyThreadState_DeleteCurrent was reverted: bpo-38266 While we would like

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

2021-04-16 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks! I'll send PRs later. -- ___ Python tracker <https://bugs.python.org/issue43795> ___ ___ Python-bugs-list m

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

2021-04-16 Thread Petr Viktorin
Petr Viktorin added the comment: I unsure about the following symbols. Victor, do you think they should be part of the stable ABI? - PyThreadState_DeleteCurrent - Py_GetArgcArgv - PyInterpreterState_GetID -- nosy: +vstinner ___ Python tracker

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

2021-04-16 Thread Petr Viktorin
Petr Viktorin added the comment: Opened as a separate issue: bpo-43868, Remove PyOS_ReadlineFunctionPointer from the stable ABI list -- ___ Python tracker <https://bugs.python.org/issue43

[issue43868] Remove PyOS_ReadlineFunctionPointer from the stable ABI list

2021-04-16 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +24172 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25442 ___ Python tracker <https://bugs.python.org/issu

[issue43868] Remove PyOS_ReadlineFunctionPointer from the stable ABI list

2021-04-16 Thread Petr Viktorin
New submission from Petr Viktorin : The inclusion of PyOS_ReadlineFunctionPointer in python3dll.c (*) was a mistake. According to PEP 384: > functions expecting FILE* are not part of the ABI, to avoid depending on a > specific version of the Microsoft C runtime DLL on Windows. The sit

[issue41282] Deprecate and remove distutils

2021-04-14 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 341e8a939aca6e9f59ffb0e6daee5888933694ed by Lumír 'Frenzy' Balhar in branch 'master': bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549) https://github.com/python/cpython/commit/341e8a939aca6e9f59ff

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

2021-04-14 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 92eebf6dd20c541ca5883d010a575fb6ea4a245c by Petr Viktorin in branch 'master': bpo-43795: Sort PC/python3dll.c (GH-25312) https://github.com/python/cpython/commit/92eebf6dd20c541ca5883d010a575f

[issue43831] sqlite: convert_timestamp raises ValueError for empty columns

2021-04-14 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43831> ___ ___

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

2021-04-09 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +24050 pull_request: https://github.com/python/cpython/pull/25315 ___ Python tracker <https://bugs.python.org/issue43

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

2021-04-09 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +24047 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25312 ___ Python tracker <https://bugs.python.org/issu

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

2021-04-09 Thread Petr Viktorin
New submission from Petr Viktorin : This issue tracks implementation of PEP 652. CPython's Limited C-API and Stable ABI, introduced in PEP 384, will be formalized in a single definitive file, tested, and documented. -- messages: 390638 nosy: petr.viktorin priority: normal sev

[issue43725] Create a release branch ABI stability regression test

2021-04-06 Thread Petr Viktorin
Petr Viktorin added the comment: Not sure what platforms libabigail works on, but the set of stable ABI symbols is platform-specific. Currently it's affected by the MS_WINDOWS and HAVE_FORK defines. -- ___ Python tracker <https://bugs.py

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread Petr Viktorin
Petr Viktorin added the comment: If you do this, please check the performance impact. Py_INCREF/Py_DECREF are very common. -- ___ Python tracker <https://bugs.python.org/issue43

[issue33164] Blake 2 module update

2021-03-25 Thread Petr Viktorin
Petr Viktorin added the comment: This reverted commit 5940c535b06805960d008bcafec7260dae74d9b9 -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue33

[issue43543] stupid download

2021-03-18 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43543> ___ ___

[issue43503] [subinterpreters] PyObject statics exposed in the limited API break isolation.

2021-03-16 Thread Petr Viktorin
Petr Viktorin added the comment: There seems to be much confusion here. Maybe on my side? PEP 489 is *very much* part of the limited API. -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue43

[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-03-11 Thread Petr Viktorin
Petr Viktorin added the comment: There's another part of the new implementation that looks a bit fishy: the `separator` argument now allows multi-character strings, so you can parse 'a=1b=2' with separator=''. Was this intentional? -- _

[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-03-10 Thread Petr Viktorin
Petr Viktorin added the comment: With the fix, parse_qs[l] doesn't handle bytes separators correctly. There is an explicit type check for str/bytes: if not separator or (not isinstance(separator, (str, bytes))): raise ValueError("Separator must be of type string or bytes

[issue43239] PyCFunction_New is not exported with PyAPI_FUNC

2021-02-23 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 7bb1cafa4e3d648669212ea4c6d11d6eafc6da23 by Petr Viktorin in branch 'master': bpo-43239: Export PyCFunction_New with PyAPI_FUNC (GH-24551) https://github.com/python/cpython/commit/7bb1cafa4e3d648669212ea4c6d11d

[issue28429] ctypes fails to import with grsecurity's TPE

2021-02-18 Thread Petr Viktorin
Petr Viktorin added the comment: Glandos, thank you for the report and fix, and apologies that it wasn't seen by the right set of eyes. -- nosy: +petr.viktorin resolution: -> fixed stage: patch review -> resolved status: open -> closed

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

2021-02-18 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 652 is currently draft & it's discussed at https://discuss.python.org/t/pep-652-maintaining-the-stable-abi/6986 -- ___ Python tracker <https://bugs.python.or

[issue43239] PyCFunction_New is not exported with PyAPI_FUNC

2021-02-16 Thread Petr Viktorin
Petr Viktorin added the comment: > By the way, I would suggest to move "#define PyCFunction_New(ML, SELF) > PyCFunction_NewEx((ML), (SELF), NULL)" to Include/cpython/methodobject.h Wait no, I wrote too soon. PyCFunction_NewEx is part of the limited API as well,

[issue43239] PyCFunction_New is not exported with PyAPI_FUNC

2021-02-16 Thread Petr Viktorin
Petr Viktorin added the comment: > By the way, I would suggest to move "#define PyCFunction_New(ML, SELF) > PyCFunction_NewEx((ML), (SELF), NULL)" to Include/cpython/methodobject.h OK, I'll add that move to the PR. > Oh, it's not listed by Doc/data/stable_

[issue43239] PyCFunction_New is not exported with PyAPI_FUNC

2021-02-16 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +23334 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24551 ___ Python tracker <https://bugs.python.org/issu

[issue43239] PyCFunction_New is not exported with PyAPI_FUNC

2021-02-16 Thread Petr Viktorin
New submission from Petr Viktorin : PyCFunction_New is part of the Stable ABI (see bpo-21354), but it is not declared as PyAPI_FUNC, and thus not exported with GCC's -fvisibility=hidden. To match Windows, it should be declared. (I don't think this has any real impact, I just want

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

2021-02-16 Thread Petr Viktorin
Petr Viktorin added the comment: I plan to do this slightly differently, see PEP 652. -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue23

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

2021-02-15 Thread Petr Viktorin
Petr Viktorin added the comment: I want to address this in PEP 652. -- ___ Python tracker <https://bugs.python.org/issue43235> ___ ___ Python-bugs-list mailin

[issue43155] PyCMethod_New not defined in python3.lib

2021-02-12 Thread Petr Viktorin
Petr Viktorin added the comment: > Is there a test suite that checks that the limited API functions can all be > linked against? Not yet. There's not even consensus about exactly what functions are part of the limited API. I plan to address both issues in PEP 652 (currently in D

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

2021-02-02 Thread Petr Viktorin
Petr Viktorin added the comment: The bigger problem is that currently, it's not clear what is limited API and what is not. I am working to propose a PEP to fix this. It will also cover documentation: https://discuss.python.org/t/pre-pep-maintaining-the-stable-abi/6986 --

[issue40601] [C API] Hide static types from the limited C API

2021-02-02 Thread Petr Viktorin
Petr Viktorin added the comment: Sorry, I lost this bug in my TODO list :( > > I don't think it's necessary here. > > Did you read my rationale (first message)? Do you mean that per-interpreter > GIL is not worth it? Right, I mean that it it is not worth breaking t

[issue43054] What does the existence of a struct in a header file imply about the C-API

2021-01-28 Thread Petr Viktorin
Petr Viktorin added the comment: When we're talking just about API, not the stable ABI (which contains only a few structs), reordering and additions should be fair game. > Rather than go through this tortuous analysis for all headers, it might be > better to document which struc

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: Now that I see the implementation (and now that I'm spending a lot of time trying to formalize what is good stable API), I see a problem with PyType_GetName: it effectively returns a borrowed reference. The proposed docs say: Callers can hold [the re

[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2021-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: The PyOS_InitInterrupts function is still listed in PC/python3dll.c. -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue41

[issue41818] Lib/pty.py major revision

2021-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 65cf1ad6723b6b4489fa7dda04283bb2466be531 by Petr Viktorin in branch 'master': bpo-41818: Close file descriptors in test_openpty (#GH-24119) https://github.com/python/cpython/commit/65cf1ad6723b6b4489fa7dda04283b

[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2021-01-19 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +23077 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24119 ___ Python tracker <https://bugs.python.org/issu

[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2021-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: Is there anything I can help with to move this forward? Investigating buildbot failures continues to be very annoying. -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue41

[issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT)

2021-01-18 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: -petr.viktorin ___ Python tracker <https://bugs.python.org/issue42962> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

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

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2021-01-12 Thread Petr Viktorin
Petr Viktorin added the comment: In GH-23598, PyModule_AddObjectRef was added as EXPORT_DATA. Shouldn't it be EXPORT_FUNC? -- ___ Python tracker <https://bugs.python.org/issu

[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2021-01-12 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 187f76def8a5bd0af7ab512575cad30cfe624b05 by Petr Viktorin in branch '3.8': [3.8] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24120) https://github.com/python/cpython/commit/187f76def8a5bd0af7ab512575cad3

[issue41994] Refcount issues in import

2021-01-12 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 4db8988420e0a122d617df741381b0c385af032c by Serhiy Storchaka in branch 'master': bpo-41994: Fix refcount issues in Python/import.c (GH-22632) https://github.com/python/cpython/commit/4db8988420e0a122d617df741381b0c385af032c -

[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2021-01-05 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +22951 pull_request: https://github.com/python/cpython/pull/24120 ___ Python tracker <https://bugs.python.org/issue40

[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2021-01-05 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 6e72ab909de58e89b5a7cd6899587e203cf129a3 by Miss Islington (bot) in branch '3.9': [3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24005) https://github.com/python/cpyt

[issue41818] Lib/pty.py major revision

2021-01-05 Thread Petr Viktorin
Petr Viktorin added the comment: I noticed an issue in one of the newly added tests; see GH-24119 -- ___ Python tracker <https://bugs.python.org/issue41

[issue41818] Lib/pty.py major revision

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

[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Petr Viktorin
Petr Viktorin added the comment: Should the process be changed? -- ___ Python tracker <https://bugs.python.org/issue36543> ___ ___ Python-bugs-list mailin

[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Petr Viktorin
Petr Viktorin added the comment: Let me just point out there's an official process for making incompatible changes now: https://www.python.org/dev/peps/pep-0387/#making-incompatible-changes A warning must be emitted (not just mentioned in docs) for two releases before a feature is re

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-01-03 Thread Petr Viktorin
Petr Viktorin added the comment: Yes, please keep _testcapimodule.c as it is. Static types are still supported and need to be tested. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-01-03 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset b8eb3765908c0063f0739595ba4b296cc8863d19 by Erlend Egeberg Aasland in branch 'master': bpo-40077: Add traverse/clear/free to arraymodule (GH-24066) https://github.com/python/cpython/commit/b8eb3765908c0063f0739595ba4b29

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-01-02 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 75bf107c62fbdc00af51ee4f6ab69df4bd201104 by Erlend Egeberg Aasland in branch 'master': bpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124) https://github.com/python/cpyt

[issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact

2020-12-31 Thread Petr Viktorin
Petr Viktorin added the comment: The Check code is now commented out, and the issue of type checking is mentioned in PEP 630. (The xxlimited_35 module still contains XxoObject_Check, among other historical code.) -- resolution: -> postponed stage: needs patch -> resolved

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2020-12-30 Thread Petr Viktorin
Petr Viktorin added the comment: > I'm only aware of PyQt which uses the stable ABI. Is there other projects > using it? Do these projects check for Py_TPFLAGS_HAVE_VERSION_TAG or > Py_TPFLAGS_HAVE_FINALIZE flag? I think there are. Who knows how many; they're not r

[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-12-29 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin nosy_count: 4.0 -> 5.0 pull_requests: +22841 pull_request: https://github.com/python/cpython/pull/23999 ___ Python tracker <https://bugs.python.org/issu

[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-12-29 Thread Petr Viktorin
Petr Viktorin added the comment: Documentation for developers *of* CPython should generally go in the dev guide, a comment in the code, or in issues like this. -- ___ Python tracker <https://bugs.python.org/issue41

[issue42625] Segmentation fault of PyState_AddModule()

2020-12-29 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks, Victor, for explaining! You'll also see NULL checks in existing code where they aren't strictly necessary, but removing them would be too much trouble. -- ___ Python tracker <https://bu

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2020-12-29 Thread Petr Viktorin
Petr Viktorin added the comment: IMO, these flags are useless. Both the stable ABI and the version-specific builds of extension modules use the memory layout of the current interpreter and fill unset slots with NULL. Py_TPFLAGS_HAVE_AM_SEND is new in 3.10, so it can be removed (or replaced

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: I'll be happy to review adding a PyType_GetName function. -- ___ Python tracker <https://bugs.python.org/issue42035> ___ ___

[issue26515] Update extending/embedding docs to new way to build modules in C

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 630 is now Active. I believe the vast majority of modules can now be ported, and it should be helpful for early adopters (including CPython stdlib). But there are still Open Issues and the API not battle-tested on all the edge cases. The PEP is written

[issue14935] PEP 384 Refactoring applied to _csv module

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: Thank you for working on this! It took several years and some new C-API to get it right (see PEP 630), but I believe this and the related issues bpo-18710 and bpo-34533 can now be closed. -- resolution: -> fixed stage: patch review -> resolved

[issue18710] Add PyState_GetModuleAttr

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: Let me summarize the original issue with the following quote from the python-dev thead: > doing some sys.modules acrobatics and re-importing suddenly changes the internal state of a previously imported [_csv] module. The issue is now solved; both reproduc

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

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

[issue14935] PEP 384 Refactoring applied to _csv module

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 6a02b384751dbc13979efc1185f0a7c1670dc349 by Petr Viktorin in branch 'master': bpo-14935: Remove static state from the _csv module (GH-23224) https://github.com/python/cpython/commit/6a02b384751dbc13979efc1185f0a7

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

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks! Indeed, that's an even better solution than I had in mind. It follows PEP 630 quite nicely: https://www.python.org/dev/peps/pep-0630/#managing-global-state I will close this issue and PRs. I don't agree with adding a general API for d

[issue42625] Segmentation fault of PyState_AddModule()

2020-12-12 Thread Petr Viktorin
Petr Viktorin added the comment: When does this actually happen? Is there a common situation where you'd mistakenly pass NULL to PyState_AddModule? -- ___ Python tracker <https://bugs.python.org/is

[issue30459] PyList_SET_ITEM could be safer

2020-12-10 Thread Petr Viktorin
Petr Viktorin added the comment: > The change respects the documentation which always documented the result type > as "void". Then, IMO, the documentation should be fixed. > My expectation is that apart py-qt4, no project abuse these 3 macros. That's not true

[issue30459] PyList_SET_ITEM could be safer

2020-12-10 Thread Petr Viktorin
Petr Viktorin added the comment: This change goes directly against PEP 387. -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue30

[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 <https://bu

[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 Petr Viktorin
Petr Viktorin added the comment: When was the visibility changed to hidden? -- ___ Python tracker <https://bugs.python.org/issue42599> ___ ___ Python-bugs-list m

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2020-11-25 Thread Petr Viktorin
Petr Viktorin added the comment: Note that the pathfix comment says: # Directories are searched recursively for files whose name looks # like a python module. Files with a dash are *not* Python modules, since they can't be imported. Should the comment (which is the only documentatio

[issue42418] PyType_GetModule() should warn/fail when type has Py_TPFLAGS_BASETYPE

2020-11-24 Thread Petr Viktorin
Petr Viktorin added the comment: > I missed it when I ported some of my code to heap types and multiphase init. I guess PyType_GetModule() is not good for that use case. If your code is open, could you add a link? -- ___ Python tracker <

[issue42418] PyType_GetModule() should warn/fail when type has Py_TPFLAGS_BASETYPE

2020-11-21 Thread Petr Viktorin
Petr Viktorin added the comment: I don't understand this issue. Why would Py_TPFLAGS_BASETYPE make the result of PyType_GetModule() wrong? Is the note in the documentation of PyType_GetModule() not clear? A type and its subtypes may be defined in different modules; why would it be wro

[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2020-11-14 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 2b39da49974bda523c5c1a8777bbe30dbafdcd12 by Hai Shi in branch 'master': bpo-41832: Restore note about NULL in PyType_Slot.pfunc (GH-23243) https://github.com/python/cpython/commit/2b39da49974bda523c5c1a8777bbe3

[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2020-11-11 Thread Petr Viktorin
Petr Viktorin added the comment: > `May not be NULL` means everthing is possible No, it does not. It only means a slot's value may not be NULL, which is an important difference between slots and entries in the PyTypeObject structure. It's OK that it's mentioned elsewhere,

[issue41073] [C API] PyType_GetSlot() should accept static types

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

[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2020-11-10 Thread Petr Viktorin
Petr Viktorin added the comment: The PR entirely removed the note that a slot's value "May not be NULL". In fact, only tp_doc may be NULL. AFAIK, the restriction is still there for other slots. Can that note be added back? -- status:

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

2020-11-10 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +22123 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23226 ___ Python tracker <https://bugs.python.org/issu

[issue42171] Add PEP 573 to the stable ABI

2020-11-10 Thread Petr Viktorin
Petr Viktorin added the comment: Added. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue14935] PEP 384 Refactoring applied to _csv module

2020-11-10 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin nosy_count: 2.0 -> 3.0 pull_requests: +22122 pull_request: https://github.com/python/cpython/pull/23224 ___ Python tracker <https://bugs.python.org/issu

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2020-11-10 Thread Petr Viktorin
Petr Viktorin added the comment: It should be possible to get them back using _PyType_GetModuleByDef. -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue40

[issue41237] Access violation in python39.dll!meth_dealloc on exit

2020-11-09 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue41237> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41111] Convert a few stdlib extensions to the limited C API

2020-11-05 Thread Petr Viktorin
Petr Viktorin added the comment: > Maybe we can do add new members for the 8 missing slots See: https://bugs.python.org/issue41618?#msg380414 -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issu

[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-11-05 Thread Petr Viktorin
Petr Viktorin added the comment: My views on individual slots: Not a function, shouldn't be used with PyType_Slot: * tp_dict - I'd add a PyType_GetDict if there is a need to get this * tp_mro - I'd add a PyType_GetMRO if there is a need to get this (There are existing sl

[issue42100] Add _PyType_GetModuleByDef

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

[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-11-03 Thread Petr Viktorin
Petr Viktorin added the comment: > Can we write those info to docs? In case some developer want to exposing slot > in future. Do you mean something like "only expose a slot if you have a reason for exposing it"? That sounds like a tautology. Where in the docs would this go

[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2020-11-03 Thread Petr Viktorin
Petr Viktorin added the comment: The PyType_Slot documentation says that the pointer may not be NULL: https://docs.python.org/3/c-api/type.html?highlight=pytype_fromspec#c.PyType_Slot.PyType_Slot.pfunc If you change this, why do it only for tp_doc, but for all the slots? NULL should *always

[issue42171] Add PEP 573 to the stable ABI

2020-10-27 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +21925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23009 ___ Python tracker <https://bugs.python.org/issu

[issue42171] Add PEP 573 to the stable ABI

2020-10-27 Thread Petr Viktorin
Petr Viktorin added the comment: Correction: PyModule_AddType is not from PEP 573. I'd like to add it anyway. -- ___ Python tracker <https://bugs.python.org/is

[issue42171] Add PEP 573 to the stable ABI

2020-10-27 Thread Petr Viktorin
New submission from Petr Viktorin : The following PEP 573 were not added to the Windows list of stable ABI symbols (PC/python3dll.c): - PyModule_AddType - PyType_FromModuleAndSpec - PyType_GetModule - PyType_GetModuleState I'd like to add them. Also, the PEP introduces the (METH_FAS

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

2020-10-27 Thread Petr Viktorin
Change by Petr Viktorin : -- assignee: -> petr.viktorin ___ Python tracker <https://bugs.python.org/issue42111> ___ ___ Python-bugs-list mailing list Un

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

2020-10-27 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks! That's my plan, but when I added tests I realized I need to pt in some general improvements to the stable ABI first. -- ___ Python tracker <https://bugs.python.org/is

[issue3760] PEP 3121 --- PyType_Copy is missing

2020-10-23 Thread Petr Viktorin
Petr Viktorin added the comment: The need is covered by PEP 384's PyType_FromSpec (and later additions, the latest being PyType_FromModuleAndSpec). Thanks for closing! -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/i

[issue26515] Update extending/embedding docs to new way to build modules in C

2020-10-23 Thread Petr Viktorin
Petr Viktorin added the comment: There is now PEP 630. Still not done enough to move it out of draft status, but usable for converting simple modules. -- ___ Python tracker <https://bugs.python.org/issue26

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2020-10-23 Thread Petr Viktorin
Petr Viktorin added the comment: Yes, for some cases the ship has sailed. I don't think we can add unions now -- the stable ABI needs to be stable. -- ___ Python tracker <https://bugs.python.org/is

[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-22 Thread Petr Viktorin
Change by Petr Viktorin : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38980> ___ ___ Pyth

[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-22 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset c6d7e82d19c091af698d4e4b3623648e259843e3 by Petr Viktorin in branch 'master': bpo-38980: Only apply -fno-semantic-interposition if available (GH-22892) https://github.com/python/cpython/commit/c6d7e82d19c091af698d4e4b362364

[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-22 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +21824 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/22892 ___ Python tracker <https://bugs.python.org/issu

[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-22 Thread Petr Viktorin
Petr Viktorin added the comment: I was too eager in reviewing this :( It turns out `-fno-semantic-interposition` is GCC 5.3, so [builds fail on older GCC](https://buildbot.python.org/all/#/builders/96/builds/216). I'm researching how to make this conditional in autotools. --

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