[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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/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-12 Thread Skip Montanaro
> 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
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/U4Q622G32XJGIXUMIW3V7QPKMHK7PEEV/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Providing fix for modulefinder.py regression on Windows

2020-04-12 Thread Barry Scott

> On 11 Apr 2020, at 16:28, Barry Scott  wrote:
> 
> modulefinder.py does not open source files in "rb" which
> prevents compile() from applying the encoding rules.
> 
snip

I have created the bpo, the pr and have the checks passing except that I need a 
NEWS.d entry
to make bedevere/news happy. I see the files have a special filename is that 
from an automatic
process of a tool I need to run?

Barry


> Barry
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/[email protected]/message/6IWG2SXTZAWEWYIBQ5LUR5G5S7MUODMV/
> Code of Conduct: http://python.org/psf/codeofconduct/
> 

___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/MATZ26CEYKC7OZRMYYVZDDHV24Z2WIJO/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Providing fix for modulefinder.py regression on Windows

2020-04-12 Thread Eric V. Smith

On 4/12/2020 4:08 PM, Barry Scott wrote:


On 11 Apr 2020, at 16:28, Barry Scott > wrote:


modulefinder.py does not open source files in "rb" which
prevents compile() from applying the encoding rules.


snip

*I have created the bpo, the pr and have the checks passing except 
that I need a NEWS.d entry*
*to make bedevere/news happy. I see the files have a special filename 
is that from an automatic*

*process of a tool I need to run?*
*
*
*Barry*

The tool is blurb (or the online blurb-it): 
https://devguide.python.org/committing/#what-s-new-and-news-entries


Eric

___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/AZQ6VYPYSQTTZI4EIR5MDYE4LAU2CW3Q/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Providing fix for modulefinder.py regression on Windows

2020-04-12 Thread Victor Stinner
Barry Scott created https://bugs.python.org/issue40260 and
https://github.com/python/cpython/pull/19488.

Victor

Le dim. 12 avr. 2020 à 22:11, Barry Scott  a écrit :
>
>
> On 11 Apr 2020, at 16:28, Barry Scott  wrote:
>
> modulefinder.py does not open source files in "rb" which
> prevents compile() from applying the encoding rules.
>
> snip
>
> I have created the bpo, the pr and have the checks passing except that I need 
> a NEWS.d entry
> to make bedevere/news happy. I see the files have a special filename is that 
> from an automatic
> process of a tool I need to run?
>
> Barry
>
>
> Barry
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/[email protected]/message/6IWG2SXTZAWEWYIBQ5LUR5G5S7MUODMV/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/[email protected]/message/MATZ26CEYKC7OZRMYYVZDDHV24Z2WIJO/
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/OJIV4U2GHYD7GBZ6NFHBAESHDZCNR37L/
Code of Conduct: http://python.org/psf/codeofconduct/