Change by Petr Viktorin :
--
pull_requests: +24946
pull_request: https://github.com/python/cpython/pull/26354
___
Python tracker
<https://bugs.python.org/issue43
Change by Petr Viktorin :
--
pull_requests: +25074
pull_request: https://github.com/python/cpython/pull/26479
___
Python tracker
<https://bugs.python.org/issue43
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
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
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
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
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
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
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
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
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
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
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
-
Change by Petr Viktorin :
--
pull_requests: +25326
pull_request: https://github.com/python/cpython/pull/26740
___
Python tracker
<https://bugs.python.org/issue43
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
Change by Petr Viktorin :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue1>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Petr Viktorin :
--
components: +Library (Lib) -C API
___
Python tracker
<https://bugs.python.org/issue39078>
___
___
Python-bugs-list mailing list
Unsub
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
Change by Petr Viktorin :
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue39355>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petr Viktorin :
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue39620>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petr Viktorin :
--
components: +Library (Lib) -C API
___
Python tracker
<https://bugs.python.org/issue39767>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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/
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
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
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__
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
Change by Petr Viktorin :
--
components: +Library (Lib) -C API
___
Python tracker
<https://bugs.python.org/issue44663>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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.
--
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
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
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
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
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
Petr Viktorin added the comment:
Devguide PR: https://github.com/python/devguide/pull/730
--
___
Python tracker
<https://bugs.python.org/issue44727>
___
___
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
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
Petr Viktorin added the comment:
that is, bpo-44727
--
___
Python tracker
<https://bugs.python.org/issue41756>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
&
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
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
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
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
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
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
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
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(
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
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
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
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
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
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
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
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
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
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
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
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
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Petr Viktorin :
--
pull_requests: +26380
pull_request: https://github.com/python/cpython/pull/27931
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
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
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
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
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
Petr Viktorin added the comment:
Possibly together with PR28011.
--
___
Python tracker
<https://bugs.python.org/issue44860>
___
___
Python-bugs-list mailin
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:
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
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
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
Petr Viktorin added the comment:
The remaining function_pinboard_* renames are part of PR-27940.
--
___
Python tracker
<https://bugs.python.org/issue44
Petr Viktorin added the comment:
I believe everything is in order now.
--
___
Python tracker
<https://bugs.python.org/issue44860>
___
___
Python-bugs-list mailin
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
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Petr Viktorin added the comment:
(Sorry for the extra `and`; I hit Submit too soon)
--
___
Python tracker
<https://bugs.python.org/issue45035>
___
___
Python-bug
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
Change by Petr Viktorin :
Added file: https://bugs.python.org/file50269/reproducer_compileall.py
___
Python tracker
<https://bugs.python.org/issue45127>
___
___
Pytho
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 &
Petr Viktorin added the comment:
I just filed the slightly more general bpo-45127.
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue42
201 - 300 of 950 matches
Mail list logo