Re: [Python-Dev] Positional-only parameters in Python

2018-01-19 Thread Larry Hastings
On 01/19/2018 08:47 PM, Nick Coghlan wrote: - proposing the full PEP 547, including the "argument groups" feature (which is a bigger change, but allows the expression of signatures like "range([start,] stop, [step,] /)") I hope we don't go down that route. I added support for "argument

Re: [Python-Dev] Positional-only parameters in Python

2018-01-19 Thread Guido van Rossum
On Fri, Jan 19, 2018 at 8:47 PM, Nick Coghlan wrote: > On 20 January 2018 at 07:49, Mario Corchero wrote: > > I am happy to put some work into this (and Pablo Galindo in CC offered to > > pair on it) but it is not clear for me whether the next step is

Re: [Python-Dev] Positional-only parameters in Python

2018-01-19 Thread Nick Coghlan
On 20 January 2018 at 07:49, Mario Corchero wrote: > I am happy to put some work into this (and Pablo Galindo in CC offered to > pair on it) but it is not clear for me whether the next step is drafting a > new PEP or this is just blocked on "re-evaluating" the current one. I

Re: [Python-Dev] Exposing different versions of a system call in Python

2018-01-19 Thread Terry Reedy
On 1/19/2018 11:06 PM, Nick Coghlan wrote: On 20 January 2018 at 02:32, Random832 wrote: On Fri, Jan 19, 2018, at 04:28, Pablo Galindo Salgado wrote: On the other side, we have pipe and pipe2 as an example of exposing two versions when this situation happens. The

