[Python-Dev] Re: PEP 558, the simplest thing I could come up with

2021-07-30 Thread Nick Coghlan
On Fri, 30 Jul 2021, 2:30 pm Nathaniel Smith,  wrote:

>
> >
> > For [proxy] versus [snapshot], a lot depends on what we think of
> changing the semantics of exec(). [proxy] is definitely more consistent and
> elegant, and if we could go back in time I think it's
> what we'd have done from the start. Its compatibility is maybe a bit
> worse than [snapshot] on non-exec() cases, but this seems pretty minor
> overall (it often doesn't matter, and if it does just write
> dict(locals()) instead of locals(), like you would in non-function
> scope). But the change in exec() semantics is an actual language
> change, even though it may not affect much real code, so that's what
> stands out for me.
>
> I *think* (please correct me if I'm wrong) that what that calls
> [PEP-minus-tracing] is now corresponds to the current PEP draft, and
> [proxy] corresponds to Mark's draft at the beginning of this thread?
>

At the locals() level, PEP 558 is now [snapshot] (due to your original
analysis showing that it was strictly better than what I had at the time),
while Mark's draft is indeed [proxy].

Cheers,
Nick.



> -n
>
> --
> Nathaniel J. Smith -- https://vorpus.org
>
___
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/ZQM44JMPRJ6ISZ2Z6BBYMPDRP3JBEMYV/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Repealing PEP 509 (Add a private version to dict)

2021-07-30 Thread Mats Wichmann

On 7/29/21 1:32 PM, Brett Cannon wrote:



On Thu, Jul 29, 2021 at 3:47 AM Mark Shannon > wrote:


Hi everyone,

I would like to repeal PEP 509. We don't really have a process for
repealing a PEP. Presumably I would just write another PEP.


Yeah, it's probably a new PEP explaining why the first PEP turned out to 
not work out since it's undoing a "big" decision. Otherwise it's like 
withdrawing the PEP post-acceptance.



That would allow placing a simple tag in the original, like "Superseded 
by PEP XXX".



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


[Python-Dev] Windows buildbots may be broken

2021-07-30 Thread Jason R. Coombs
Jeremy informed 
me that 
due to a race condition on a test file and the CPython repo configuration for 
newline conversion, build bots on Windows may now be failing.

If you run such a buildbot, please consider running this command on your repo 
to bypass the issue:

git rm -r :/ ; git checkout HEAD -- :/


You may want to consider adding this command after every update to the repo to 
avoid the stale state.


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


[Python-Dev] Summary of Python tracker Issues

2021-07-30 Thread Python tracker


ACTIVITY SUMMARY (2021-07-23 - 2021-07-30)
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:
  open7395 (-25)
  closed 49121 (+80)
  total  56516 (+55)

Open issues with patches: 2926 


Issues opened (34)
==

#15870: PyType_FromSpec should take metaclass as an argument
https://bugs.python.org/issue15870  reopened by belopolsky

#36050: Why does http.client.HTTPResponse._safe_read use MAXAMOUNT
https://bugs.python.org/issue36050  reopened by bmerry

#41103: Removing old buffer support
https://bugs.python.org/issue41103  reopened by methane

#44479: Windows build doesn't regenerate some files
https://bugs.python.org/issue44479  reopened by steve.dower

#44676: Add ability to serialise types.Union
https://bugs.python.org/issue44676  reopened by serhiy.storchaka

#44729: sys.setprofile bug
https://bugs.python.org/issue44729  opened by AliyevH

#44730: unittest.mock.patch does not work as a decorator on generator 
https://bugs.python.org/issue44730  opened by garethmjwilliams

#44733: Feature request: maxtasksperchild for ProcessPoolExecutor
https://bugs.python.org/issue44733  opened by cool-RR

#44735: Failed venv Activation With "&" In Folder Name
https://bugs.python.org/issue44735  opened by adore_blvnk

#44738: io_uring as a new backend to selectors and asyncio
https://bugs.python.org/issue44738  opened by achimnol

#44740: Lowercase "Internet" and "web" in docs
https://bugs.python.org/issue44740  opened by felixxm

#44742: smtplib: less confusing behaviour when giving incorrect multip
https://bugs.python.org/issue44742  opened by cmatte

#44743: asyncio DatagramProtocol stops calling callbacks after OSError
https://bugs.python.org/issue44743  opened by JulianOrteil

#44744: [security] Open redirect attack due to insufficient validation
https://bugs.python.org/issue44744  opened by ready-research

#44745: Manual for python 3.9.6 will not let me search
https://bugs.python.org/issue44745  opened by matthman2019

#44748: argparse: a bool indicating if arg was encountered
https://bugs.python.org/issue44748  opened by Thermi

#44749: LOAD_NAME not using PyObject_GetItem when globals() is a dict 
https://bugs.python.org/issue44749  opened by douglas-raillard-arm

#44760: Turtle Documentation - Contents Hyperlink conflict
https://bugs.python.org/issue44760  opened by ray_giraffe

#44762: getpass.getpass on Windows fallback detection is bad
https://bugs.python.org/issue44762  opened by matejcik

#44764: Handling interruption in async tasks
https://bugs.python.org/issue44764  opened by ilian

#44766: [easy doc] Remove redundant info in README.valgrind
https://bugs.python.org/issue44766  opened by shihai1991

#44767: python -m flask run gives OSError: [WinError 10013] An attempt
https://bugs.python.org/issue44767  opened by chandrakant.rvce

#44769: socketserver.shutdown should stop serve_forever()  immediately
https://bugs.python.org/issue44769  opened by petr.viktorin

#44771: Adopt changes from importlib_resources 5.2
https://bugs.python.org/issue44771  opened by jaraco

#44772: Regression in memory use of instances due to dictionary orderi
https://bugs.python.org/issue44772  opened by Mark.Shannon

#44773: case_insensitive kwarg in str.replace()
https://bugs.python.org/issue44773  opened by nimit.grover24

#44774: incorrect sys.stdout.encoding within a io.StringIO buffer
https://bugs.python.org/issue44774  opened by pcarbonn

#44775: Speed-up typing.cast by implementing it in C
https://bugs.python.org/issue44775  opened by uriyyo

#44776: Docs on mobile do not use monospace font for code snippets, mi
https://bugs.python.org/issue44776  opened by alexprengere

#44779: Checkouts stale following changes to .gitattributes
https://bugs.python.org/issue44779  opened by jaraco

#44780: Incorrect message: "Invalid decimal literal" (python 3.10)
https://bugs.python.org/issue44780  opened by aroberge

#44781: test_distutils emits deprecation warning about distutils
https://bugs.python.org/issue44781  opened by iritkatriel

#44782: LRU class given as example in OrderedDict docs not work on pop
https://bugs.python.org/issue44782  opened by maximeLeurent

#44783: SSL needs client OCSP stapling
https://bugs.python.org/issue44783  opened by pprindeville



Most recent 15 issues with no replies (15)
==

#44783: SSL needs client OCSP stapling
https://bugs.python.org/issue44783

#44782: LRU class given as example in OrderedDict docs not work on pop
https://bugs.python.org/issue44782

#44781: test_distutils emits deprecation warning about distutils
https://bugs.python.org/issue44781

#44780: Incorrect message: "Invalid decimal literal" (python 3.10)
https://bugs.python.org/issue44780

#44779: Checkouts stale following changes to .gitattributes
https://bugs.python.org/issue44779

#44775: Speed-up typing.cast by implementing it in C
https://bugs.p

[Python-Dev] Request for review: issue 42815: new thread doesn't copy context of the parent thread

2021-07-30 Thread Jesus Cea

https://bugs.python.org/issue42815

https://github.com/python/cpython/pull/24074


I would love to have this in Python 3.10, but the interaction with 
"decimal" context has a risk I don't know how to evaluate, neither the 
impact of a new "context" parameter when launching a new thread. It 
could collide with a "frequently used" parameter name.


I know that we are quite late in 3.10 window since rc1 is planned in a 
couple of days, but I think this enhancement is sensible. In fact, I 
discovered it after being annoyed myself with this issue (threads should 
have their own contexts) and studying the code to write a patch myself.


In particular, "concurrent.futures" threads should have independent 
contexts, like asyncio futures have. That would allow, for instance, to 
have a "requests.Session" object per thread since that object is not 
thread-safe (my use case today) and reuse it in different futures that 
happens to run in the same thread.


Since "contextvars" is "threading.local" correctly done, let's do it for 
real.


If legacy code expects a thread to be able to modify parent context, 
just pass that context to the thread explicitly.


--
Jesús Cea Avión _/_/  _/_/_/_/_/_/
[email protected] - https://www.jcea.es/_/_/_/_/  _/_/_/_/  _/_/
Twitter: @jcea_/_/_/_/  _/_/_/_/_/
jabber / xmpp:[email protected]  _/_/  _/_/_/_/  _/_/  _/_/
"Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz



OpenPGP_signature
Description: OpenPGP digital signature
___
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/M67OMDBNFN5FLGLO7HZFJ6CUPK5Z4PJE/
Code of Conduct: http://python.org/psf/codeofconduct/