[Python-Dev] Very old git mirror under github user "python-git"

2016-02-09 Thread John Mark Vandenberg
Does anyone know who controls this mirror, which is attracting pull requests? https://github.com/python-git/python/pulls Can it be pulled down to avoid confusion, since it is using Python's logo? https://github.com/python-git -- John Vandenberg ___

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Paul Moore
On 9 February 2016 at 01:57, Chris Barker - NOAA Federal wrote:OTOH, it's a > All I can say is "ouch". Hard to call it a regression to no longer > allow this mess.. OTOH, it's a major regression for someone using an 8-bit codepage that doesn't have these problems. Code

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Victor Stinner
2016-02-09 1:37 GMT+01:00 eryk sun : > For example, in codepage 932 (Japanese), it's an error if a lead byte > (i.e. 0x81-0x9F, 0xE0-0xFC) is followed by a trailing byte with a > value less than 0x40 (note that ASCII 0-9 is 0x30-0x39, so this is not > uncommon). In this case the

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Victor Stinner
Hi, 2016-02-08 18:02 GMT+01:00 Brett Cannon : > If Unicode string don't work in Python 2 then what is Python 2/3 to do as a > cross-platform solution if we completely remove bytes support in Python 3? > Wouldn't that mean there is no common type between Python 2 & 3 that one can

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Stephen J. Turnbull
Chris Barker - NOAA Federal writes: > All I can say is "ouch". Hard to call it a regression to no longer > allow this mess... We can't "disallow" the mess, it's embedded in the lunatic computing environment (which I happen to live in). We can't even stop people from using existing Python

