This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Export PyModuleObject in moduleobject.h
Type: enhancement Stage: resolved
Components: C API Versions: Python 3.11
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: h.venev, iritkatriel, ncoghlan, petr.viktorin, scoder
Priority: normal Keywords:

Created on 2015-03-08 16:31 by h.venev, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg237543 - (view) Author: Hristo Venev (h.venev) * Date: 2015-03-08 16:31
Please export PyModuleObject in moduleobject.h.

It's useful for subclassing module in C.
msg252357 - (view) Author: Hristo Venev (h.venev) * Date: 2015-10-05 19:51
Quote from PEP 489:
The Py_mod_create slot is used to support custom module subclasses.

There is no way to subclass PyModuleObject from C.
msg396990 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-07-05 14:20
+ PEP 489 authors.
msg396991 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2021-07-05 14:29
Could you explain a bit why you want to subclass "PyModuleObject" in C? Why isn't a Python subclass or an independent (non-module) C extension type enough?
msg396992 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2021-07-05 14:33
I only just noticed that the original request is from 2015. My guess is that this is a resolved problem, given the available options. I'll close this ticket as outdated. Please comment if this is still an issue.
History
Date User Action Args
2022-04-11 14:58:13adminsetgithub: 67797
2021-07-05 14:33:00scodersetstatus: open -> closed
resolution: out of date
messages: + msg396992

stage: resolved
2021-07-05 14:30:28scodersettype: enhancement
components: + C API, - Interpreter Core
versions: + Python 3.11, - Python 3.5
2021-07-05 14:29:23scodersetmessages: + msg396991
2021-07-05 14:20:23iritkatrielsetnosy: + petr.viktorin, iritkatriel, ncoghlan, scoder
messages: + msg396990
2015-10-05 19:51:32h.venevsetmessages: + msg252357
versions: + Python 3.5, - Python 3.4
2015-03-08 16:31:57h.venevcreate