STINNER Victor added the comment:
Fixed by:
commit bf69a8f99f1b0e19a59509c6c4d7015a31d881a1
Author: Dong-hee Na
Date: Tue Jun 16 01:20:54 2020 +0900
bpo-1635741: Port _dbm module to multiphase initialization (GH-20848)
--
nosy: +vstinner
resolution: -> duplicate
stage: ->
Robin Schreiber added the comment:
Take a look at the discussion in Issue 15653.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15650
___
___
Changes by Robin Schreiber robin.schrei...@me.com:
--
keywords: +pep3121 -patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15650
___
___
Changes by Andrew Svetlov andrew.svet...@gmail.com:
Added file: http://bugs.python.org/file27774/Issue15650_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15650
___
Andrew Svetlov added the comment:
Robin, after thinking I would to agree with your decision to hold reference to
type into type instance.
Please, can you describe your check like:
if((void *)type-tp_dealloc == (void *)dbm_dealloc) {
Py_DECREF(type);
}
Why you decref only if
Andrew Svetlov added the comment:
Robin, why do you increment refcounter for type object on every construction of
dbm instance?
Also I would to see macros in uppercase if possible.
--
___
Python tracker rep...@bugs.python.org
Robin Schreiber added the comment:
PEP384 demands, among other things, that the TypeObjects themselves are
transformed to Heaptypes. This means that the Typeobjects, that are created
from this new stable ABI, reside within the heap and therefore have to be
managed by the Python GC. This is of
Andrew Svetlov added the comment:
From my perspective type object is referenced by module state.
While module is present it's state hold all types exposed by module.
After module has deleted it's state has cleaned up and types has gone away —
thats look good to me.
Instances of python classes
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15650
___
___
Python-bugs-list mailing
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15650
___
___
New submission from Robin Schreiber:
Changes proposed in PEP3121 and PEP384 have now been applied to the dbm module!
--
components: Extension Modules
files: _dbmmodule_pep3121-384_v0.patch
keywords: patch
messages: 168216
nosy: Robin.Schreiber
priority: normal
severity: normal
status:
11 matches
Mail list logo