[Python-Dev] Re: Making PY_SSIZE_T_CLEAN not mandatory.

2021-06-07 Thread Hai Shi
> So how about making PY_SSIZE_T_CLEAN not mandatory in Python 3.11?
> Extension modules can use '#' format with ssize_t, without
> PY_SSIZE_T_CLEAN defined.
> Or should we wait one more version?

Hi, Inada,
I suggest we should wait until at least Python 3.12 or Python 4.0.

There have an another question. There have many C API defined under 
PY_SSIZE_T_CLEAN, for example: _PyArg_Parse_SizeT().
Could we remove or merge them after making PY_SSIZE_T_CLEAN not mandatory?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/MWMH6FWHJUUKI7OKBQR7OJJ6MZV6J35P/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Accepting PEP 573 (Module State Access from C Extension Methods)

2020-03-23 Thread Hai Shi
Wow, congratulations!

ps: two days ago, I asked petr what blocked PEP-573 privately(mch extension 
module need this pep ;))
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/C4XQJF7WFHUO5WRIVPDN44BFP3SYB3Q6/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Accepting PEP 573 (Module State Access from C Extension Methods)

2020-03-23 Thread Hai Shi
Wow, congratulations:)

Looking forword to Marcel' PRs:
https://github.com/python/cpython/compare/master...Dormouse759:pep-c-rebase_newer

ps: two days ago, I asked what blocked pep-0573 privately ;)
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/OILQKXDLN4UE4YTXNIBMNM7C3NLJCZL2/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Do we need port some extension modules to the modules directory?

2020-04-12 Thread Hai Shi
Hi,
I notice some modules not in modules directory(for example: 
_warnings、marshal in python directory). Do we need port those modules to 
modules directory?
Sorry for my noisy info.

Bests Wishs,
Hai Shi
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/MLJNTDIKOXTAQ73YLL4A7PC6ACL42HAJ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Do we need port some extension modules to the modules directory?

2020-04-13 Thread Hai Shi
Skip Montanaro wrote:
> > I notice some modules not in modules
> > directory(for example: _warnings、marshal in python directory). Do we need 
> > port those
> > modules to modules directory?
> > 
> > I strongly suspect the answer is "no." Modules which aren't in the
> Modules directory are built directly into the Python executable. Using
> your example of the _warnings module, note that in Makefile.pre.in
> Python/_warnings.o is listed in the PYTHON_OBJS list (as are
> Python/sysmodule.o and Python/marshal.o). This is evidence they are
> built directly into the interpreter itself. Another is that at runtime
> those modules have no __file__ attribute:
> > import marshal
> > marshal.__file__
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > AttributeError: module 'marshal' has no attribute '__file__'
> > import sys
> > sys.__file__
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > AttributeError: module 'sys' has no attribute '__file__'
> > import _warnings
> > _warnings.__file__
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > AttributeError: module '_warnings' has no attribute '__file__'
> > Skip

Hi, skip,
Thank you for your replay. IMHO, it's because those module is 
builtinmodules, so they have no __file__ attribute and listed in PYTHON_OBJS(I 
am not sure I understand clearly). But I have no clear criteria what module 
should be putted in python directory or modules directory. I found some core 
developer have mentioned this detail 13 years 
ago(https://bugs.python.org/issue1631171).

Best Wishs,
Hai Shi
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/XQD3KSBERANOR5VUFLCZALVUD3DCYKCQ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Do we need port some extension modules to the modules directory?

2020-04-13 Thread Hai Shi
Eric Snow wrote:
> In practice neither has been a problem over the years.  However, it
> does make discovery a bit more complicated, both for new contributors
> and for tools.  So I consider it at the least worth looking into the
> value (and downsides, if any) of moving the seemingly out-of-place
> pieces to the appropriate locations.

Hi, Eric,
Thank you for your speedy reply. You put my thoughts into words ;)
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ZZR2OA36FGNANJCOGDTPWDICHC5NQHLJ/
Code of Conduct: http://python.org/psf/codeofconduct/