Re: [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?

2018-01-19 Thread Nick Coghlan
On 19 January 2018 at 16:04, Nathaniel Smith wrote: > On Thu, Jan 18, 2018 at 12:27 PM, Victor Stinner > wrote: >> CPython still has compatibility code for Linux 2.6, whereas the >> support of Linux 2.6.x ended in August 2011, longer than 6 years ago. >>

Re: [Python-Dev] Exposing different versions of a system call in Python

2018-01-19 Thread Nick Coghlan
On 20 January 2018 at 02:32, Random832 wrote: > On Fri, Jan 19, 2018, at 04:28, Pablo Galindo Salgado wrote: >> On the other side, we have pipe and pipe2 as an example of exposing two >> versions when this situation happens. >> >> The question is: >> >> What is preferable,

Re: [Python-Dev] Unexpected bytecode difference

2018-01-19 Thread Joe Jevnik via Python-Dev
As a general rule, you should not expect the bytecode to be the same between different versions of CPython, including minor version changes. For example, the instructions for dictionary literals are different in 3.4, 3.5, and 3.6. On Fri, Jan 19, 2018 at 6:54 PM, Victor Stinner

Re: [Python-Dev] Positional-only parameters in Python

2018-01-19 Thread Guido van Rossum
Not so fast. I think a PEP is still needed. This change has more repercussions than argument clinic, e.g. it affects 3rd party tooling and bytecode. On Jan 19, 2018 17:00, "Terry Reedy" wrote: > On 1/19/2018 4:49 PM, Mario Corchero wrote: > >> I am happy to put some work into

Re: [Python-Dev] Positional-only parameters in Python

2018-01-19 Thread Terry Reedy
On 1/19/2018 4:49 PM, Mario Corchero wrote: I am happy to put some work into this (and Pablo Galindo in CC offered to pair on it) but it is not clear for me whether the next step is drafting a new PEP or this is just blocked on "re-evaluating" the current one. If someone can clarify we can

Re: [Python-Dev] Unexpected bytecode difference

2018-01-19 Thread Victor Stinner
It seems like the EXTENDED_ARG doc wasn't updated. Victor 2018-01-20 1:07 GMT+01:00 Alexander Belopolsky : > On Fri, Jan 19, 2018 at 7:01 PM, Guido van Rossum wrote: >> Presumably because Python 3 switched to wordcode. Applying dis.dis() to >>

Re: [Python-Dev] Unexpected bytecode difference

2018-01-19 Thread Alexander Belopolsky
On Fri, Jan 19, 2018 at 7:01 PM, Guido van Rossum wrote: > Presumably because Python 3 switched to wordcode. Applying dis.dis() to > these code objects results in the same output. > dis.dis(c) > 0 LOAD_NAME 0 (0) > 3 RETURN_VALUE I expected

Re: [Python-Dev] Unexpected bytecode difference

2018-01-19 Thread Guido van Rossum
Presumably because Python 3 switched to wordcode. Applying dis.dis() to these code objects results in the same output. >>> dis.dis(c) 0 LOAD_NAME 0 (0) 3 RETURN_VALUE On Fri, Jan 19, 2018 at 3:46 PM, Alexander Belopolsky < alexander.belopol...@gmail.com> wrote: >

Re: [Python-Dev] Unexpected bytecode difference

2018-01-19 Thread Victor Stinner
Python bytecode format changed deeply in Python 3.6. It now uses regular units of 2 bytes, instead of 1 or 3 bytes depending if the instruction has an argument. See for example https://bugs.python.org/issue26647 "wordcode". But CALL_FUNCTION bytecode also evolved. Victor 2018-01-20 0:46

[Python-Dev] Unexpected bytecode difference

2018-01-19 Thread Alexander Belopolsky
I have encountered the following difference between Python 3 and 2: (py3) >>> compile('xxx', '<>', 'eval').co_code b'e\x00S\x00' (py2) >>> compile('xxx', '<>', 'eval').co_code 'e\x00\x00S' Note that 'S' (the code for RETURN_VALUE) and a zero byte are swapped in Python 2 compared to Python 3.

Re: [Python-Dev] Positional-only parameters in Python

2018-01-19 Thread Mario Corchero
I am happy to put some work into this (and Pablo Galindo in CC offered to pair on it) but it is not clear for me whether the next step is drafting a new PEP or this is just blocked on "re-evaluating" the current one. If someone can clarify we can put something together. Thanks! On 18 January

Re: [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?

2018-01-19 Thread Brett Cannon
On Thu, 18 Jan 2018 at 21:39 Benjamin Peterson wrote: > +1 to both of your specific proposals. > > More generally, I think it makes good sense to allow dropping support for > a platform in the next major Python release after vendor support for the > platform stops. Even we

Re: [Python-Dev] Exposing different versions of a system call in Python

2018-01-19 Thread Brett Cannon
On Fri, 19 Jan 2018 at 01:30 Pablo Galindo Salgado wrote: > Hello everyone, > > In today's episode of exposing useful Linux system calls I am exposing > preadv2 in this PR: > > https://github.com/python/cpython/pull/5239 > > as requested in this issue: > >

[Python-Dev] Intention to accept PEP 567 (Context Variables)

2018-01-19 Thread Guido van Rossum
There has been useful and effective discussion on several of the finer points of PEP 567. I think we've arrived at a solid specification, where every part of the design is well motivated. I plan to accept it on Monday, unless someone brings up something significant that we've overlooked before

[Python-Dev] Summary of Python tracker Issues

2018-01-19 Thread Python tracker
ACTIVITY SUMMARY (2018-01-12 - 2018-01-19) 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: open6400 (+31) closed 37949 (+28) total 44349 (+59) Open issues

Re: [Python-Dev] Exposing different versions of a system call in Python

2018-01-19 Thread Random832
On Fri, Jan 19, 2018, at 04:28, Pablo Galindo Salgado wrote: > On the other side, we have pipe and pipe2 as an example of exposing two > versions when this situation happens. > > The question is: > > What is preferable, exposing both functions or augment the old one? A large number, possibly a

Re: [Python-Dev] LibreSSL support

2018-01-19 Thread Christian Heimes
On 2018-01-19 10:43, Steve Holden wrote: > On Fri, Jan 19, 2018 at 12:09 AM, Nathaniel Smith > wrote: > > On Jan 18, 2018 07:34, "Christian Heimes" > wrote: > > On 2018-01-16 21:17,

Re: [Python-Dev] LibreSSL support

2018-01-19 Thread Steve Holden
On Fri, Jan 19, 2018 at 12:09 AM, Nathaniel Smith wrote: > On Jan 18, 2018 07:34, "Christian Heimes" wrote: > > On 2018-01-16 21:17, Christian Heimes wrote: > > FYI, master on Travis CI now builds and uses OpenSSL 1.1.0g [1]. I have > > created a daily

Re: [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?

2018-01-19 Thread Antoine Pitrou
On Thu, 18 Jan 2018 22:04:34 -0800 Nathaniel Smith wrote: > On Thu, Jan 18, 2018 at 12:27 PM, Victor Stinner > wrote: > > CPython still has compatibility code for Linux 2.6, whereas the > > support of Linux 2.6.x ended in August 2011, longer than 6

[Python-Dev] Exposing different versions of a system call in Python

2018-01-19 Thread Pablo Galindo Salgado
Hello everyone, In today's episode of exposing useful Linux system calls I am exposing preadv2 in this PR: https://github.com/python/cpython/pull/5239 as requested in this issue: https://bugs.python.org/issue31368 As njsmith has commented in the PR, preadv2 only exists because regular preadv

Re: [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?

2018-01-19 Thread Antoine Pitrou
On Thu, 18 Jan 2018 22:04:34 -0800 Nathaniel Smith wrote: > On Thu, Jan 18, 2018 at 12:27 PM, Victor Stinner > wrote: > > CPython still has compatibility code for Linux 2.6, whereas the > > support of Linux 2.6.x ended in August 2011, longer than 6 years

Re: [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?

2018-01-19 Thread Terry Reedy
On 1/19/2018 1:04 AM, Nathaniel Smith wrote: On Thu, Jan 18, 2018 at 12:27 PM, Victor Stinner wrote: CPython still has compatibility code for Linux 2.6, whereas the support of Linux 2.6.x ended in August 2011, longer than 6 years ago. Should we also drop support for

Re: [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?

2018-01-19 Thread Christian Heimes
On 2018-01-19 06:36, Benjamin Peterson wrote: > +1 to both of your specific proposals. > > More generally, I think it makes good sense to allow dropping support for a > platform in the next major Python release after vendor support for the > platform stops. Even we say we support something, it