Commit Graph

15 Commits

Author SHA1 Message Date
Petr Viktorin 2758332c1e PEP 573: Remove DefiningTypeFromSlotFunc, split public/private API (#1275)
- Remove the MRO walker, PyType_DefiningTypeFromSlotFunc, as it was
  found it can give wrong results when a type's special methods are
  changed (which can be done from Python code).
  Solving the issue is deferred to a future PEP (and/or perhaps a
  private CPython function).
- Split public C-API from CPython implementation details. It turns out
  that alternate C-API implementations have grown more important
  since 2016, if only for experimenting with possible optimizations.
- Add potentially confusing terms "Defining Class" and "C-API" to the
  terminology section.
- Mention that ht_module is not inherited by subclasses.
- Remove modules to be ported initially: zipimport (since rewritten
  in Python), _io and _cvs (need module state from slot methods).
* Mention __class__ cell, expand slot methods in Future extensions

And fix a typo.
2020-01-16 07:19:07 +10:00
Nick Coghlan 34343da45d PEP 573: SystemError->TypeError and misc copy-edits (GH-1264)
* report TypeError rather than SystemError when bad types are passed
  to new APIs
* add PyType_FromModuleAndSpec to the list of new functions
* wrap text at 80 columns
* add C API docs links for thread-local storage and context variables
* note in abstract that only the initial state lookup from slots is
  inherently slow, with subsequent lookups being amenable to caching
* other minor wording tweaks
2020-01-03 13:24:51 +01:00
Petr Viktorin 01ee996ad2
PEP 573 updates (#1167)
* Remove stray reference to `ht_moduleptr`

* Update copyright info

* Remove the new slot for offsets

* Remove note on removed internal functions

* Remove stray reference to Py_TPFLAGS_HEAP_IMMUTABLE
2019-09-13 18:16:31 +01:00
Stefan Behnel b4495fd347 Update PEP-573 - Module state access
* Rewrite section on passing the "defining class" into C methods.

* Remove proposal for immutable heap exception types. Let's leave those to another PEP

* Restrict METH_METHOD to a single calling convention.
  This calling convention should be efficient, so also reduce the Optimization section.

* Set names in monospaced font

* Use `nargsf` for the vectorcall "number of args + flag" argument

* Link "per-module state" to the terminology section

* Adjust link to Marcel's current implementation

* Other minor rewordings

https://github.com/python/peps/pull/1159
2019-09-12 10:27:21 +01:00
Stefan Behnel 016d55f852
Fix list formatting in PEP 573. (GH-1158) 2019-09-09 17:30:48 +02:00
Min ho Kim cfb7bd74db Fix typos (#1113) 2019-07-03 11:20:45 -07:00
Min ho Kim e54097d3c4 Fix typos in various PEPs (#1111) 2019-06-24 21:58:50 -07:00
Nick Coghlan 6042e3287d
PEP 573: Stefan Behnel has accepted the BDFL-Delegate role (#1011) 2019-04-25 15:20:39 +10:00
Petr Viktorin a81fa94825 PEP 573: Defer to Python 3.9 (#1006) 2019-04-21 15:03:51 +10:00
Serhiy Storchaka ad7f2b2f6c Remove trailing spaces from many PEPs (#983) 2019-04-16 07:50:15 -07:00
Barry Warsaw 5d1b72d06d
Standards track peps should be Draft (#941) 2019-03-19 16:12:03 -07:00
Barry Warsaw 84d5ad1528
Fix PEP 573 type 2019-03-19 15:17:30 -07:00
Jeroen Demeyer 5ce2015e4f Typo 2018-04-25 01:34:45 +10:00
Marcel Plch 5b8cf1da73 PEP 573 updates (#618) 2018-04-13 20:35:49 +10:00
Marcel Plch 65aa281f0c PEP 573: Module State Access from C Extension Methods (#601)
Add initial PEP draft following previous import-sig discussions.
2018-03-27 22:19:09 +10:00