[Python-Dev] Re: Three trivial PRs from first-timers in need of merging!

2020-02-21 Thread Tal Einat
Thanks for bringing these to our attention Brandt!

Mariatta merged the first PR a few hours ago, and I just merged the second
PR now.

The third PR looks good, but it would be good for someone with a bit more
experience with our C code to take a quick glance before we merge it.

- Tal Einat

On Fri, Feb 21, 2020 at 8:49 AM Kyle Stanley  wrote:

> Thanks for bring attention to these PRs, Brandt! I think the second one
> should be particularly uncontroversial, seeing as it's just applying PEP
> 409 (raise from None) to an existing exception in an argparse unit test to
> clean up some unhelpful context clutter in the traceback.
>
> On Thu, Feb 20, 2020 at 11:41 PM Brandt Bucher 
> wrote:
>
>> Hi everybody!
>>
>> I've found a handful of trivial PRs from new contributors that have gone
>> un-core-reviewed since November. CLAs are signed, tests are passing, and
>> I've verified the quality and correctness of each one.
>>
>> If anybody has a few spare minutes to merge these, I know that it would
>> make the authors very happy! :)
>>
>> Clarify numeric padding behaviour in string formatting:
>> - A helpful doc addition (just a few words).
>> - https://github.com/python/cpython/pull/17036
>>
>> argparse unittest tracebacks are confusing if an error is raised when not
>> expected:
>> - This just changes a "raise" to a "raise from None" in the argparse unit
>> test machinery.
>> - https://github.com/python/cpython/pull/17120
>>
>> Reuse identifier of PREDICT macros as PREDICT_ID:
>> - Unifies some shared naming logic in the ceval prediction macros (don't
>> worry, it's simple).
>> - https://github.com/python/cpython/pull/17155/files
>>
>> Thanks.
>>
>> Brandt
>> ___
>> 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/46U2H5U2BAACZZETIWJTAJAGXJSD6MKO/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
> ___
> 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/PAOV4YWV4FJDM7WEOJ2DSMCO4XWHWFWZ/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
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/VILCDKNHD5MTQ5TUTSVQARMBX3JMTFKJ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Three trivial PRs from first-timers in need of merging!

2020-02-21 Thread Brandt Bucher
All of these have been landed. Thanks, everybody!
___
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/GU6AWXQP4KIYMRSHPLGSNOATLR4RBTAK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Three trivial PRs from first-timers in need of merging!

2020-02-21 Thread joannah nanjekye
I think all are merged now even the C PR.  * I was looking at it but found
it merged.*

On Fri, Feb 21, 2020 at 5:02 AM Tal Einat  wrote:

> Thanks for bringing these to our attention Brandt!
>
> Mariatta merged the first PR a few hours ago, and I just merged the second
> PR now.
>
> The third PR looks good, but it would be good for someone with a bit more
> experience with our C code to take a quick glance before we merge it.
>
> - Tal Einat
>
> On Fri, Feb 21, 2020 at 8:49 AM Kyle Stanley  wrote:
>
>> Thanks for bring attention to these PRs, Brandt! I think the second one
>> should be particularly uncontroversial, seeing as it's just applying PEP
>> 409 (raise from None) to an existing exception in an argparse unit test to
>> clean up some unhelpful context clutter in the traceback.
>>
>> On Thu, Feb 20, 2020 at 11:41 PM Brandt Bucher 
>> wrote:
>>
>>> Hi everybody!
>>>
>>> I've found a handful of trivial PRs from new contributors that have gone
>>> un-core-reviewed since November. CLAs are signed, tests are passing, and
>>> I've verified the quality and correctness of each one.
>>>
>>> If anybody has a few spare minutes to merge these, I know that it would
>>> make the authors very happy! :)
>>>
>>> Clarify numeric padding behaviour in string formatting:
>>> - A helpful doc addition (just a few words).
>>> - https://github.com/python/cpython/pull/17036
>>>
>>> argparse unittest tracebacks are confusing if an error is raised when
>>> not expected:
>>> - This just changes a "raise" to a "raise from None" in the argparse
>>> unit test machinery.
>>> - https://github.com/python/cpython/pull/17120
>>>
>>> Reuse identifier of PREDICT macros as PREDICT_ID:
>>> - Unifies some shared naming logic in the ceval prediction macros (don't
>>> worry, it's simple).
>>> - https://github.com/python/cpython/pull/17155/files
>>>
>>> Thanks.
>>>
>>> Brandt
>>> ___
>>> 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/46U2H5U2BAACZZETIWJTAJAGXJSD6MKO/
>>> Code of Conduct: http://python.org/psf/codeofconduct/
>>>
>> ___
>> 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/PAOV4YWV4FJDM7WEOJ2DSMCO4XWHWFWZ/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
> ___
> 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/VILCDKNHD5MTQ5TUTSVQARMBX3JMTFKJ/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
Best,
Joannah Nanjekye

*"You think you know when you learn, are more sure when you can write, even
more when you can teach, but certain when you can program." Alan J. Perlis*
___
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/72MQ5FDQ2HHQ7HYWWOLAJMYRUXOQDJGY/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Summary of Python tracker Issues

2020-02-21 Thread Python tracker

ACTIVITY SUMMARY (2020-02-14 - 2020-02-21)
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:
  open7315 (+38)
  closed 44150 (+43)
  total  51465 (+81)

Open issues with patches: 2874 


Issues opened (62)
==

#38691: importlib: PYTHONCASEOK should be ignored when using python3 -
https://bugs.python.org/issue38691  reopened by vstinner

#39636: Can't change Treeview row color in Tkinter
https://bugs.python.org/issue39636  opened by Олег Париев

#39638: Keep ASDL signatures for AST nodes
https://bugs.python.org/issue39638  opened by BTaskaya

#39639: Remove Suite node from AST
https://bugs.python.org/issue39639  opened by BTaskaya

#39640: fall back os.fdatasync() to fsync() on POSIX systems without f
https://bugs.python.org/issue39640  opened by gmelikov

#39642: Behaviour of disabled widgets:   widget.bind(func)  -vs-  w = 
https://bugs.python.org/issue39642  opened by mrshr3d

#39643: Python calls newfstatat for "" in
https://bugs.python.org/issue39643  opened by Ivan Babrou

#39645: Expand concurrent.futures.Future's public API
https://bugs.python.org/issue39645  opened by aeros

#39648: Update math.gcd() to accept "n" arguments.
https://bugs.python.org/issue39648  opened by Ananthakrishnan

#39649: bdb.Bdb.format_stack_entry: checks for obsolete __args__
https://bugs.python.org/issue39649  opened by blueyed

#39650: Creating zip file where names in local header don't match with
https://bugs.python.org/issue39650  opened by pmqs

#39651: Exceptions raised by EventLoop.call_soon_threadsafe
https://bugs.python.org/issue39651  opened by Ben.Darnell

#39652: sqlite3 bug handling column names that contain square braces
https://bugs.python.org/issue39652  opened by simonw

#39653: test_posix fails during make test
https://bugs.python.org/issue39653  opened by jaguardown

#39654: pyclbr: remove old references to class browser & add explain r
https://bugs.python.org/issue39654  opened by hakancelik

#39656: shebanged scripts can escape from `venv` depending on how it w
https://bugs.python.org/issue39656  opened by Anthony Sottile

#39657: Bezout and Chinese Remainder Theorem in the Standard Library?
https://bugs.python.org/issue39657  opened by Dennis Sweeney

#39658: Include user scripts folder to PATH on Windows
https://bugs.python.org/issue39658  opened by lucatrv

#39659: pathlib calls `os.getcwd()` without using accessor
https://bugs.python.org/issue39659  opened by barneygale

#39660: Contextvars: Optional callbacks on state change
https://bugs.python.org/issue39660  opened by leezu

#39663: IDLE: Add additional tests for pyparse
https://bugs.python.org/issue39663  opened by cheryl.sabella

#39664: Improve test coverage for operator module
https://bugs.python.org/issue39664  opened by xtreak

#39665: Cryptic error message when creating types that don't include t
https://bugs.python.org/issue39665  opened by ppperry

#39666: IDLE: Factor out similar code in editor and hyperparser
https://bugs.python.org/issue39666  opened by cheryl.sabella

#39667: Update zipfile.Path with zipp 3.0
https://bugs.python.org/issue39667  opened by jaraco

#39670: 2to3 fix_apply tries to fix user-defined apply function calls
https://bugs.python.org/issue39670  opened by ilya

#39671: Mention in docs that asyncio.FIRST_COMPLETED does not guarante
https://bugs.python.org/issue39671  opened by tom.pohl

#39672: SIGSEGV crash on shutdown with shelve & c pickle
https://bugs.python.org/issue39672  opened by zd nex

#39673: Map errno==ETIME to TimeoutError
https://bugs.python.org/issue39673  opened by YoSTEALTH

#39674: Keep deprecated features in Python 3.9 to ease migration from 
https://bugs.python.org/issue39674  opened by vstinner

#39675: forked process in multiprocessing does not honour atexit
https://bugs.python.org/issue39675  opened by gaborbernat

#39677: 3.6+ documentation for MAKE_FUNCTION
https://bugs.python.org/issue39677  opened by thautwarm

#39678: RFC improve readability of _queue_management_worker for Proces
https://bugs.python.org/issue39678  opened by tomMoral

#39679: functools: singledispatchmethod doesn't work with classmethod
https://bugs.python.org/issue39679  opened by Viktor Roytman

#39680: datetime.astimezone() method does not handle invalid local tim
https://bugs.python.org/issue39680  opened by belopolsky

#39681: pickle.load expects an object that implements readinto
https://bugs.python.org/issue39681  opened by Nathan.Goldbaum

#39682: pathlib.Path objects can be used as context managers
https://bugs.python.org/issue39682  opened by barneygale

#39683: 2to3 fix_exitfunc suggests duplicated import of atexit module
https://bugs.python.org/issue39683  opened by ilya

#39685: Python 3.8 regression Socket operation on non-socket
https://bugs.python.org/issue39685  opened by brian

#39686: add dump_json to ast module
https://bugs.python.org/issue39686

[Python-Dev] Re: Comments on PEP 558 (Defined semantics for locals() )

2020-02-21 Thread Nick Coghlan
On Sun, 16 Feb 2020 at 23:35, Nick Coghlan  wrote:
> On Mon., 10 Feb. 2020, 8:31 pm Mark Shannon,  wrote:
>> The proposed changes in PEP 558 are also backwards incompatible.
>> I thought that was the point. The current implementation is broken in
>> weird ways and we want to fix that. Since we need to break backward
>> compatibility anyway, why not do it in a way the makes the behaviour as
>> well defined and maintainable as possible.
>
>
> The changes at the Python level are *technically* incompatible, but 
> Nathaniel's review made a compelling case that the real world compatibility 
> problems were likely to be minimal, and in some cases would actually be 
> fixing latent defects in existing code.
>
>> I think that PEP 558, as it stands, is still a bit fragile because of
>> the handling of cycles between the locals proxy and the frame.
>
> Unfortunately, I'm not entirely sure there's any way to get rid of that 
> without getting rid of PyEval_GetLocals() completely, and that *wouldn't* be 
> a subtle break in the slightest (it's even part of the stable ABI).
>
> Since that API returns a borrowed reference, the real reference has to live 
> somewhere, and the most natural place is the frame f_locals attribute (as 
> that's where it lives today).
>
> And even if we *did* manage to resolve that dilemna, we then run into the 
> problem that we also need the frame object to hold the proxy because the C 
> level equivalent of accessing the attribute is just "frame->f_locals": it's 
> not an opaque struct, so that pointer is part of the public API.
>
> I agree I should explain this aspect clearly in the PEP though (and likely in 
> some block comments in the implementation), as you're quite right that the 
> associated reference borrowing and cycle breaking code is thoroughly nasty 
> now that the namespace object isn't going to be a simple dictionary.
>
> (Thinking out loud, though: something that might work is for each locals 
> proxy to use a common snapshot namespace, and store *that* on the frame, 
> exactly as we do today. That would replace the cycle in the current 
> implementation with multiple references to the common snapshot)

It works!

https://github.com/python/cpython/pull/3640/commits/68f10ced11a24166269cef8416bb98715d9bd200
switches the reference implementation over to working that way,
allowing the reference cycle between frames and their write-through
proxies to be eliminated.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
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/DCIN7GCMNYWVYRSAWSX4LDBFCRIS5JGI/
Code of Conduct: http://python.org/psf/codeofconduct/