[Python-Dev] Re: How to specify optional support of arguments

2020-06-14 Thread Serhiy Storchaka
15.06.20 04:06, Greg Ewing пише: Instead of a bunch of ad-hoc mechanisms for finding out about platform-dependent arguments, maybe there should be a function in the inspect module for testing whether a function has a given argument. Then you could say something like    if inspect.hasargument(gl

[Python-Dev] Re: How to specify optional support of arguments

2020-06-14 Thread Ivan Pozdeev via Python-Dev
On 15.06.2020 8:45, Serhiy Storchaka wrote: 14.06.20 23:45, Ivan Pozdeev via Python-Dev пише: 1. The documentation clearly says that it's supported depending on OS flavor -- so if I want to know if I can supply it, I need to rather check `os.name`. Those members are thus redundant. If th

[Python-Dev] Re: How to specify optional support of arguments

2020-06-14 Thread Serhiy Storchaka
14.06.20 23:45, Ivan Pozdeev via Python-Dev пише: 1. The documentation clearly says that it's supported depending on OS flavor -- so if I want to know if I can supply it, I need to rather check `os.name`. Those members are thus redundant.     If the distinction is finer than os.name then I'd

[Python-Dev] Re: When can we remove wchar_t* cache from string?

2020-06-14 Thread Inada Naoki
On Sat, Jun 13, 2020 at 8:20 PM Inada Naoki wrote: > > 2020年6月13日(土) 20:12 Kyle Stanley : >> >> > Additionally, raise DeprecationWarning runtime when these APIs are used. >> >> So, just to clarify, current usage of these 7 unicode APIs does not emit any >> warnings and would only start doing so i

[Python-Dev] Re: How to specify optional support of arguments

2020-06-14 Thread Greg Ewing
Instead of a bunch of ad-hoc mechanisms for finding out about platform-dependent arguments, maybe there should be a function in the inspect module for testing whether a function has a given argument. Then you could say something like if inspect.hasargument(glob.glob, 'dir_fd'): ... -- G

[Python-Dev] Re: Proposed release schedule for 3.5.9

2020-06-14 Thread John Thorvald Wodder II
3.5.9 was already released back in November. Yes, it's (almost) the same code as 3.5.8, but its version number (as reported by `python -V` etc.) is still 3.5.9. Releasing another 3.5.9 would just lead to confusion at best. I feel that the July release should be numbered 3.5.10 instead. -- Jo

[Python-Dev] Re: How to specify optional support of arguments

2020-06-14 Thread Ivan Pozdeev via Python-Dev
(see an answer to the OP's specific question below) I don't quite get the point for .supports_stuff. It seems well-intentioned but misguided. 1. The documentation clearly says that it's supported depending on OS flavor -- so if I want to know if I can supply it, I need to rather check `os.name

[Python-Dev] Removal of _Py_ForgetReference from public header in 3.9 issue

2020-06-14 Thread cpython
Please excuse if this is the wrong mailing list. I couldn't find one for module maintainers. I maintain an open source Python module in C. I'm trying to verify for the first time that the module still works with cpython 3.9. This module does *not* use the "limited" C API. In building my module

[Python-Dev] Proposed release schedule for 3.5.9

2020-06-14 Thread Larry Hastings
Gosh how time flies.  3.5 is nearing the end of its security maintenance period, and as such the patches have slowed down.  But we got a couple recently--all having to do with web technologies--so it's probably time to make another release.  I propose to release rc1 in two weeks, and final tw

[Python-Dev] How to specify optional support of arguments

2020-06-14 Thread Serhiy Storchaka
In Python 3.3 a number of functions in the os module got the support of new options, like dir_fd or follow_symlinks. I well remember this because the initial reason of my contribution to CPython was related to this feature. The support of new options was platform dependent. They were supported

[Python-Dev] Cycles in the __context__ chain

2020-06-14 Thread Serhiy Storchaka
It is possible to create a loop by setting the __context__ attribute of the raised exception, either explicitly, or implicitly, using "raise ... from ...". Creating a loop can leads to the hanging in infinite loop or crash due to stack overflow. Several years ago we did have issues related to E