[issue32686] python3.6.4 build hangs on test_asyncio macOS 10.13

2018-03-13 Thread Ned Deily

Ned Deily  added the comment:

A followup: a fix for the hang in test_asyncio has been released in 3.6.5rc1.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33062] ssl_renegotiate() doesn't seem to be exposed

2018-03-13 Thread Vitaly Kruglikov

Vitaly Kruglikov  added the comment:

> For extra fun, openssl itself doesn't fully support renegotiation on duplex 
> connections ...

The necessitated modification to the application protocol on that thread sounds 
like an OpenSSL cop-out. There is no good reason that OpenSSL shouldn't be able 
to cache incoming application data during the client-initiated handshake just 
as it does at other times. It should be able to cache the incoming 
pre-negotiation records, decoding them. The pending() check would inform the 
client that they need to reap the incoming data during the handshake too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32367] [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings

2018-03-13 Thread Ned Deily

Ned Deily  added the comment:

And Red Hat has already closed their version of this as NOTABUG:
 
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-17522

It seems nearly everyone is agreement that this is not a security issue.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python gotcha of the day

2018-03-13 Thread Bill

Dan Sommers wrote:

On Wed, 14 Mar 2018 04:08:30 +, Steven D'Aprano wrote:


Explain the difference between these two triple-quoted strings:



But remove the spaces, and two of the quotation marks disappear:

py> """\""
'"'


That's (a) a triple quoted string containing a single escaped quote,
followed by (b) a quoted empty string.  The two consecutive strings are
concatenated into a single string.


The last part stumped me!  :  )




(Too many years of shell programming to miss this one!)

Dan



--
https://mail.python.org/mailman/listinfo/python-list


[issue32981] Catastrophic backtracking in poplib (CVE-2018-1060) and difflib (CVE-2018-1061)

2018-03-13 Thread Ned Deily

Ned Deily  added the comment:

> Is this ready to close?

The fixes are now available from the cpython repo for all current security and 
maintenance branches (3.4 to 3.7 plus 2.7).  They are now released in 3.6.5rc1 
and will be available in the next releases of other branches: 3.7.0, 3.5.6, 
3.4.9, and 2.7.15.

Thanks again for reporting the issues, James, and helping to resolve them!

--
nosy: +ned.deily
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python gotcha of the day

2018-03-13 Thread Cameron Simpson

On 14Mar2018 04:08, Steven D'Aprano  
wrote:

Explain the difference between these two triple-quoted strings:

Here is a triple-quoted string containing spaces and a triple-quote:

py> """ \""" """
' """ '


But remove the spaces, and two of the quotation marks disappear:

py> """\""
'"'


"""\ ""

Implicit string concatenation of an empty string.

I confess I try to have my quote delimiters distinct from any embedded quotes 
to avoid wanting backslashes. It is conincidental that my habit tends to 
sidestep the above issue.


Cheers,
Cameron Simpson  (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list


[issue32726] macOS installer and framework enhancements and changes for 3.7.0 and 3.6.5

2018-03-13 Thread Ned Deily

Ned Deily  added the comment:

Backport the new 10.9+ installer variant from 3.7 to 3.6 for 3.6.5:

The rationale is that, while the 10.6 variant is still upwards compatible on 
current systems, it is showing its age.  Apple has started deprecating 32-bit 
support on macOS and apparently plans to drop it entirely in an upcoming 
release.  Also this gives a way to finally provide batteries-included Tcl/Tk 
support (the single most-requested feature for the macOS installers) and move 
to Tcl/Tk 8.6.x which is not well supported on older macOS releases 
(ActiveState currently only supplies 8.6.x binaries for macOS 10.9+, for 
example).  For 3.6.5, the 10.9+ variant will be offered as an additional 
alternative to the traditional 10.6+ variant in earlier 3.6.x releases.  I 
expect that most Binary extension modules (including wheels) built for earlier 
versions of 3.6.x with the 10.6 variant should continue to work with either 
3.6.5 variant without recompilation.  This perhaps will also make it easier to 
transition to the 10.9+ variant as the default for 3.7.0.

In addition, both installer variants have updated 3rd-party libraries:
OpenSSL 1.0.2m -> 1.0.2n
XZ 5.2.2 -> 5.2.3
SQLite 3.21.0 -> 3.22.0

The 10.6 variant now sets CC=gcc instead of CC=gcc-4.2 and does not search for 
the outdated 10.6 SDK.  The variant is built with the same compiler as before.  
If necessary for extension module builds, the CC value can be overridden with 
the CC env variable and an SDK can be specified with the SDKROOT env variable 
(see man xcrun).  These minor changes should be transparent to nearly all users.

--
stage: patch review -> backport needed
title: macOS installer and framework enhancements and changes for 3.7.0 -> 
macOS installer and framework enhancements and changes for 3.7.0 and 3.6.5
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[RELEASE] Python 3.6.5rc1 is now available for testing

2018-03-13 Thread Ned Deily
Announcing the immediate availability of Python 3.6.5 release candidate 1!

Python 3.6.5rc1 is the first release candidate for Python 3.6.5, the next
maintenance release of Python 3.6.  While 3.6.5rc1 is a preview release and,
thus, not intended for production environments, we encourage you to explore
it and provide feedback via the Python bug tracker (https://bugs.python.org).
3.6.5 is planned for final release on 2018-03-26 with the next maintenance
release expected to follow in about 3 months.  You can find Python 3.6.5rc1
and more information here:
https://www.python.org/downloads/release/python-365rc1/

Attention macOS users: as of 3.6.5rc1, there is a new additional installer
variant for macOS 10.9+ that includes a built-in version of Tcl/Tk 8.6.
This variant is expected to become the default variant in future releases.
Check it out!

--
  Ned Deily
  n...@python.org -- []

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python gotcha of the day

2018-03-13 Thread Dan Sommers
On Wed, 14 Mar 2018 04:08:30 +, Steven D'Aprano wrote:

> Explain the difference between these two triple-quoted strings:

> But remove the spaces, and two of the quotation marks disappear:
> 
> py> """\""
> '"'

That's (a) a triple quoted string containing a single escaped quote,
followed by (b) a quoted empty string.  The two consecutive strings are
concatenated into a single string.

(Too many years of shell programming to miss this one!)

Dan

-- 
https://mail.python.org/mailman/listinfo/python-list


Python gotcha of the day

2018-03-13 Thread Steven D'Aprano
Explain the difference between these two triple-quoted strings:

Here is a triple-quoted string containing spaces and a triple-quote:

py> """ \""" """
' """ '


But remove the spaces, and two of the quotation marks disappear:

py> """\""
'"'


If nobody gets the answer, I shall reveal all later.

(Hint: it is not a bug.)




-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32726] macOS installer and framework enhancements and changes for 3.7.0

2018-03-13 Thread Ned Deily

Ned Deily  added the comment:


New changeset 94552448d7bcc1eebc53b608e89d96e235054f2f by Ned Deily in branch 
'3.6':
bpo-32726: macOS installer changes for 3.6.5
https://github.com/python/cpython/commit/94552448d7bcc1eebc53b608e89d96e235054f2f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27984] singledispatch register should typecheck its argument

2018-03-13 Thread Xiang Zhang

Xiang Zhang  added the comment:

Thanks for the reminding, I already forget this. I'll do it night.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33062] ssl_renegotiate() doesn't seem to be exposed

2018-03-13 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

PyOpenSSL supports renegotiation, and I've used it for writing exactly this 
kind of test. Might be easier than wrapping a test harness around the 'openssl' 
command.

For extra fun, openssl itself doesn't fully support renegotiation on duplex 
connections, even if your code works correctly: 
http://openssl.6102.n7.nabble.com/TLS-renegotiation-failure-on-receiving-application-data-during-handshake-td48127.html

--
nosy: +njs

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33062] ssl_renegotiate() doesn't seem to be exposed

2018-03-13 Thread Martin Panter

Martin Panter  added the comment:

I have also wanted to force renegotation for testing with Python.

As a workaround, I have used the "openssl s_server" program, which I described 
at  (use the lower-case "r" 
command). More recently I did a similar thing with "s_client", where you have 
to use capital "R".

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Enumerating all 3-tuples (Posting On Python-List Prohibited)

2018-03-13 Thread Ben Bacarisse
Lawrence D’Oliveiro  writes:

> On Tuesday, March 13, 2018 at 1:58:48 PM UTC+13, Ben Bacarisse wrote:
>> Of course you can always generate n-tuples of N and then map these to
>> n-tuples of the intended sequence but that seems inelegant.
>
> This whole discussion seems to be going off on esoteric, irrelevant
> tangents. The problem was not that hard to solve.

Sure, but that's one thing that makes Usenet (and email lists)
interesting.  The original problem -- triples of natural numbers -- is
not particularly hard, but the general problem -- enumerating n-tuples
of some sequence -- is more interesting because it is a bit harder.

-- 
Ben.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: serial communication error for loop

2018-03-13 Thread MRAB

On 2018-03-14 00:23, Dhileepan Kumar wrote:


#!/usr/bin/python

import serial
import MySQLdb
while True:
#establish connection to MySQL. You'll have to change this for your database.
dbConn = MySQLdb.connect("localhost","root","1234","ifet") or die ("could 
not connect to database")
#open a cursor to the database
cursor = dbConn.cursor()

device = 'com3' #this will have to be changed to the serial port you 
are using
arduino = serial.Serial(device, 9600)


try:
  data = arduino.readline()  #read the data from the arduino
  if not data.strip():
   continue
  pieces = data.split("\t")  #split the data by the tab
  #Here we are going to insert the data into the Database
  try:
cursor.execute("INSERT INTO answer1 (voltage,current) VALUES 
(%s,%s)", (pieces[0],pieces[1]))
dbConn.commit() #commit the insert
cursor.close()  #close the cursor
  except MySQLdb.IntegrityError:
print "failed to insert data"
  finally:
cursor.close()  #close just incase it failed
except:
  print "Failed to get data from Arduino!"


it is my program.if do not use while true loop successfully run but can't get a 
continues data from arduino so i have decide to using while loop  but if using 
while loop shows some error


(project) C:\Users\DHILEEPAN\project\project>python mysql.py
Traceback (most recent call last):
   File "mysql.py", line 13, in 
 arduino = serial.Serial(device, 9600)
   File 
"C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialwin32.py", line 
31, in __init_
 super(Serial, self).__init__(*args, **kwargs)
   File 
"C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialutil.py", line 
240, in __init_
 self.open()
   File 
"C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialwin32.py", line 
62, in open
 raise SerialException("could not open port {!r}: 
{!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'com3': WindowsError(5, 
'Access is denied.')

please any one fix this

It cannot open the port the second time because the port is already open 
from the first time.


You have put too much inside the loop. It should be more like:
# open database and serial
while True:
# do read and insertion
# close database and serial

Even better, use the 'with' statement, which is neater:

with :
with :
while True:
# do read and insertion
--
https://mail.python.org/mailman/listinfo/python-list


Re: serial communication error for loop

2018-03-13 Thread Chris Angelico
On Wed, Mar 14, 2018 at 11:23 AM, Dhileepan Kumar  wrote:
>
> #!/usr/bin/python
>
> import serial
> import MySQLdb
> while True:
> #establish connection to MySQL. You'll have to change this for your database.
> dbConn = MySQLdb.connect("localhost","root","1234","ifet") or die 
> ("could not connect to database")

Ah, you've come from Perl I see.

> #open a cursor to the database
> cursor = dbConn.cursor()
>
> device = 'com3' #this will have to be changed to the serial port you 
> are using
> arduino = serial.Serial(device, 9600)

You're opening the database AND the serial port every time you go
through the loop. Is that intentional?

> try:
>   data = arduino.readline()  #read the data from the arduino
>   if not data.strip():
>continue
>   pieces = data.split("\t")  #split the data by the tab
>   #Here we are going to insert the data into the Database
>   try:
> cursor.execute("INSERT INTO answer1 (voltage,current) VALUES 
> (%s,%s)", (pieces[0],pieces[1]))
> dbConn.commit() #commit the insert
> cursor.close()  #close the cursor
>   except MySQLdb.IntegrityError:
> print "failed to insert data"
>   finally:
> cursor.close()  #close just incase it failed
> except:
>   print "Failed to get data from Arduino!"

Ouch. Any exception, you just print out a generic message and move on?
You're blinding yourself. Let the exception get properly displayed. It
might help you.

> 
> it is my program.if do not use while true loop successfully run but can't get 
> a continues data from arduino so i have decide to using while loop  but if 
> using while loop shows some error
>
>
> (project) C:\Users\DHILEEPAN\project\project>python mysql.py
> Traceback (most recent call last):
>   File "mysql.py", line 13, in 
> arduino = serial.Serial(device, 9600)
>   File 
> "C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialwin32.py", 
> line 31, in __init_
> super(Serial, self).__init__(*args, **kwargs)
>   File 
> "C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialutil.py", 
> line 240, in __init_
> self.open()
>   File 
> "C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialwin32.py", 
> line 62, in open
> raise SerialException("could not open port {!r}: 
> {!r}".format(self.portstr, ctypes.WinError()))
> serial.serialutil.SerialException: could not open port 'com3': 
> WindowsError(5, 'Access is denied.')
>
> please any one fix this
>

This looks like possibly the device is already in use. Try opening the
device _just once_, or if you have to reopen it every time through the
loop, make sure you close it.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32987] tokenize.py parses unicode identifiers incorrectly

2018-03-13 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I think the issues are slightly different.  #12486 is about the awkwardness of 
the API.  This is about a false error after jumping through the hoops, which I 
think Steve B did correctly.

Following the link, the Other_ID_Continue chars are

00B7  ; Other_ID_Continue # Po   MIDDLE DOT
0387  ; Other_ID_Continue # Po   GREEK ANO TELEIA
1369..1371; Other_ID_Continue # No   [9] ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT 
NINE
19DA  ; Other_ID_Continue # No   NEW TAI LUE THAM DIGIT ONE

# Total code points: 12

The 2 Po chars fail, the 2 No chars work.  After looking at the tokenize 
module, I believe the problem is the re for Name is r'\w+' and the Po chars are 
not seen as \w word characters.

>>> r = re.compile(r'\w+', re.U)  
>>> re.match(r, 'ab\u0387cd')


I don't know if the bug is a too narrow definition of \w in the re module("most 
characters that can be part of a word in any language, as well as numbers and 
the underscore") or of Name in the tokenize module.

Before patching anything, I would like to know if the 2 Po Other chars are the 
only 2 not matched by \w.  Unless someone has done so already, at least a 
sample of chars from each category included in the definition of 'identifier' 
should be tested.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33071] Document that PyPI no longer requires 'register'

2018-03-13 Thread Sumana Harihareswara

Change by Sumana Harihareswara :


--
nosy: +sumanah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



serial communication error for loop

2018-03-13 Thread Dhileepan Kumar

#!/usr/bin/python

import serial 
import MySQLdb
while True: 
#establish connection to MySQL. You'll have to change this for your database.
dbConn = MySQLdb.connect("localhost","root","1234","ifet") or die 
("could not connect to database")
#open a cursor to the database
cursor = dbConn.cursor()

device = 'com3' #this will have to be changed to the serial port you 
are using
arduino = serial.Serial(device, 9600) 


try: 
  data = arduino.readline()  #read the data from the arduino
  if not data.strip():
   continue
  pieces = data.split("\t")  #split the data by the tab
  #Here we are going to insert the data into the Database
  try:
cursor.execute("INSERT INTO answer1 (voltage,current) VALUES 
(%s,%s)", (pieces[0],pieces[1]))
dbConn.commit() #commit the insert
cursor.close()  #close the cursor
  except MySQLdb.IntegrityError:
print "failed to insert data"
  finally:
cursor.close()  #close just incase it failed
except:
  print "Failed to get data from Arduino!"


it is my program.if do not use while true loop successfully run but can't get a 
continues data from arduino so i have decide to using while loop  but if using 
while loop shows some error


(project) C:\Users\DHILEEPAN\project\project>python mysql.py
Traceback (most recent call last):
  File "mysql.py", line 13, in 
arduino = serial.Serial(device, 9600)
  File 
"C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialwin32.py", line 
31, in __init_
super(Serial, self).__init__(*args, **kwargs)
  File 
"C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialutil.py", line 
240, in __init_
self.open()
  File 
"C:\Users\DHILEEPAN\Envs\project\lib\site-packages\serial\serialwin32.py", line 
62, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, 
ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'com3': WindowsError(5, 
'Access is denied.')

please any one fix this



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: 2.7 EOL = 2020 January 1

2018-03-13 Thread Steven D'Aprano
On Tue, 13 Mar 2018 10:58:42 -0400, Terry Reedy wrote:

> On March 10, on thread "Python 2.7 -- bugfix or security before EOL?",
> Guido van Russum wrote
> 
> "The way I see the situation for 2.7 is that EOL is January 1st, 2020,
> and there will be no updates, not even source-only security patches,
> after that date. Support (from the core devs, the PSF, and python.org)
> stops completely on that date. If you want support for 2.7 beyond that
> day you will have to pay a commercial vendor. [...]"

*dances a happy dance*

Thanks Terry for posting the message, thanks Guido for drawing a line in 
the sand and sticking with it, and thanks to all the core devs who have 
worked so hard to keep the transition from 2 -> 3 as gentle as possible.

Like Python 1 before it, Python 2 has been a wonderful language to work 
with, but it is long past time to move on to Python 3. Or pay for the 
support. We can only ask volunteers for so much.


-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue28612] str.translate needs a mapping example

2018-03-13 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

IDLE just added similar functionality to pyparse (issue 32940) using:

class ParseMap(dict):
def __missing__(self, key):
return 120 # ord('x')

# Map all ascii to 120 to avoid __missing__ call, then replace some.
trans = ParseMap.fromkeys(range(128), 120)
trans.update((ord(c), ord('(')) for c in "({[")  # open brackets => '(';
trans.update((ord(c), ord(')')) for c in ")}]")  # close brackets => ')'.
trans.update((ord(c), ord(c)) for c in "\"'\\\n#") # Keep these.

code = code.translate(trans)

Of course, all that is probably too much for a docs example, but it uses a 
mapping without the side effect of defaultdict.  I wonder if defining the dict 
subclass with __missing__ and then the example of keeping only lowercase 
letters would work for the docs?

--
nosy: +csabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Guido van Rossum

Guido van Rossum  added the comment:

+1.

On Tue, Mar 13, 2018, 16:26 Tim Peters  wrote:

>
> Tim Peters  added the comment:
>
> Thanks, Guido!  I figured I was missing something :-)
>
> It looks like `numbers.Rational` _is_ a "for real" base class of
> `fractions.Fraction`, though, so I'm in favor of supplying a default
> implementation of `.as_integer_ratio()` in `numbers.Rational` anyway.  That
> would make a clear statement of intent, and would do the right thing for
> `Fraction` instances.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Tim Peters

Tim Peters  added the comment:

Thanks, Guido!  I figured I was missing something :-)

It looks like `numbers.Rational` _is_ a "for real" base class of 
`fractions.Fraction`, though, so I'm in favor of supplying a default 
implementation of `.as_integer_ratio()` in `numbers.Rational` anyway.  That 
would make a clear statement of intent, and would do the right thing for 
`Fraction` instances.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS

2018-03-13 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +easy
versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2018-03-13 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Tomas,

Would you be willing to make a Github pull request with your patch?  Thanks.

--
nosy: +csabella
stage: commit review -> needs patch
versions: +Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32987] tokenize.py parses unicode identifiers incorrectly

2018-03-13 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I believe this may be a duplicate of issue 12486.

--
nosy: +csabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Guido van Rossum

Guido van Rossum  added the comment:

Actually numbers.Rational is a virtual base class for int, so it won't 
automagically appear there.

Adding it to the math module is inferior because for non-rational types (e.g. 
alternative float implementations) the math module won't have the knowledge 
about internals to implement it -- and casting to float() would defeat the 
purpose.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-03-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The expected behaviour here would be to raise ValueError, as on other closed 
objects:

>>> s = io.StringIO()
>>> s.close()
>>> s.write("")
Traceback (most recent call last):
  File "", line 1, in 
ValueError: I/O operation on closed file

--
nosy: +pitrou
versions: +Python 3.8 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22872] multiprocessing.Queue raises AssertionError

2018-03-13 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
components: +Library (Lib) -ctypes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33047] "RuntimeError: dictionary changed size during iteration" using trace.py module

2018-03-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I cannot reproduce this on Ubuntu 16.04.

--
nosy: +belopolsky, paul.moore, pitrou, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Tim Peters

Tim Peters  added the comment:

Serhiy, we already went down the path of implementing this as a method.   Of 
course `numbers.Rational` could define the method as `return (self.numerator, 
self.denominator)` for itself and its subclasses.  Unless I'm confused, that 
would "magically" define the method for (at least) ints and Fractions too - but 
I didn't try it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33064] lib2to3 fails on a trailing comma after **kwargs in a function signature

2018-03-13 Thread Łukasz Langa

Change by Łukasz Langa :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33054] unittest blocks when testing function using multiprocessing.Pool with state spawn

2018-03-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Please, can you post a self-contained script to reproduce the issue?

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
keywords: +easy (C)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28716] Fractions instantiation revisited

2018-03-13 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FYI, adding int.as_integer_ratio() is being taken care in a separate issue:  
https://bugs.python.org/issue33073 . I've set it aside for a beginning core-dev 
mentee to work on because it is simple and self-contained.  Pretty much all the 
related work can be done here.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Wouldn't be better to add the function as_integer_ration() in the math module 
(or in more appropriate place)?

def as_integer_ration(x):
if hasattr(x, 'as_integer_ration'):
return x.as_integer_ration()
else:
return (x.numerator, x.denominator)

The advantage over adding the int method is that it will automatically support 
other rational numbers like NumPy integers.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Nofar Schnider

Nofar Schnider  added the comment:

I'm working on it

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> it looks like there's some overlap with the goals of issue #28716

Okay, let's focus this issue on just int.as_integer_ratio() so that Nofar can 
have something small and self contained to work on :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Mark Dickinson

Mark Dickinson  added the comment:

On the Fraction constructor, it looks like there's some overlap with the goals 
of issue #28716 here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Mark Dickinson

Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Tim Peters

Tim Peters  added the comment:

> Is this also desired for fractions.Fraction and numbers.Rational?

I think so.  The idea, e.g., that "it's obvious" for Fraction is no more 
compelling than that it's even more obvious for ints ;-)  Given that it's 
spreading to ints anyway, there's an opportunity to make it possible for 
clients to write utterly uniform code for every type whose values can be 
represented as integer ratios.

I'd also say it's desirable to extend the Fraction constructor, to accept 
argument(s) of any type(s) that implement as_integer_ratio().  But that should 
probably be a different issue.

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Raymond Hettinger

New submission from Raymond Hettinger :

Goal:  make int() more interoperable with float by making a float/Decimal 
method also available on ints.  This will let mypy treat ints as a subtype of 
floats.

See: https://mail.python.org/pipermail/python-dev/2018-March/152384.html

Open question:  Is this also desired for fractions.Fraction and 
numbers.Rational?

--
assignee: Nofar Schnider
components: Library (Lib)
messages: 313780
nosy: Nofar Schnider, gvanrossum, rhettinger
priority: normal
severity: normal
status: open
title: Add as_integer_ratio() to int() objects
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Xavier!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset baca85fcc7cdf70af4a76ea0966d4842c173de1a by Serhiy Storchaka 
(xdegaye) in branch '2.7':
[2.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. 
(GH-6111)
https://github.com/python/cpython/commit/baca85fcc7cdf70af4a76ea0966d4842c173de1a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
versions: +Python 2.7, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23599] single and double quotes stripped upon paste with MacPorts libedit

2018-03-13 Thread Ned Deily

Ned Deily  added the comment:

Cheryl, as far as I know this is still an unresolved issue for at least some 
versions of Python and some versions of libedit.  I'd like to keep it open as a 
reminder.  If someone else wants to dig into it before I get around to it, feel 
free to do so.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

FWIW I now get github notifications, the problem was some bad configuration of 
my github profile (my fault).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The conditions used for the fix are still the same in 2.7: f->f_trace == NULL 
on a call event, f->f_lasti == -1 in a new frame and f->f_stacktop == NULL in a 
trace function with a non-line event except for yield statements.
There are minor differences: the YIELD_FROM opcode does not exist and 
function.__code__ is written as function.func_code.

Added a PR for 2.7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +5874

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Cython compiler 0.28 released

2018-03-13 Thread Stefan Behnel
Hi everyone,

I'm pleased to announce the immediate availability of Cython 0.28, after
almost half a year of development.

https://pypi.python.org/pypi/Cython/0.28

What is Cython?

Cython is a widely used and production proven optimising static compiler
for both the Python programming language and the extended Cython
programming language, and one of the pillars of the high-performance Python
ecosystem. It provides direct access to C/C++ libraries and data types as a
language feature, and makes writing fast native C extensions for Python as
easy as Python itself.


The major new features in 0.28 include:

* Cdef classes can now multiply inherit from ordinary Python classes,
  as long as (exactly) one base class is an extension type.

* The "const" modifier can be applied to memoryview declarations to allow
  read-only buffers as input.

* C code in the docstring of a "cdef extern" block is copied verbatimly
  into the generated file.


The changelog lists the various other big and small features, optimisations
and bug fixes that went into this release:

https://github.com/cython/cython/blob/0.28/CHANGES.rst


Have fun,

Stefan
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


NumPy 1.14.2 released

2018-03-13 Thread Charles R Harris
Hi All,

I am pleased to announce the release of NumPy 1.14.2. This is a bugfix
release for some bugs reported following the 1.14.1 release. The major
problems dealt with are as follows.

   - Residual bugs in the new array printing functionality.
   - Regression resulting in a relocation problem with shared library.
   - Improved PyPy compatibility.

This release supports Python 2.7 and 3.4 - 3.6. Wheels for the release are
available on PyPI. Source tarballs, zipfiles, release notes, and the
changelog are available on github
. The Python 3.6
wheels available from PIP are built with Python 3.6.2 and should be
compatible with all previous versions of Python 3.6. The source releases
were cythonized with Cython 0.26.1, which is known to *not* support the
upcoming Python 3.7 release. People who wish to run Python 3.7 should check
out the NumPy repo and try building with the, as yet, unreleased master
branch of Cython.

Contributors


A total of 4 people contributed to this release.  People with a "+" by their
names contributed a patch for the first time.

* Allan Haldane
* Charles Harris
* Eric Wieser
* Pauli Virtanen

Pull requests merged


A total of 5 pull requests were merged for this release.

* `#10674 `__: BUG: Further
back-compat fix for subclassed array repr
* `#10725 `__: BUG: dragon4
fractional output mode adds too many trailing zeros
* `#10726 `__: BUG: Fix f2py
generated code to work on PyPy
* `#10727 `__: BUG: Fix missing
NPY_VISIBILITY_HIDDEN on npy_longdouble_to_PyLong
* `#10729 `__: DOC: Create
1.14.2 notes and changelog.

Cheers,

Charles Harris
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: 2.7 EOL = 2020 January 1

2018-03-13 Thread Chris Angelico
On Wed, Mar 14, 2018 at 5:30 AM, Tim Chase
 wrote:
> On 2018-03-13 10:58, Terry Reedy wrote:
>> Two days later, Benjamin Peterson, the 2.7 release manager, replied
>> "Sounds good to me. I've updated the PEP to say 2.7 is completely
>> dead on Jan 1 2020." adding "The final release may not literally be
>> on January 1st".
>
> Am I the only one saddened by this announcement?  I mean, it could
> have been something like
>
> """
> "VOOM"?!?  Mate, 2.7 wouldn't "voom" if you put four million volts
> through it!  It's bleedin' demised!  It's not pinin'!  It's passed on!
> This 2.x series is no more!  It has ceased to be!  It's expired and
> gone to meet its maker!  It's a stiff!  Bereft of life, it rests in
> peace!  If you hadn't nailed it to your dependencies it'd be pushing
> up the daisies!  Its metabolic processes are now 'istory!  It's off
> the twig!  It's kicked the bucket, it's shuffled off its mortal coil,
> run down the curtain and joined the bleedin' choir invisible!!
> THIS IS AN EX-VERSION!!
> """
>

Wait until Jan 2nd 2020. Then post that.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33072] The interpreter bytecodes for with statements are overly complex.

2018-03-13 Thread Mark Shannon

Mark Shannon  added the comment:

So you did.
Sorry for the duplication

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: 2.7 EOL = 2020 January 1

2018-03-13 Thread Tim Chase
On 2018-03-13 10:58, Terry Reedy wrote:
> Two days later, Benjamin Peterson, the 2.7 release manager, replied 
> "Sounds good to me. I've updated the PEP to say 2.7 is completely
> dead on Jan 1 2020." adding "The final release may not literally be
> on January 1st".

Am I the only one saddened by this announcement?  I mean, it could
have been something like

"""
"VOOM"?!?  Mate, 2.7 wouldn't "voom" if you put four million volts
through it!  It's bleedin' demised!  It's not pinin'!  It's passed on!
This 2.x series is no more!  It has ceased to be!  It's expired and
gone to meet its maker!  It's a stiff!  Bereft of life, it rests in
peace!  If you hadn't nailed it to your dependencies it'd be pushing
up the daisies!  Its metabolic processes are now 'istory!  It's off
the twig!  It's kicked the bucket, it's shuffled off its mortal coil,
run down the curtain and joined the bleedin' choir invisible!!
THIS IS AN EX-VERSION!!
"""

Pythonically-yers,

-tkc


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33072] The interpreter bytecodes for with statements are overly complex.

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I already opened issue32949 for this.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Simplify "with"-related opcodes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32949] Simplify "with"-related opcodes

2018-03-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5873

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33041] Issues with "async for"

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 6110 adds tests for jumping in/out of 'async with' blocks. It isn't directly 
related to 'async for', but it adds helpers that will be used also in tests for 
'async for'.

I'm not sure this is a correct and good way of writing such tests.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33041] Issues with "async for"

2018-03-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5872

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33072] The interpreter bytecodes for with statements are overly complex.

2018-03-13 Thread Mark Shannon

Change by Mark Shannon :


--
keywords: +patch
pull_requests: +5871
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33072] The interpreter bytecodes for with statements are overly complex.

2018-03-13 Thread Mark Shannon

New submission from Mark Shannon :

The bytecodes WITH_CLEANUP_START and WITH_CLEANUP_FINISH are complex and 
implement entirely different behavior depending on what is on the stack.

This is unnecessary as the same semantics can be implemented with much simpler 
bytecodes and using the compiler do much of the work now done at runtime.

--
components: Interpreter Core
messages: 313771
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: The interpreter bytecodes for with statements are overly complex.
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27984] singledispatch register should typecheck its argument

2018-03-13 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

@xiang.zhang, would you be able to make a PR for your patch?  Thanks!

--
nosy: +csabella
stage:  -> patch review
versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33063] failed to build _ctypes: undefined reference to `ffi_closure_FASTCALL'

2018-03-13 Thread Siming Yuan

Siming Yuan  added the comment:

interesting, didn't know that option existed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8947] Provide as_integer_ratio() method to Decimal

2018-03-13 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

This issue has been superseded by #25928.

--
resolution: rejected -> duplicate
stage: patch review -> resolved
superseder:  -> Add Decimal.as_integer_ratio()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8947] Provide as_integer_ratio() method to Decimal

2018-03-13 Thread Mark Dickinson

Mark Dickinson  added the comment:

Apologies: the title change was accidental. Reverted.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33067] http.client no longer sends HTTP request in one TCP package

2018-03-13 Thread Senthil Kumaran

Change by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you! Do you mind to make a backport to 2.7 (if this makes a sense)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset b8e9d6c5cd44ebc9c462fea9ad1bc5d0b970e28a by Serhiy Storchaka 
(xdegaye) in branch 'master':
bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-6107)
https://github.com/python/cpython/commit/b8e9d6c5cd44ebc9c462fea9ad1bc5d0b970e28a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2018-03-13 Thread Jon Janzen

Jon Janzen  added the comment:

Support for KeyedArchives are not limited to the Swift implementation I linked 
to. They have been supported since Mac OS X since 10.2 (long before Swift came 
around). The documentation 
(https://developer.apple.com/documentation/foundation/nskeyedarchiver?language=objc)
 shows that NSKeyedArchive can only output in plist format since outputFormat 
is of type NSPropertyListFormat (allowing to output in either XML or binary).

The other unimplemented binary token types (URL, UUID, set, ordset) are not 
used under NSKeyedArchive (see the "Encoding Data and Objects" section of the 
documentation mentioned above) so there's no concern that supporting 0x80 (UID) 
will suddenly necessitate implementing the other unimplemented types. If you 
feel that it would be necessary to implement them in order to accept the patch 
I would be happy to try and implement them.

I know I certainly have an use case (reading to-do list data from the 2Do app) 
and the creator of this bug wanted to read SnapChat data files.

Currently, I am using a hot-patched plistlib._BinaryPlistParser to read the 
data I need (see attached for a snippet) and I would rather not do that, but if 
you think my use case scope does not warrant inclusion in the standard library 
then I'll just have to deal with that.

--
Added file: https://bugs.python.org/file47483/plist_hack.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +5870

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32174] nonASCII punctuation characters can not display in python363.chm.

2018-03-13 Thread Steve Dower

Steve Dower  added the comment:

We should probably prefer to force ASCII with explicit escapes (ideally named 
escapes, rather than codepoints). I'm not sure how to make Sphinx/docutils do 
that, but presumably it could be our own extension that handles the problematic 
characters people add to our docs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23599] single and double quotes stripped upon paste with MacPorts libedit

2018-03-13 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hi Ned,

Do you think this issue still needs follow up?

--
nosy: +csabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-03-13 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

In PR 5928 Serhiy Storchaka wrote:
> Great! Could you please create a backport to master?

Yes.
I prefer to answer in the issue as I am still not getting any mail from github.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-13 Thread Paul Ganssle

Change by Paul Ganssle :


--
keywords: +patch
pull_requests: +5869
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33063] failed to build _ctypes: undefined reference to `ffi_closure_FASTCALL'

2018-03-13 Thread Zachary Ware

Zachary Ware  added the comment:

Your better option is to install libffi-devel (or whatever the correct name is 
) on your system and use `./configure --with-system-ffi`.  This is the default 
in 3.6 and the only option in 3.7 (on any platform but Windows and macOS).

--
nosy: +zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



2.7 EOL = 2020 January 1

2018-03-13 Thread Terry Reedy
On March 10, on thread "Python 2.7 -- bugfix or security before EOL?", 
Guido van Russum wrote


"The way I see the situation for 2.7 is that EOL is January 1st, 2020, 
and there will be no updates, not even source-only security patches, 
after that date. Support (from the core devs, the PSF, and python.org) 
stops completely on that date. If you want support for 2.7 beyond that 
day you will have to pay a commercial vendor. Of course it's open source 
so people are also welcome to fork it. But the core devs have toiled 
long enough, and the 2020 EOL date (an extension from the originally 
annouced 2015 EOL!) was announced with sufficient lead time and fanfare 
that I don't feel bad about stopping to support it at all."


Two days later, Benjamin Peterson, the 2.7 release manager, replied 
"Sounds good to me. I've updated the PEP to say 2.7 is completely dead 
on Jan 1 2020." adding "The final release may not literally be on 
January 1st".


https://www.python.org/dev/peps/pep-0373/ now says
"2.7 will receive bugfix support until January 1, 2020."

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


[issue33063] failed to build _ctypes: undefined reference to `ffi_closure_FASTCALL'

2018-03-13 Thread Christian Heimes

Christian Heimes  added the comment:

3.4 and 3.5 are in security release-only mode.

--
nosy: +christian.heimes
versions:  -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2018-03-13 Thread Jurjen N.E. Bos

Jurjen N.E. Bos  added the comment:

Oh wait, I already posted that so long ago I forgot about it.
Oops.
Sorry about the repetition, folks.
- Jurjen

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2018-03-13 Thread Jurjen N.E. Bos

Jurjen N.E. Bos  added the comment:

I always use the following piece of code that can be trivially used to patch 
the source.
It basically looks for a using line in the test string and finds it in the 
source file. If there is a match, we know where we are. Otherwise it falls back 
to the "normal" way.

--
Added file: https://bugs.python.org/file47482/doctestfix.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2018-03-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
type: behavior -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33056] LEaking files in concurrent.futures.process

2018-03-13 Thread Steve Dower

Steve Dower  added the comment:

Andrew - you can search for some module names in the nosy list to add the 
designated people for them. The components list doesn't include all of them 
(perhaps it should?).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33063] failed to build _ctypes: undefined reference to `ffi_closure_FASTCALL'

2018-03-13 Thread Siming Yuan

Siming Yuan  added the comment:

edit - I do see this in python 3.6.4 on a different server when building 32-bit 

Red Hat Enterprise Linux Workstation release 6.7 (Santiago)

gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)

--
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25345] Unable to install Python 3.5 on Windows 10

2018-03-13 Thread Steve Dower

Steve Dower  added the comment:

Arran - I think yours is a different issue. There should be some other log 
files near the one you shared that I'll need to see to find what's going wrong. 
Can you zip up all the Python ones and attach them here?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28716] Fractions instantiation revisited

2018-03-13 Thread Eric Wieser

Eric Wieser  added the comment:

> Are you suggesting that _if_ they were to implement `as_integer_ratio` at 
> some point in the future, then they'd become compatible with `Fraction`

Yes, exactly. Conversely, there's little gain in implementing it _until_ 
`Fraction` supports calling it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2018-03-13 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I'm still not too happy about supporting UIDs in plistlib, especially because 
I'm not sure it that's all that's needed. AFAIK I removed more types that the 
underlying encoder supported from plistlib because those are never used in 
plist files. 

The swift encoder for keyed archives is probably not the code that's actually 
used on the OS, AFAIK that still is Objective-C code.

P.S. I changed the version selection to 3.8, adding support for UIDs would be a 
feature change and not suited for back ports.

--
versions: +Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2018-03-13 Thread Jon Janzen

Jon Janzen  added the comment:

Ping

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33071] Document that PyPI no longer requires 'register'

2018-03-13 Thread Christian Heimes

Change by Christian Heimes :


--
components:  -Distutils
keywords: +easy
versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-03-13 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The "reverse_pointers" attribute is implicitly documented by this phrase in the 
introduction of network objects:

--
All attributes implemented by address objects are implemented by network 
objects as well.
--

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33071] Document that PyPI no longer requires 'register'

2018-03-13 Thread Paul Ganssle

New submission from Paul Ganssle :

I've been asked to post this by @brainwave (who is having some trouble getting 
an account on bpo due to technical difficulties).

Per twine's github issue 311 ( https://github.com/pypa/twine/issues/311 ), it 
seems that distutil's docs Update setuptools and distutils docs, e.g., 
https://docs.python.org/3.6/distutils/packageindex.html#the-upload-command 
should be clarified to indicate that PyPI does not require register anymore, 
although other package indexes might.

--
assignee: docs@python
components: Distutils, Documentation
messages: 313749
nosy: docs@python, dstufft, eric.araujo, p-ganssle
priority: normal
severity: normal
status: open
title: Document that PyPI no longer requires 'register'
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-13 Thread Ned Deily

Change by Ned Deily :


--
nosy: +ncoghlan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33068] Inconsistencies in parsing (evaluating?) longstrings

2018-03-13 Thread David Lukeš

David Lukeš  added the comment:

Oh, right, of course! Sorry and thanks for taking the time to clarify that :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33070] Add platform triplet for RISC-V

2018-03-13 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +5868
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-13 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33070] Add platform triplet for RISC-V

2018-03-13 Thread Andreas Schwab

Change by Andreas Schwab :


--
components: Build
nosy: schwab
priority: normal
severity: normal
status: open
title: Add platform triplet for RISC-V
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-03-13 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-13 Thread Paul Ganssle

New submission from Paul Ganssle :

This is basically the same as issue 962772, as there seems to have been a 
regression. The current version of distutils discards author= metadata if 
maintainer= is present, even though PEP 345 has added the Maintainer: and 
Maintainer-Email: metadata fields.

I think that the way forward is to have write_pkg_info generate separate 
Maintainer: and Maintainer-Email: fields.

--
components: Distutils
messages: 313747
nosy: dstufft, eric.araujo, p-ganssle
priority: normal
severity: normal
status: open
title: Maintainer information discarded when writing PKG-INFO
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Enumerating all 3-tuples

2018-03-13 Thread Robin Becker

On 13/03/2018 11:14, Steven D'Aprano wrote:

On Mon, 12 Mar 2018 13:17:15 +, Robin Becker wrote:


It's possible to generalize the cantor pairing function to triples, but
that may not give you what you want. Effectively you can generate an
arbitrary number of triples using an iterative method. My sample code
looked like this


import math

def cantor_pair(k1,k2):
return (((k1+k2)*(k1+k2+1))>>1) + k2

def inverse_cantor_pair(z):
w = int((math.sqrt(8*z+1)-1)/2.0)
t = (w*(w+1))>>1
j = z - t
i = w - j
return i, j


I definitely want to avoid any round trips through float in order to use
sqrt.


But thanks for the code, I'll certainly steal it, er I mean study it for
future reference :-)



well I guess Cantor didn't worry about rounding errors :)

For high z there's an integer square root function which seems to work pretty 
well here
http://code.activestate.com/recipes/577821-integer-square-root-function/

I'm not sure if there are any other sensible invertible pairing functions on non-negative integers; this page mentions a couple 
implemented in matlab


https://uk.mathworks.com/matlabcentral/fileexchange/44253-three-different-bijections-or-pairing-functions-between-n-and-n%5E2--including-cantor-polynomials-

and this describes the elegant pairing more

http://szudzik.com/ElegantPairing.pdf

It seems reasonable that a mapping N x N --> N should require a square root in 
the inverse.
--
Robin Becker

--
https://mail.python.org/mailman/listinfo/python-list


[issue33068] Inconsistencies in parsing (evaluating?) longstrings

2018-03-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

"""\"" is parsed as """\ "": a triple-quoted string containing an 
escaped '"', followed by an empty single-quoted string.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33068] Inconsistencies in parsing (evaluating?) longstrings

2018-03-13 Thread David Lukeš

New submission from David Lukeš :

""" \""" """ evaluates to ' """ ' (as expected), but without the surrounding 
spaces, """\"" evaluates to '"' instead of '"""'.

Is this expected behavior? If I'm reading the definition of string syntax in 
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
 correctly, it shouldn't be.

--
components: Interpreter Core
messages: 313745
nosy: David Lukeš
priority: normal
severity: normal
status: open
title: Inconsistencies in parsing (evaluating?) longstrings
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33065] IDLE debugger: problem importing user created module

2018-03-13 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I cannot do anything from this bare description, as I cannot think of any 
reason why stepping should introduce an error.  It sounds like there are two 
files involved.  Try to reduce them to the minimum needed to reproduce the 
issue and then upload.

--
stage:  -> test needed
title: debugger issue concerning importing user created modules into another 
program -> IDLE debugger: problem importing user created module
type: compile error -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >