[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-06-01 Thread STINNER Victor


STINNER Victor  added the comment:

I made sure that it's no longer possible to create a type with 
Py_TPFLAGS_HAVE_GC flag set but with no traverse function (tp_traverse=NULL). I 
close again the issue.

--
components: +C API, Interpreter Core
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-06-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ee7637596d8de25f54261bbeabc602d31e74f482 by Victor Stinner in 
branch 'main':
bpo-44263: Py_TPFLAGS_HAVE_GC requires tp_traverse (GH-26463)
https://github.com/python/cpython/commit/ee7637596d8de25f54261bbeabc602d31e74f482


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread miss-islington


miss-islington  added the comment:


New changeset 46b16d0bdbb1722daed10389e27226a2370f1635 by Miss Islington (bot) 
in branch '3.9':
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)
https://github.com/python/cpython/commit/46b16d0bdbb1722daed10389e27226a2370f1635


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7fe9cad606a4ac7ac138528dcd19546394bc5a44 by Miss Islington (bot) 
in branch '3.10':
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464) (GH-26465)
https://github.com/python/cpython/commit/7fe9cad606a4ac7ac138528dcd19546394bc5a44


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25061
pull_request: https://github.com/python/cpython/pull/26466

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25060
pull_request: https://github.com/python/cpython/pull/26465

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 142e5c5445c019542246d93fe2f9e195d3131686 by Victor Stinner in 
branch 'main':
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)
https://github.com/python/cpython/commit/142e5c5445c019542246d93fe2f9e195d3131686


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25059
pull_request: https://github.com/python/cpython/pull/26464

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25058
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/26463

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue. I would prefer to change PyType_FromSpecWithBases() to 
raise an error if a type has the Py_TPFLAGS_HAVE_GC flag but its tp_traverse 
function is NULL.

Oops, the Python stdlib has more types than only _ssl.SSLError with this error:

* _decimal: PyDecSignalDictMixin_Type (internal type)
* _testcapi: heapctype

--
nosy: +vstinner
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d8ce746e7c5193757c8d316105870b0dc5d6fa53 by Miss Islington (bot) 
in branch '3.10':
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445) (#26446)
https://github.com/python/cpython/commit/d8ce746e7c5193757c8d316105870b0dc5d6fa53


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread miss-islington


miss-islington  added the comment:


New changeset 7bd1304d49a110700b3f079e4b2dd1052a23bde4 by Miss Islington (bot) 
in branch '3.9':
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)
https://github.com/python/cpython/commit/7bd1304d49a110700b3f079e4b2dd1052a23bde4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25041
pull_request: https://github.com/python/cpython/pull/26447

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25040
pull_request: https://github.com/python/cpython/pull/26446

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 43cf7c864a2941b3f8f823e5928721dd286b7778 by Pablo Galindo in 
branch 'main':
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)
https://github.com/python/cpython/commit/43cf7c864a2941b3f8f823e5928721dd286b7778


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 11049bece15b6fa08fa6d74aea8eb6bc2ebadfe5 by Miss Islington (bot) 
in branch '3.10':
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases 
(GH-26442) (GH-26443)
https://github.com/python/cpython/commit/11049bece15b6fa08fa6d74aea8eb6bc2ebadfe5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread miss-islington


miss-islington  added the comment:


New changeset a30cbaee84262cdd4597f3204861ccdd86bbf533 by Miss Islington (bot) 
in branch '3.9':
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases 
(GH-26442)
https://github.com/python/cpython/commit/a30cbaee84262cdd4597f3204861ccdd86bbf533


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25038
pull_request: https://github.com/python/cpython/pull/26445

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 8b55bc3f93a655bc803bff79725d5fe3f124e2f0 by Pablo Galindo in 
branch 'main':
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases 
(GH-26442)
https://github.com/python/cpython/commit/8b55bc3f93a655bc803bff79725d5fe3f124e2f0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25036
pull_request: https://github.com/python/cpython/pull/26444

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +25035
pull_request: https://github.com/python/cpython/pull/26443

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +25034
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26442

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-28 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

We currently don't properly document how PyType_FromSpecWithBases behaves if 
the class is inheriting from some other class with GC support.

--
messages: 394706
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Better explain the GC contract for PyType_FromSpecWithBases

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com