[Python-Dev] Re: PEP 554 for 3.9 or 3.10?

2020-04-24 Thread Petr Viktorin

On 2020-04-22 08:05, Glenn Linderman wrote:

On 4/21/2020 10:26 PM, Greg Ewing wrote:

And if I understand correctly, you won't get any nice "This
module does not support subinterpreters" exception if you
import an incompatible module -- just an obscure crash,
probably of the core-dumping variety. 


This sounds fixable: modules that support subinterpreters should set a 
flag saying so, and the either the load of a non-flagged module when 
subinterpreters are in use, or the initiation of a subinterpreter when a 
non-flagged module has been loaded, should raise.



There was talk about making a orthogonal flag just for opting into 
subinterpreter support. But what you use now as such a flag is 
multi-phase initialization: 
https://docs.python.org/3/c-api/module.html?highlight=pymodule_fromdefandspec#multi-phase-initialization


(Though I like the PEP 489 wording, "expected to support subinterpreters 
and multiple Py_Initialize/Py_Finalize cycles correctly", better than 
what ended up in the docs.)



The simplest strategy to support subinterpreters correctly is to refuse 
to create the extension module more than once per process (with an 
appropriate error, of course).

___
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/5J5XTTDUKZWEVDSU3V67W3FYOY7VA7UO/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Summary of Python tracker Issues

2020-04-24 Thread Python tracker

ACTIVITY SUMMARY (2020-04-17 - 2020-04-24)
Python tracker at https://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open7452 ( +9)
  closed 44675 (+57)
  total  52127 (+66)

Open issues with patches: 2942 


Issues opened (50)
==

#34037: asyncio: BaseEventLoop.close() shutdowns the executor without 
https://bugs.python.org/issue34037  reopened by vstinner

#40286: Add randbytes() method to random.Random
https://bugs.python.org/issue40286  reopened by rhettinger

#40312: Weakref callbacks running before finalizers in GC collection
https://bugs.python.org/issue40312  opened by a-feld

#40314: python code order of magnitude faster than equivalent CPython 
https://bugs.python.org/issue40314  opened by deekay

#40316: Add zero function to time, datetime, which acts as the use cas
https://bugs.python.org/issue40316  opened by Or Toledano

#40317: inspect.getsource() examines incorrect target
https://bugs.python.org/issue40317  opened by Grzegorz Krasoń

#40318: Migrate to SQLite3 trace v2 API
https://bugs.python.org/issue40318  opened by erlendaasland

#40320: Add ability to specify instance of contextvars context to Task
https://bugs.python.org/issue40320  opened by Jeff.Laughlin

#40321: urllib.request does not support HTTP response status code 308
https://bugs.python.org/issue40321  opened by Jochem Schulenklopper

#40324: python 3.8.2 idle not opening
https://bugs.python.org/issue40324  opened by krishandanushka...@gmail.com

#40327: list(sys.modules.items()) can throw RuntimeError: dictionary c
https://bugs.python.org/issue40327  opened by Markus Mohrhard

#40328: Add tools for generating mappings_XX.h
https://bugs.python.org/issue40328  opened by corona10

#40331: Increase test coverage for the statistics module
https://bugs.python.org/issue40331  opened by tzabal

#40333: Request for multi-phase initialization API to run code after i
https://bugs.python.org/issue40333  opened by indygreg

#40334: PEP 617: new PEG-based parser
https://bugs.python.org/issue40334  opened by gvanrossum

#40337: builtins.RuntimeError: Caught RuntimeError in pin memory threa
https://bugs.python.org/issue40337  opened by shawn

#40338: [Security] urllib and anti-slash (\) in the hostname
https://bugs.python.org/issue40338  opened by vstinner

#40339: Instead of skipping, IPV6 test(s) fail on a non-IPV6 machine
https://bugs.python.org/issue40339  opened by UnitedMarsupials

#40340: Programming FAQ about "How do I convert a string to a number?"
https://bugs.python.org/issue40340  opened by Dominik V.

#40341: Programming FAQ includes actively discouraged solutions; Shoul
https://bugs.python.org/issue40341  opened by Dominik V.

#40342: Programming FAQ about "How do I apply a method to a sequence o
https://bugs.python.org/issue40342  opened by Dominik V.

#40343: Programming FAQ about "How do I call a method defined in a bas
https://bugs.python.org/issue40343  opened by Dominik V.

#40344: Programming FAQ about "What is the most efficient way to conca
https://bugs.python.org/issue40344  opened by Dominik V.

#40345: Programming FAQ about "How do I iterate over a sequence in rev
https://bugs.python.org/issue40345  opened by Dominik V.

#40346: Add random.BaseRandom to ease implementation of subclasses
https://bugs.python.org/issue40346  opened by vstinner

#40347: Programming FAQ about "How do you remove duplicates from a lis
https://bugs.python.org/issue40347  opened by Dominik V.

#40348: Programming FAQ about "What is delegation?": Fix typos
https://bugs.python.org/issue40348  opened by Dominik V.

#40350: modulefinder chokes on numpy - dereferencing None in spec.load
https://bugs.python.org/issue40350  opened by Greg Whiteley

#40352: SocketHandler silently drops log messages on re-connect
https://bugs.python.org/issue40352  opened by Oleg Nykolyn

#40353: Add an optional "strict" check to zip
https://bugs.python.org/issue40353  opened by brandtbucher

#40355: The ast module fails to reject certain malformed nodes
https://bugs.python.org/issue40355  opened by brandtbucher

#40356: OverflowError: mktime argument out of range
https://bugs.python.org/issue40356  opened by darkman66

#40357: asyncio: will shutdown_default_executor work in single step (s
https://bugs.python.org/issue40357  opened by cmeyer

#40358: pathlib's relative_to should behave like os.path.relpath
https://bugs.python.org/issue40358  opened by d.ragusa

#40359: email.parse part.get_filename() fails to unwrap long attachmen
https://bugs.python.org/issue40359  opened by matt-davis

#40360: Deprecate lib2to3 (and 2to3) for future removal
https://bugs.python.org/issue40360  opened by gregory.p.smith

#40361: Darwin systems using win settings for webbrowser.py
https://bugs.python.org/issue40361  opened by Viraat Das

#40362: AbstractBasicAuthHandler does not support the following scheme
https://bugs.python.org/issue40362  opened by Paul St