STINNER Victor added the comment:
The f_code member has been removed by in bpo-44032 by the commit
b11a951f16f0603d98de24fee5c023df83ea552c.
The f_frame member has been added in bpo-44590 by the commit
ae0a2b756255629140efcbe57fc2e714f0267aa3.
See also bpo-46355 [C API] Document
STINNER Victor added the comment:
Removing the PyFrameObject.f_code member (commit
b11a951f16f0603d98de24fee5c023df83ea552c) broke by gevent project:
* https://github.com/gevent/gevent/issues/1867
* https://bugs.python.org/issue40421#msg413719
STINNER Victor added the comment:
Same on AMD64 CentOS9 FIPS Only Blake2 Builtin Hash 3.x:
https://buildbot.python.org/all/#/builders/828/builds/196
test.pythoninfo:
fips.linux_crypto_fips_enabled: 1
fips.openssl_fips_mode: 1
ssl.OPENSSL_VERSION: OpenSSL 3.0.1 14 Dec 2021
STINNER Victor added the comment:
New changeset ccbe8045faf6e63d36229ea4e1b9298572cda126 by Victor Stinner in
branch 'main':
bpo-46659: Fix the MBCS codec alias on Windows (GH-31218)
https://github.com/python/cpython/commit/ccbe8045faf6e63d36229ea4e1b929
STINNER Victor added the comment:
New changeset b899126094731bc49fecb61f2c1b7557d74ca839 by Victor Stinner in
branch 'main':
bpo-46659: Deprecate locale.getdefaultlocale() (GH-31206)
https://github.com/python/cpython/commit/b899126094731bc49fecb61f2c1b75
STINNER Victor added the comment:
New changeset 66b3cd7063322a9f5c922a97bbd06fdb9830 by Victor Stinner in
branch 'main':
bpo-45459: Rename buffer.h to pybuffer.h (#31201)
https://github.com/python/cpython/commit/66b3cd7063322a9f5c922a97bbd06f
STINNER Victor added the comment:
pmp-p:
> There's some side effects with "buffer.h" inclusion in Panda3D when building
> againt 3.11a5, project manager concerns are here
> https://github.com/python/cpython/pull/29991#issuecomment-1031731100
Thanks for the report. It
Change by STINNER Victor :
--
pull_requests: +29651
pull_request: https://github.com/python/cpython/pull/31527
___
Python tracker
<https://bugs.python.org/issue45
STINNER Victor added the comment:
> Include/object.h:109:3: warning: redefinition of typedef 'PyObject' is a C11
> feature [-Wtypedef-redefinition]
Oh. I already met this error :-(
That's why I proposed in GH-31201 to move all forward declarations at the top
of Python.
Change by STINNER Victor :
--
pull_requests: +29652
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/31528
___
Python tracker
<https://bugs.python.org/issu
New submission from STINNER Victor :
I propose to move the PyFrameObject structure to the internal C API.
--
Between Python 3.10 and Python 3.11, the work on optimizing ceval.c modified
deeply the PyFrameObject structure. Examples:
* The f_code member has been removed by in bpo-44032 by
STINNER Victor added the comment:
By the way, Include/cpython/ceval.h uses the "struct _interpreter_frame*" type
whereas this type is part of the internal C API:
PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct
_interpreter_frame *f, int exc);
Maybe
Change by STINNER Victor :
--
keywords: +patch
pull_requests: +29654
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31530
___
Python tracker
<https://bugs.python.org/issu
STINNER Victor added the comment:
I created bpo-46836: "[C API] Move PyFrameObject to the internal C API".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
I created bpo-46836: "[C API] Move PyFrameObject to the internal C API".
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
I created bpo-46836: "[C API] Move PyFrameObject to the internal C API".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
I created bpo-46836: "[C API] Move PyFrameObject to the internal C API".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
See also bpo-40421 "[C API] Add getter functions for PyFrameObject and maybe
move PyFrameObject to the internal C API". I added getter functions in recent
Python versions:
* PyFrame_GetBack(): Python 3.9
* PyFrame_GetCode():
STINNER Victor added the comment:
See also bpo-44800 "Code readability: rename InterpreterFrame to _Py_framedata".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
See also bpo-45247: [C API] Add explicit support for Cython to the C API.
--
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
I created bpo-46836: "[C API] Move PyFrameObject to the internal C API".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
I marked my PR as a draft since this change is an incompatible change. Even if
PyFrameObject structure is excluded from the limited C API and not documented,
it's used by a few projects. I plan to check how this change impacts these
projects before me
Change by STINNER Victor :
--
nosy: +Mark.Shannon, corona10, erlendaasland, petr.viktorin, scoder
___
Python tracker
<https://bugs.python.org/issue46836>
___
___
STINNER Victor added the comment:
See also the bpo-39947: "[C API] Make the PyThreadState structure opaque (move
it to the internal C API)". Recently, I also added helper functions:
* PyThreadState_GetFrame(): Python 3.9 and limited C API version 3.10
* PyThreadState_GetID(): Pyth
STINNER Victor added the comment:
I created bpo-46836: "[C API] Move PyFrameObject to the internal C API".
--
___
Python tracker
<https://bugs.python.o
Change by STINNER Victor :
--
pull_requests: +29656
pull_request: https://github.com/python/cpython/pull/31532
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
STINNER Victor added the comment:
> New changeset c0a5ebeb1239020f2ecc199053bb1a70d78841a1 by Kumar Aditya in
> branch 'main':
> bpo-46430: Intern strings in deep-frozen modules (GH-30683)
This change introduced a memory leak at Python exit.
Before:
$ ./python -X show
STINNER Victor added the comment:
> This change introduced a memory leak at Python exit.
It's regression related to bpo-1635741 which I fixed recently:
https://mail.python.org/archives/list/python-...@python.org/thread/E4C6TDNVDPDNNP73HTGHN5W4
STINNER Victor added the comment:
_PyStaticCode_InternStrings() error handling is based on assert(): that's
really bad. It can crash Python (exit with abort()) at the first memory
allocation failure. Why not returning -1 on error?
--
___
P
STINNER Victor added the comment:
commit ccbe8045faf6e63d36229ea4e1b9298572cda126
Author: Victor Stinner
Date: Tue Feb 22 22:04:07 2022 +0100
bpo-46659: Fix the MBCS codec alias on Windows (GH-31218)
--
resolution: -> fixed
stage: patch review -> resolved
status
STINNER Victor added the comment:
New changeset 9bbdde218005f552304d9954bb97e3f9185edded by Victor Stinner in
branch 'main':
bpo-45412: Add _PY_SHORT_FLOAT_REPR macro (GH-31171)
https://github.com/python/cpython/commit/9bbdde218005f552304d9954bb97e3
STINNER Victor added the comment:
See also bpo-46670: "Build Python with -Wundef: don't use undefined macros".
--
___
Python tracker
<https://bugs.pyt
STINNER Victor added the comment:
Petr Viktorin:
> So, this will break Cython and gevent,
This change doesn't break Cython and gevent: they are already broken.
> but (unlike the optimization work that broke f_code/f_frame) it won't provide
> any value to users?
The pr
Change by STINNER Victor :
--
pull_requests: +29659
pull_request: https://github.com/python/cpython/pull/31535
___
Python tracker
<https://bugs.python.org/issue40
STINNER Victor added the comment:
> The docs for PyFrame_GetCode say it's returning an "int".
Oh. I missed your comment. I created GH-31535 to fix the return type in the
documentation.
--
___
Python tracker
<https://bugs.
STINNER Victor added the comment:
> Presumably the leak is imaginary
Well, you can check with your favorite memory debugger like Valgrind if you
don't trust Python internal memory debugger :-)
Not leaking memory at exit matters when Python is embedded in an application.
I don'
STINNER Victor added the comment:
Ned Batchelder:
> I went ahead and changed the coverage.py code to this: (...)
I proposed a coverage PR using PyObject_GetAttrString(frame, "f_lasti") which
should works on all Python versions:
https://github.com/nedbat/coverag
Change by STINNER Victor :
--
pull_requests: +29660
pull_request: https://github.com/python/cpython/pull/31536
___
Python tracker
<https://bugs.python.org/issue40
STINNER Victor added the comment:
Mark Shannon:
> The only purpose of `f_lasti` is to get the line number and that can be done
> directly via `PyFrame_GetLineNumber(PyFrameObject *frame)`
I found the uwsgi project on PyPI which uses f_lasti with PyCode_Addr2Line(). I
wrote GH-31
STINNER Victor added the comment:
> I found the uwsgi project on PyPI which uses f_lasti with PyCode_Addr2Line().
Oh, plugins/python/profiler.c uses that to define PyFrame_GetLineNumber() on
Python older than 2.7, Python 3.0 and Python 3.1. In 2022, it's no longer
relevant.
But wel
STINNER Victor added the comment:
New changeset 78859e58e4e016286e648d1dc155e0f6cebfa6ff by Victor Stinner in
branch 'main':
bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535)
https://github.com/python/cpython/commit/78859e58e4e016286e648d1dc155e0
STINNER Victor added the comment:
> Sure, but "leaks" caused by deep-freezing cannot be solved by freeing up the
> deep-frozen memory -- the solution must be to update the accounting somewhere.
Python allocates memory (ex: with PyObject_Malloc()) which is not released at
ex
STINNER Victor added the comment:
New changeset 8a716bc62c8205bb9deeda17422b7e69204b6897 by Victor Stinner in
branch 'main':
bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536)
https://github.com/python/cpython/commit/8a716bc62c8205bb9deeda174
Change by STINNER Victor :
--
pull_requests: +29663
pull_request: https://github.com/python/cpython/pull/31539
___
Python tracker
<https://bugs.python.org/issue45
STINNER Victor added the comment:
PyUnicode_InternInPlace() in intern_strings() can convert an immortal string to
a regular Python strong reference, whereas _PyStaticCode_Dealloc() doesn't
bother with clearing co_names, co_consts and co_localsplus
STINNER Victor added the comment:
Stefan Behnel:
> I haven't looked fully into this yet, but I *think* that Cython can get rid
> of most of the direct usages of PyFrameObject by switching to the new
> InterpreterFrame struct instead. It looks like the important fields have now
STINNER Victor added the comment:
I tried to hack _PyStaticCode_Dealloc() to free strings, but since immortal
objects are half-baken today, calling Py_DECREF() does crash.
Py_SETREF() should increase _Py_RefTotal if the old object is immortal and he
new object is not.
Maybe this change
STINNER Victor added the comment:
> n++; // Avoid malloc(0)
> grouplist = PyMem_New(gid_t, n+1);
FYI PyMem_New(0) is well specified and doesn't return NULL:
https://docs.python.org/dev/c-api/memory.html#c.PyMem_Malloc
--
nosy
STINNER Victor added the comment:
I checked os.uname() value on two buildbots, by looking at their
test.pythoninfo:
os.uname: posix.uname_result(sysname='Linux', nodename='ztcpip3.pok.ibm.com',
release='3.10.0-1160.53.1.el7.s390x', version='#1 SMP Thu
STINNER Victor added the comment:
See also "Python flag/envvar not to put current directory to sys.path (but
don’t ignore PYTHONPATH)" discussion:
https://discuss.python.org/t/python-flag-envvar-not-to-put-current-directory-to-sys-path-but-dont-ignore-pythonpath/4235/2
-
Change by STINNER Victor :
--
pull_requests: +29665
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31542
___
Python tracker
<https://bugs.python.org/issu
STINNER Victor added the comment:
The problem of long option names is that they cannot be used in a Unix shebang:
"#!/usr/bin/python3 --long-option".
I propose to add the -P option to not add sys.path[0]: I wrote GH-31542.
--
___
Pyth
STINNER Victor added the comment:
See also bpo-16202 "sys.path[0] security issues".
--
___
Python tracker
<https://bugs.python.org/issue13475>
___
___
STINNER Victor added the comment:
New changeset 4fccf910738d1442852cb900747e6dccb8fe03ef by Victor Stinner in
branch 'main':
bpo-46659: Enhance LocaleTextCalendar for C locale (GH-31214)
https://github.com/python/cpython/commit/4fccf910738d1442852cb900747e6d
STINNER Victor added the comment:
Follow-up: PEP 594 schedules the removal of these 4 modules in Python 3.12, but
the PEP remains a draft.
--
___
Python tracker
<https://bugs.python.org/issue28
STINNER Victor added the comment:
locale.getdefaultlocale() is now deprecated.
calendar now uses locale.setlocale() instead of locale.getdefaultlocale().
The ANSI code page alias to MBCS now has better tests and better comments.
Thanks Eryk Sun for your very useful feedback
STINNER Victor added the comment:
> Deprecating these functions is complex. I prefer to start with the least
> controversial part: bpo-46659.
locale.getdefaultlocale() is now deprecated in Python 3.11.
--
___
Python tracker
New submission from STINNER Victor :
In Python 3.10, _PyEval_EvalFrameDefault() has the API:
PyObject* _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int
throwflag);
In Python 3.11, bpo-44590 (commit ae0a2b756255629140efcbe57fc2e714f0267aa3
"Lazily allocate frame ob
STINNER Victor added the comment:
typo: "I propose to move most _PyEval private functions to the internal C API
to clarify that they must *NOT* be used." :-)
--
___
Python tracker
<https://bugs.python.o
Change by STINNER Victor :
--
keywords: +patch
pull_requests: +29676
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31532
___
Python tracker
<https://bugs.python.org/issu
STINNER Victor added the comment:
See also bpo-46836: "[C API] Move PyFrameObject to the internal C API".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
> PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct
> _interpreter_frame *f, int exc);
I created bpo-46850 "[C API] Move _PyEval_EvalFrameDefault() to the internal C
API"
Change by STINNER Victor :
--
pull_requests: -29656
___
Python tracker
<https://bugs.python.org/issue46836>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
New changeset ec091bd47e2f968b0d1631b9a8104283a7beeb1b by Victor Stinner in
branch 'main':
bpo-45459: Add pytypedefs.h header file (GH-31527)
https://github.com/python/cpython/commit/ec091bd47e2f968b0d1631b9a81042
STINNER Victor added the comment:
New changeset 042f31da552c19054acd3ef7bb6cfd857bce172b by Victor Stinner in
branch 'main':
bpo-45459: C API uses type names rather than structure names (GH-31528)
https://github.com/python/cpython/commit/042f31da552c19054acd3ef7bb6cfd
STINNER Victor added the comment:
New changeset 4dc746310bd37ad6b381f9176acd167d445f4385 by Kumar Aditya in
branch 'main':
bpo-46430: Fix memory leak in interned strings of deep-frozen modules (GH-31549)
https://github.com/python/cpython/commit/4dc746310bd37ad6b381f9176acd16
Change by STINNER Victor :
--
pull_requests: +29677
pull_request: https://github.com/python/cpython/pull/31555
___
Python tracker
<https://bugs.python.org/issue1635
STINNER Victor added the comment:
I wrote https://github.com/python/cpython/pull/31555 to make sure that Python
doesn't leak at Python exit.
--
___
Python tracker
<https://bugs.python.org/is
STINNER Victor added the comment:
New changeset c9c178fdb1af01e441a6c83f3a21a67e5dd9f17d by Victor Stinner in
branch 'main':
bpo-1635741: test_embed cheks that Python does not leak (GH-31555)
https://github.com/python/cpython/commit/c9c178fdb1af01e441a6c83f3a21a6
STINNER Victor added the comment:
New changeset 9475dc0b8d2a0db40278bbcb88a89b1265a77ec9 by Victor Stinner in
branch 'main':
bpo-46623: Skip two test_zlib tests on s390x (GH-31096)
https://github.com/python/cpython/commit/9475dc0b8d2a0db40278bbcb88a89b
STINNER Victor added the comment:
Even if Python 3.9 and 3.10 are also affected, I prefer to not backport the
change since it's not ideal.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python t
STINNER Victor added the comment:
The Python 3.7 package on Fedora also skips these two tests using --ignore
option of regrtest:
%ifarch s390x
--ignore test_speech128 \
--ignore test_pair \
%endif
* https://src.fedoraproject.org/rpms/python3.7/pull-request/38
Change by STINNER Victor :
--
pull_requests: +29679
pull_request: https://github.com/python/cpython/pull/31557
___
Python tracker
<https://bugs.python.org/issue46
New submission from STINNER Victor :
It has been decided to require IEEE 754 to build Python 3.11:
https://mail.python.org/archives/list/python-...@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/
At Python startup, _PyFloat_InitState() checks the IEEE 754 format at runtime.
It can be
STINNER Victor added the comment:
New changeset 5f8b5e2f2150d2223ff9e286bd146de92ff16865 by Victor Stinner in
branch 'main':
bpo-46656: Building Python now requires a C11 compiler (GH-31557)
https://github.com/python/cpython/commit/5f8b5e2f2150d2223ff9e286bd146d
STINNER Victor added the comment:
New changeset 1b2611eb0283055835e5df632a7a735db8c894b8 by Victor Stinner in
branch 'main':
bpo-46656: Remove Py_NO_NAN macro (GH-31160)
https://github.com/python/cpython/commit/1b2611eb0283055835e5df632a7a73
Change by STINNER Victor :
--
components: +Build, Interpreter Core
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
title: Compile fails if Py_NO_NAN is defined -> Remove the Py_NO_NAN macro:
require NAN to build Python 3.11
versions: -Python
STINNER Victor added the comment:
See also bpo-46656: "Remove the Py_NO_NAN macro: require NAN to build Python
3.11".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
Oh wait, I'm now confused by the method names. In Python 3.10, the correct
names at:
* float.__getformat__() <= 4 underscores
* float.__set_format__() <= 5 underscores
It's even more confusing because the "set format" is only used
Change by STINNER Victor :
--
keywords: +patch
pull_requests: +29680
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31558
___
Python tracker
<https://bugs.python.org/issu
Change by STINNER Victor :
--
nosy: +vstinner
nosy_count: 10.0 -> 11.0
pull_requests: +29681
pull_request: https://github.com/python/cpython/pull/31558
___
Python tracker
<https://bugs.python.org/issu
STINNER Victor added the comment:
I wrote GH-31558 to fix the typo in the method name.
--
___
Python tracker
<https://bugs.python.org/issue46852>
___
___
Pytho
STINNER Victor added the comment:
We can keep the float.__getformat__() method, it doesn't harm. I change the
issue title to only propose to remove the float.__setformat__() method.
--
title: Remove float.__get_format__() and float.__set_format__() -> Remove the
float.__set
Change by STINNER Victor :
--
pull_requests: +29683
pull_request: https://github.com/python/cpython/pull/31560
___
Python tracker
<https://bugs.python.org/issue1635
STINNER Victor added the comment:
New changeset 7d03c8be5af2f1559dbc35b775b3116dfd63cfb6 by Victor Stinner in
branch 'main':
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558)
https://github.com/python/cpython/commit/7d03c8be5af2f1559dbc35b775b311
STINNER Victor added the comment:
New changeset 7d03c8be5af2f1559dbc35b775b3116dfd63cfb6 by Victor Stinner in
branch 'main':
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558)
https://github.com/python/cpython/commit/7d03c8be5af2f1559dbc35b775b311
Change by STINNER Victor :
--
pull_requests: +29691
pull_request: https://github.com/python/cpython/pull/31569
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 4657bf701670215ce69b89401b2307022a3b0a7d by Victor Stinner in
branch 'main':
bpo-1635741: Fix winreg reference leaks (GH-31560)
https://github.com/python/cpython/commit/4657bf701670215ce69b89401b2307
STINNER Victor added the comment:
New changeset 18b5dd68c6b616257ae243c0b6bb965ffc885a23 by Victor Stinner in
branch 'main':
bpo-46836: Move PyFrameObject to pycore_frame.h (GH-31530)
https://github.com/python/cpython/commit/18b5dd68c6b616257ae243c0b6bb96
STINNER Victor added the comment:
I announced the change on the capi-sig mailing list:
https://mail.python.org/archives/list/capi-...@python.org/thread/RCT4SB5LY5UPRRRALEOHWEQHIXFNTHYF/
--
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
keywords: +patch
pull_requests: +29698
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31576
___
Python tracker
<https://bugs.python.org/issu
Change by STINNER Victor :
--
pull_requests: +29699
pull_request: https://github.com/python/cpython/pull/31577
___
Python tracker
<https://bugs.python.org/issue45
Change by STINNER Victor :
--
pull_requests: +29700
pull_request: https://github.com/python/cpython/pull/31578
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +29701
pull_request: https://github.com/python/cpython/pull/31578
___
Python tracker
<https://bugs.python.org/issue20
STINNER Victor added the comment:
New changeset 4a0c7a1aacd08cead7717479620e62359c828e88 by Victor Stinner in
branch 'main':
bpo-45316: Move private PyCode C API to internal C API (GH-31576)
https://github.com/python/cpython/commit/4a0c7a1aacd08cead7717479620e62
STINNER Victor added the comment:
New changeset 8ddbdd9e96e64b42c87dcfe4e38383cf0694988a by Victor Stinner in
branch 'main':
bpo-45316: Move private PyDict functions to internal C API (GH-31577)
https://github.com/python/cpython/commit/8ddbdd9e96e64b42c87dcfe4e38383
Change by STINNER Victor :
--
pull_requests: +29702
pull_request: https://github.com/python/cpython/pull/31579
___
Python tracker
<https://bugs.python.org/issue45
STINNER Victor added the comment:
New changeset 0848da19ce8ea037ab1cfc569778e94bf8e3b24a by Victor Stinner in
branch '3.10':
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558)
(GH-31578)
https://github.com/python/cpyt
STINNER Victor added the comment:
New changeset 0848da19ce8ea037ab1cfc569778e94bf8e3b24a by Victor Stinner in
branch '3.10':
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558)
(GH-31578)
https://github.com/python/cpyt
601 - 700 of 35284 matches
Mail list logo