Re: [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

2016-02-09 Thread Joseph Martinot-Lagarde
Victor Stinner gmail.com> writes: > > Hi, > > I changed the Python compiler to ignore any kind "constant > expressions", whereas it only ignored strings and integers before: > http://bugs.python.org/issue26204 > > The compiler now also emits a SyntaxWarning on such case. IMHO the > warning

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Victor Stinner
2016-02-09 1:37 GMT+01:00 eryk sun : > For example, in codepage 932 (Japanese), it's an error if a lead byte > (i.e. 0x81-0x9F, 0xE0-0xFC) is followed by a trailing byte with a > value less than 0x40 (note that ASCII 0-9 is 0x30-0x39, so this is not > uncommon). In this case the

Re: [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

2016-02-09 Thread Victor Stinner
2016-02-09 10:57 GMT+01:00 Joseph Martinot-Lagarde : > I frequently use 1/0 as a quick break in a script or a program (it's even > more useful with post-mortem debugging). Would it be considered as a > constant and ignored instead of raising a ZeroDivisionError ? "self.x -

[Python-Dev] CPython build options for out-of-the box performance

2016-02-09 Thread Patrascu, Alecsandru
Hi all, This is Alecsandru from the Dynamic Scripting Languages Optimization Team at Intel Corporation. I want to open a discussion regarding the way CPython is built, mainly the options that are available to the programmers. Analyzing the CPython ecosystem we can see that there are a lot of

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread eryk sun
On Tue, Feb 9, 2016 at 3:22 AM, Victor Stinner wrote: > 2016-02-09 1:37 GMT+01:00 eryk sun : >> For example, in codepage 932 (Japanese), it's an error if a lead byte >> (i.e. 0x81-0x9F, 0xE0-0xFC) is followed by a trailing byte with a >> value less

[Python-Dev] Experiences with Creating PEP 484 Stub Files

2016-02-09 Thread Phil Thompson
I've been adding support to the SIP wrapper generator for automatically generating PEP 484 compatible stub files so that future versions of PyQt can be shipped with them. By way of feedback I thought I'd share my experience, confusions and suggestions. There are a number of things I'd like to

Re: [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

2016-02-09 Thread Georg Brandl
On 02/09/2016 10:57 AM, Joseph Martinot-Lagarde wrote: > Victor Stinner gmail.com> writes: > >> >> Hi, >> >> I changed the Python compiler to ignore any kind "constant >> expressions", whereas it only ignored strings and integers before: >> http://bugs.python.org/issue26204 >> >> The compiler

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Victor Stinner
2016-02-08 19:26 GMT+01:00 Paul Moore : > On 8 February 2016 at 14:32, Victor Stinner wrote: >> Since 3.3, functions of the os module started to emit >> DeprecationWarning when called with bytes filenames. > > Everywhere? Or just on Windows? I can't

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Paul Moore
On 9 February 2016 at 10:13, Victor Stinner wrote: > IMHO we have to put a line somewhere between Python 2 and Python 3. > For some specific use cases, there is no good solution which works on > both Python versions. > > For filenames, there is no simple design on Python

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread eryk sun
On Tue, Feb 9, 2016 at 3:21 AM, Victor Stinner wrote: > 2016-02-09 1:37 GMT+01:00 eryk sun : >> For example, in codepage 932 (Japanese), it's an error if a lead byte >> (i.e. 0x81-0x9F, 0xE0-0xFC) is followed by a trailing byte with a >> value less

Re: [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

2016-02-09 Thread Michel Desmoulin
Hello, Le 08/02/2016 20:13, Guido van Rossum a écrit : On Mon, Feb 8, 2016 at 9:44 AM, Victor Stinner wrote: I changed the Python compiler to ignore any kind "constant expressions", whereas it only ignored strings and integers before:

Re: [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

2016-02-09 Thread Andrew Barnert via Python-Dev
On Tuesday, February 9, 2016 8:14 AM, Michel Desmoulin wrote: > I give regular Python trainings and I see similar errors regularly such as: > > - not returning something; > - using something without putting the result back in a variable. > > However, these are

Re: [Python-Dev] Experiences with Creating PEP 484 Stub Files

2016-02-09 Thread Guido van Rossum
[Just adding to Andrew's response] On Tue, Feb 9, 2016 at 9:58 AM, Andrew Barnert via Python-Dev wrote: > On Feb 9, 2016, at 03:44, Phil Thompson wrote: >> >> There are a number of things I'd like to express but cannot find a way to do >>

Re: [Python-Dev] Experiences with Creating PEP 484 Stub Files

2016-02-09 Thread Phil Thompson
On 9 Feb 2016, at 8:54 pm, Guido van Rossum wrote: > > [Just adding to Andrew's response] > > On Tue, Feb 9, 2016 at 9:58 AM, Andrew Barnert via Python-Dev > wrote: >> On Feb 9, 2016, at 03:44, Phil Thompson wrote: >>> >>>

Re: [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

2016-02-09 Thread Yury Selivanov
On 2016-02-08 8:02 PM, Steven D'Aprano wrote: On Mon, Feb 08, 2016 at 05:43:25PM -0500, Yury Selivanov wrote: On 2016-02-08 5:19 PM, Terry Reedy wrote: On 2/8/2016 4:51 PM, Victor Stinner wrote: 2016-02-08 22:28 GMT+01:00 Alexander Walters : What incantation do

Re: [Python-Dev] Windows: Remove support of bytes filenames in theos module?

2016-02-09 Thread Steve Dower
Could we perhaps redefine bytes paths on Windows as utf8 and use Unicode everywhere internally? I really don't like the idea of not being able to use bytes in cross platform code. Unless it's become feasible to use Unicode for lossless filenames on Linux - last I heard it wasn't. Top-posted

Re: [Python-Dev] Experiences with Creating PEP 484 Stub Files

2016-02-09 Thread Ethan Furman
On 02/09/2016 03:48 PM, Guido van Rossum wrote: > (Assuming you meant Option*al*.) There seems to be an utter confusion > of the two uses of the term "optional" here. An "optional argument" > (outside PEP 484) is one that has a default value. The "Optional[T]" > notation in PEP 484 means

Re: [Python-Dev] Experiences with Creating PEP 484 Stub Files

2016-02-09 Thread Guido van Rossum
[Phil] >>> I found the documentation confusing regarding Optional. Intuitively it >>> seems to be the way to specify arguments with default values. However it is >>> explained in terms of (for example) Union[str, None] and I (intuitively but >>> incorrectly) read that as meaning "a str or None"

Re: [Python-Dev] Windows: Remove support of bytes filenames in theos module?

2016-02-09 Thread Stephen J. Turnbull
Steve Dower writes: > On 09Feb2016 1801, Andrew Barnert wrote: > > On Feb 9, 2016, at 17:37, Steve Dower > > wrote: > > > >> Could we perhaps redefine bytes paths on Windows as utf8 and use > >> Unicode everywhere internally? > > >

Re: [Python-Dev] Windows: Remove support of bytes filenames in theos module?

2016-02-09 Thread Steve Dower
On 09Feb2016 2017, Stephen J. Turnbull wrote: > The problem here is the protocol that Python uses to return bytes paths, > and that protocol is inconsistent between APIs and information is lost. No, the problem is that the necessary information simply isn't always available. Not even

Re: [Python-Dev] Windows: Remove support of bytes filenames in theos module?

2016-02-09 Thread Chris Angelico
On Wed, Feb 10, 2016 at 12:37 PM, Steve Dower wrote: > I really don't like the idea of not being able to use bytes in cross > platform code. Unless it's become feasible to use Unicode for lossless > filenames on Linux - last I heard it wasn't. It has, but only in Python

Re: [Python-Dev] Windows: Remove support of bytes filenames in theos module?

2016-02-09 Thread Andrew Barnert via Python-Dev
On Feb 9, 2016, at 17:37, Steve Dower wrote: > > Could we perhaps redefine bytes paths on Windows as utf8 and use Unicode > everywhere internally? When you receive bytes from argv, stdin, a text file, a GUI, a named pipe, etc., and then use them as a path, Python

Re: [Python-Dev] Windows: Remove support of bytes filenames in theos module?

2016-02-09 Thread Steve Dower
On 09Feb2016 1801, Andrew Barnert wrote: On Feb 9, 2016, at 17:37, Steve Dower > wrote: Could we perhaps redefine bytes paths on Windows as utf8 and use Unicode everywhere internally? When you receive bytes from argv, stdin, a text

Re: [Python-Dev] Windows: Remove support of bytes filenames in the os module?

2016-02-09 Thread Victor Stinner
Le mercredi 10 février 2016, Steve Dower a écrit : > > I really don't like the idea of not being able to use bytes in cross > platform code. Unless it's become feasible to use Unicode for lossless > filenames on Linux - last I heard it wasn't. > The point of my email is

Re: [Python-Dev] Experiences with Creating PEP 484 Stub Files

2016-02-09 Thread Andrew Barnert via Python-Dev
On Feb 9, 2016, at 03:44, Phil Thompson wrote: > > There are a number of things I'd like to express but cannot find a way to do > so... > > - objects that implement the buffer protocol That seems like it should be filed as a bug with the typing repo. Presumably