Change by Petr Viktorin :
Added file: https://bugs.python.org/file49182/reproducer.c
___
Python tracker
<https://bugs.python.org/issue40217>
___
___
Python-bugs-list m
Petr Viktorin added the comment:
Ha! I think I found the issue in PySide now. It's different, but it's still a
CPython issue. It's actually a variant of the "defining class" problem from PEP
573.
It's legal to get the value of a slot, using PyType_GetSlot.
Petr Viktorin added the comment:
Thank you for responding so quickly!
> Petr, do you mind reviewing it?
Yes, but I'll only get to it next week.
--
___
Python tracker
<https://bugs.python.org
Change by Petr Viktorin :
--
pull_requests: +19690
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/20433
___
Python tracker
<https://bugs.python.org/issu
Petr Viktorin added the comment:
Indeed. The SQLite documentation talks about the limitations that
non-deterministic functions have, not about deterministic functions being
memoized: https://www.sqlite.org/deterministic.html
The flag would be better tested e.g. with a CHECK constraint
Petr Viktorin added the comment:
py3c has an open issue to check that Barry's notes on C extensions are
included: https://github.com/encukou/py3c/issues/1
However, C extensions are only a small part of the wiki page.
--
___
Python tracker
&
New submission from Petr Viktorin :
In bpo-34037, AbstractEventLoop gained a new abstract method,
shutdown_default_executor:
https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.loop.shutdown_default_executor
All AbstractEventLoop subclasses need to define this method, otherwise
Petr Viktorin added the comment:
Yes, it should be possible to wrap them in #if so they aren't part of the
stable ABI.
--
___
Python tracker
<https://bugs.python.org/is
Petr Viktorin added the comment:
This broke compilation with mingw; see https://bugs.python.org/issue40777
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue24
Change by Petr Viktorin :
--
keywords: +patch
nosy: +petr.viktorin
nosy_count: 1.0 -> 2.0
pull_requests: +19742
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20493
___
Python tracker
<https://bugs.p
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Petr Viktorin added the comment:
FWIW, another project that needs Py_GetArgcArgv is "setproctitle":
https://bugzilla.redhat.com/show_bug.cgi?id=1792059
See also: https://github.com/cherrypy/cherrypy/issues/1506
--
nosy: +petr.viktorin
Petr Viktorin added the comment:
Since the removal of PyNoArgsFunction breaks user code, does it deserve a
mention in What's New – Porting to Python 3.9?
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/is
Petr Viktorin added the comment:
I wrote about the _PyType_GetModuleByDef idea on the capi-sig mailing list:
https://mail.python.org/archives/list/capi-...@python.org/thread/T3P2QNLNLBRFHWSKYSTPMVEIL2EEKFJU/
--
___
Python tracker
<ht
Petr Viktorin added the comment:
> do we still only support single inheritance at the C level?
Not any more. Heap types may have multiple bases, and they can be created at
the C level (since Python 3.2, PEP 384).
> So, I think we should do something like walking up the hierarchy t
Petr Viktorin added the comment:
AFAICS, Python 3 suports '%u' for printf-style formatting:
Python 3.8.3 (default, May 29 2020, 00:00:00)
[GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux
Type "help", "copyright", "credits" or "license"
Petr Viktorin added the comment:
I'm closing the issue. Please comment or reopen if I missed something.
--
resolution: -> not a bug
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Petr Viktorin added the comment:
> If we extend PyType_GetSlot() to accept non-heaptype, we need find a way to
> judge the max slot of non-heaptype.
Static types can have some sub-slots structs but not others. A "max slot" will
not help for types that have tp_as_mapping but
Petr Viktorin added the comment:
What kind of security-related issues do you mean? A .pyc file is code; it can
do anything. Never run untrusted code, be it .py or .pyc.
See also: Lib/test/crashers/bogus_code_obj.py
--
nosy: +petr.viktorin
Petr Viktorin added the comment:
Would it be worth it to add a "base" keyword argument to glob.glob?
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.o
Change by Petr Viktorin :
--
keywords: +patch
pull_requests: +20518
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21374
___
Python tracker
<https://bugs.python.org/issu
Petr Viktorin added the comment:
New changeset 5a8d121a1f3ef5ad7c105ee378cc79a3eac0c7d4 by Rishi in branch
'master':
bpo-39017: Avoid infinite loop in the tarfile module (GH-21454)
https://github.com/python/cpython/commit/5a8d121a1f3ef5ad7c105ee378cc79a3eac0c7d4
-
Petr Viktorin added the comment:
Larry and Ned, do you want this fix in the security-only releases you manage?
PRs for 3.6 ad 3.7 are ready, should you wish to merge them.
--
nosy: +larry, ned.deily -miss-islington
___
Python tracker
<ht
Change by Petr Viktorin :
--
pull_requests: +20632
pull_request: https://github.com/python/cpython/pull/21489
___
Python tracker
<https://bugs.python.org/issue39
Petr Viktorin added the comment:
Closing; please re-open if you have more info.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Petr Viktorin added the comment:
Regarding ac46eb4ad6662cf6d771b20d8963658b2186c48c:
Module states come and go with the modules that contain them; if a
"get_global_ast_state" or "astmodulestate_global" needs to be accessed from
outside the module, it shouldn't be
Petr Viktorin added the comment:
> Also, option 1 is virtually equivalent to the state of the _ast module prior
> to the recent changes except that the symbols are in a shared object instead
> of the binary or libpython. The advantage here is not moving them out of the
> share
Change by Petr Viktorin :
--
pull_requests: +21082
pull_request: https://github.com/python/cpython/pull/21973
___
Python tracker
<https://bugs.python.org/issue41
Petr Viktorin added the comment:
New changeset d9a966ae08258da2ce2a432c943d8194760f09c4 by Petr Viktorin in
branch 'master':
bpo-38787: Clarify docs for PyType_GetModule and warn against common mistake
(GH-20215)
https://github.com/python/cpyt
Petr Viktorin added the comment:
I also looked into Mercurial. They have a large list of modules [0] that don't
work with the lazy-loading scheme. I don't think adding one more should be a
big problem for them; but we'll reach out to them and confirm that.
[0]
https:
Petr Viktorin added the comment:
We need this bug solved for 3.9.0 rc2. Łukasz, you're the one to make the call
about the approach; how can we make your job easier?
My view is:
- Victor's PR 21961 is going in the right direction. But, as far as I know
(correct me if I'm
Petr Viktorin added the comment:
IMO, a slot should be exposed if there is some reason for exposing it.
bpo-41073 talks about tp_dealloc, which is already exposed as Py_tp_dealloc.
Recently, Py_bf_* slots were exposed (but not as part of the limited API), in
bpo-40724 which links to the
Petr Viktorin added the comment:
That is interesting.
The original post here doesn't mention that the problem occurs in Mercurial's
"make all", specifically when building documentation, in the command:
/usr/bin/python3.9 gendoc.py "hgrc.5" > hgrc.5.txt
Petr Viktorin added the comment:
New changeset 1e2f051a6127904cfee5f9e4021dd6e4a4d51c0f by Hai Shi in branch
'master':
bpo-41726: Update the refcounts info of PyType_FromModuleAndSpec in
refcounts.dat (GH-22112)
https://github.com/python/cpyt
Petr Viktorin added the comment:
I started this here:
https://github.com/python/cpython/commit/60960cba606573450e76934c954787419524147d
Feel free to take that code.
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue41
New submission from Petr Viktorin :
One underlying issue from bpo-41631 is that importlib.util.LazyLoader produces
modules that are only fully loaded after an attribute is accessed (through
__getattribute__).
C-API functions like PyModule_GetState, PyModule_GetDict and such do not get
Change by Petr Viktorin :
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue41798>
___
___
Python-bugs-list mailing list
Unsubscribe:
Petr Viktorin added the comment:
The slots are originally intended for defining types (PyType_FromSpec);
PyType_GetSlot is not as useful as it could be.
tp_name can be exposed, but it needs to also be handled properly
PyType_FromSpec -- e.g. raise an error
Petr Viktorin added the comment:
Definitely. Sorry for the delay -- I missed the notification here.
--
___
Python tracker
<https://bugs.python.org/issue41
Petr Viktorin added the comment:
Also note that the capsule generally needs to hold references to the objects in
exposes, and not rely on the module object to keep things alive. (Module
objects with multi-phase init are not unique nor immortal.)
_ctypes is an exception, since it doesn't
Petr Viktorin added the comment:
Thanks Victor, Hai Shi, Pablo, Stefan, Dong-hee Na and Mariatta for reviews!
I did not put all the details in the documentation because there are still
feature gaps. So, a full write-up is now in the informational PEP 630.
--
resolution: -> fi
Petr Viktorin added the comment:
Ah, scratch that: PyType_GetSlot returns a function pointer.
To be correct, we should to expose a new function like PyType_GetName.
It's true that CPython currently doesn't always honor the distinction between
data and function pointers, but the
Petr Viktorin added the comment:
Also: PyType_GetSlot should return a function pointer, not data.
For some slots (Py_tp_doc, Py_tp_methods, Py_tp_members, Py_tp_getset) that
ship has sailed, but for new ones, we should honor the distinction between data
and function pointers. The C standard
Petr Viktorin added the comment:
Thank you, Stefan!
This should have a test as well.
I'm willing to mentor someone who wants to get into the C-API, otherwise this
has low priority for me.
--
resolution: -> fixed
stage: test needed -> resolved
status: ope
Change by Petr Viktorin :
--
resolution: fixed ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue40703>
___
___
Python-bugs-list
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Petr Viktorin added the comment:
New changeset 38a17d0752781c70fd971f372ddc8d3caf5ded88 by Miss Skeleton (bot)
in branch '3.9':
bpo-41726: Update the refcounts info of PyType_FromModuleAndSpec in
refcounts.dat (GH-22112) (GH-22808)
https://github.com/python/cpyt
New submission from Petr Viktorin :
I would like to add an internal _PyType_GetModuleByDef function to unblock
further work on isolating extension modules, as discussed here:
https://mail.python.org/archives/list/capi-...@python.org/thread/T3P2QNLNLBRFHWSKYSTPMVEIL2EEKFJU
Change by Petr Viktorin :
--
components: +C API
type: -> enhancement
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue42100>
___
___
Py
Change by Petr Viktorin :
--
keywords: +patch
pull_requests: +21789
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22835
___
Python tracker
<https://bugs.python.org/issu
Change by Petr Viktorin :
--
nosy: +petr.viktorin
nosy_count: 18.0 -> 19.0
pull_requests: +21792
pull_request: https://github.com/python/cpython/pull/22838
___
Python tracker
<https://bugs.python.org/issue1
Petr Viktorin added the comment:
Here is a PR for _PyType_GetModuleByDef:
https://github.com/python/cpython/pull/22835
--
___
Python tracker
<https://bugs.python.org/issue40
New submission from Petr Viktorin :
The "xxlimited" module (Modules/xxlimited.c) was added as part of PEP
384 (Defining a Stable ABI), and is undocumented. As far as I can tell,
it was added partly to test the stable ABI, and partly as an example of
how to write a module (like
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.
--
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
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
Change by Petr Viktorin :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue38980>
___
___
Pyth
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
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
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
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
Change by Petr Viktorin :
--
assignee: -> petr.viktorin
___
Python tracker
<https://bugs.python.org/issue42111>
___
___
Python-bugs-list mailing list
Un
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
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
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
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
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
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Change by Petr Viktorin :
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue41237>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Petr Viktorin added the comment:
Added.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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:
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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,
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
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
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
<
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
Petr Viktorin added the comment:
Avoiding the duplication makes sense, but without the rest of PEP 590 it could
just be a static function in call.c.
--
___
Python tracker
<https://bugs.python.org/issue36
Petr Viktorin added the comment:
Ah, sorry, I didn't get the message through.
I'll merge it with the rest of PEP 590. Adding the symbol doesn't make sense
*right* now.
--
___
Python tracker
<https://bugs.pyt
Petr Viktorin added the comment:
If and when a function uses the vectorcall protocol (including the argument
offset flag), it makes sense to rename it to vectorcall. Doing it before is
misleading, IMO.
Splitting fixes to unrelated issues (like bpo-36907) from PEP 590 is great, but
this one
Petr Viktorin added the comment:
All these issues are quite confusing. If PEP 590 is accepted, all of it will
need to be implemented. Why open separate issues for all the parts?
--
___
Python tracker
<https://bugs.python.org/issue36
Petr Viktorin added the comment:
New changeset 77aa396bb9415428de09112ddf6b34bb843811eb by Petr Viktorin (Jeroen
Demeyer) in branch 'master':
bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381)
https://github.com/python/cpython/commit/77aa396bb9415428de09112ddf6b34
Petr Viktorin added the comment:
Jeroen, do you want to also do a backport for 3.7?
--
___
Python tracker
<https://bugs.python.org/issue36907>
___
___
Python-bug
Petr Viktorin added the comment:
We do, but here the test will need to be changed:
Python 3.7.3+ (heads/3.7:791e5fcbab, May 22 2019, 13:37:27)
[GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for
Petr Viktorin added the comment:
Closing per discussion in https://github.com/python/cpython/pull/13357
--
resolution: -> not a bug
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Petr Viktorin added the comment:
New changeset 33e71e01e95506cf8d93fd68251fc56352bc7b39 by Petr Viktorin (Marcel
Plch) in branch 'master':
bpo-31862: Port binascii to PEP 489 multiphase initialization (GH-4108)
https://github.com/python/cpython/commit/33e71e01e95506cf8d93fd68251fc5
Petr Viktorin added the comment:
New changeset d092caf096fa48baadfc0900792206bb5aa0192d by Petr Viktorin (Jeroen
Demeyer) in branch '3.7':
bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381) (GH-13493)
https://github.com/python/cpyt
Change by Petr Viktorin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Petr Viktorin :
If the PyObject_MALLOC() call failed in PyType_FromSpecWithBases(),
PyObject_Free() would be called on a static string in type_dealloc().
Fixed by Zackery Spytz in pull request 10304. I'm opening the issue
retroactively.
--
messages: 343194
Change by Petr Viktorin :
--
pull_requests: +13412
___
Python tracker
<https://bugs.python.org/issue37012>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petr Viktorin :
--
pull_requests: +13411
___
Python tracker
<https://bugs.python.org/issue37012>
___
___
Python-bugs-list mailing list
Unsubscribe:
Petr Viktorin added the comment:
New changeset f1e17e9f97d9a4e97a5d99574775ee343a3a74fb by Petr Viktorin in
branch 'master':
bpo-34626: Document creating heap types from the C-API (GH-9154)
https://github.com/python/cpython/commit/f1e17e9f97d9a4e97a5d99574775ee
Petr Viktorin added the comment:
It looks like this caused bpo-37072: PyAST_FromNodeObject doesn't ignore flags
any more, and when PyNode_Compile passes NULL flags, it crashes.
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.py
Petr Viktorin added the comment:
Looks like this is caused by:
https://github.com/python/cpython/pull/12086/files#diff-4d35cf8992b795c5e97e9c8b6167cb34R787
PyAST_FromNodeObject doesn't ignore flags any more, so when PyNode_Compile
passes NULL flags, it crashes.
(This is unfamiliar cod
501 - 600 of 907 matches
Mail list logo