Terry J. Reedy | 22 Nov 22:56 2014

[issue22920] Crash with itertools


New submission from Terry J. Reedy:

import itertools

l = []
it = itertools.chain.from_iterable(l)
l.append(it)
next(it)

Ian Kelly (python-list, version unspecified) got "Segmentation fault (core dumped)".  With 2.7, 3.4.2,
3.5, I get same in interactive interpreter, the Windows "python has stopped working" box from console, or
subprocess hang with Idle.

----------
messages: 231534
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Crash with itertools
type: crash
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22920>
_______________________________________
_______________________________________________
(Continue reading)

Steve Dower | 22 Nov 22:40 2014

[issue22919] Update PCBuild for VS 2015


New submission from Steve Dower:

I've basically finished the core of the work to refresh the PCBuild project files and support building with
VS 2015, and I believe it's ready to merge in.

Though the title says VS 2015, builds will work fine with VS 2010 and VS 2013 (and probably VS 2012, but I
didn't try it). Even so, I've copied the old project files into PC/VS10.0, though I'd be happy to just
forget them.

I suspect Tools/msi/msi.py will stop working with this change. My replacement installer is not ready yet.
If anyone's particularly concerned about msi.py then I can try and restore it before checking this in, but
I'm 99.9% certain it won't be used for 3.5, so I don't see the point.

I've attached two patches, one with all the changes and the other with the "highlights" - the diff between
the diffs are most of the project files and the added/deleted files. I imagine practically everyone will
have a better time viewing the changes in their own hg tools, so the changes can be pulled from my sandbox
with "hg pull https://hg.python.org/sandbox/steve.dower -b Projects" or viewed at
https://hg.python.org/sandbox/steve.dower/shortlog/d08b456124e5. (I'll rebase these as a single
commit in default when it goes in.)

A few changes that may deserve some more discussion:

* Builds for 32-bit now go to PCBuild\win32 instead of PCBuild (the batch file updates should make this transparent)

* The project that used to trigger the OpenSSL build is now two projects (libeay, ssleay) that do the build
directly, so they may need updating whenever we update the OpenSSL version or change _ssl/_hashlib. I'm
obviously happy to track these. (The advantages are proper incremental builds, better debugging,
better optimisation - definitely PGO if we turn that back on.)

(Continue reading)

Éric Araujo | 22 Nov 21:49 2014

[issue22918] Doc for __iter__ makes inexact comment about dict.__iter__


New submission from Éric Araujo:

https://docs.python.org/3/reference/datamodel#object.__iter__

> This method should return a new iterator object that can iterate over all the objects
> in the container. For mappings, it should iterate over the keys of the container, and
> should also be made available as the method keys().

In 3.x, d.__iter__() is not equivalent to d.keys() but to iter(d.keys()).

----------
assignee: docs <at> python
components: Documentation
keywords: easy
messages: 231529
nosy: docs <at> python, eric.araujo
priority: normal
severity: normal
stage: needs patch
status: open
title: Doc for __iter__ makes inexact comment about dict.__iter__
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22918>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
(Continue reading)

heme | 22 Nov 21:19 2014

[issue22917] Calculating problem


New submission from heme:

Hi guys 

I am very new to this, (just started my first lines today) so I am using
a book to learn Python. BUT there is something wrong: 

This is my program (from the book): 

# This is not quite true outside of USA
# and is based on my dim memories of my younger years
print("Firstish Grade")
print("1 + 1 =", 1 + 1)
print("2 + 4 =", 2 + 4)
print("5 - 2 =", 5 - 2)
print()
print("Thirdish Grade")
print("243 - 23 =", 243 - 23)
print("12 * 4 =", 12 * 4)
print("12 / 3 =", 12 / 3)
print("13 / 3 =", 13 // 3, "R", 13 % 3)
print()
print("Junior High")
print("123.56 - 62.12 =", 123.56 - 62.12)
print("(4 + 3) * 2 =", (4 + 3) * 2)
print("4 + 3 * 2 =", 4 + 3 * 2)
print("3 ** 2 =", 3 ** 2) 

and this is the programs answer: 
(Continue reading)

Kevin Smith | 22 Nov 17:36 2014

[issue22916] Interpreter segfault on attempted tab complete


New submission from Kevin Smith:

I am getting a segmentation fault in the interpreter when trying to tab complete options for a module.  I am
running python 3.4.2 on Arch Linux.

Python 3.4.2 (default, Oct  8 2014, 13:44:52) 
[GCC 4.9.1 20140903 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sfml as sf
>>> t = sf.Texture.from_file ("sprites.png")
>>> s = sf.Sprite (t)
>>> s.Segmentation fault

When I type "s." then push tab to complete available options the interpreter segfaults.  This is with
python-sfml-1.3-4 from the Arch repositories.  Tab completion for built-in types seems to work fine.

----------
messages: 231520
nosy: FazJaxton
priority: normal
severity: normal
status: open
title: Interpreter segfault on attempted tab complete
type: crash
versions: Python 3.4

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22916>
(Continue reading)

Serhiy Storchaka | 22 Nov 17:11 2014

[issue1610654] cgi.py multipart/form-data


Changes by Serhiy Storchaka <storchaka <at> gmail.com>:

----------
assignee:  -> serhiy.storchaka

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue1610654>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

Jocelyn | 22 Nov 00:54 2014

[issue22915] sax.parser cannot get xml data from a subprocess pipe


New submission from Jocelyn:

With the attached code, and an xml file, I got the following error with python 3.4.2:

$ cat toto.xml
<?xml version='1.0' encoding='UTF-8'?>
<test></test>

$ python3.4 toto.py 
Traceback (most recent call last):
  File "toto.py", line 10, in <module>
    parse(proc.stdout, ContentHandler())
  File "/usr/lib/python3.4/xml/sax/__init__.py", line 33, in parse
    parser.parse(source)
  File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 119, in parse
    self.prepareParser(source)
  File "/usr/lib/python3.4/xml/sax/expatreader.py", line 111, in prepareParser
    self._parser.SetBase(source.getSystemId())
TypeError: must be str, not int

The same test works with python2, and I would expect the code to work with python 3 too.

Thanks,
Jocelyn

----------
components: XML
(Continue reading)

Brett Cannon | 21 Nov 21:03 2014

[issue22914] Rewrite of Python 2/3 porting HOWTO


New submission from Brett Cannon:

This is a rewrite of the Python 2/3 porting HOWTO to describe how to make code be compatible with both Python 2
& 3. To see it rendered for easier reading, see https://gist.github.com/brettcannon/91ff264ae549315706f6

----------
assignee: brett.cannon
components: Documentation
files: pyporting.diff
keywords: patch
messages: 231496
nosy: brett.cannon
priority: low
severity: normal
status: open
title: Rewrite of Python 2/3 porting HOWTO
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37244/pyporting.diff

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22914>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

Brett Cannon | 21 Nov 21:03 2014

[issue22913] Rewrite of Python 2/3 porting HOWTO


New submission from Brett Cannon:

This is a rewrite of the Python 2/3 porting HOWTO to describe how to make code be compatible with both Python 2
& 3. To see it rendered for easier reading, see https://gist.github.com/brettcannon/91ff264ae549315706f6

----------
assignee: brett.cannon
components: Documentation
files: pyporting.diff
keywords: patch
messages: 231495
nosy: brett.cannon
priority: low
severity: normal
status: open
title: Rewrite of Python 2/3 porting HOWTO
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37243/pyporting.diff

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22913>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

Taylor Marks | 21 Nov 20:55 2014

[issue22912] urlretreive locks up in 2.7.8


New submission from Taylor Marks:

The following code causes Python 2.7.8 to lockup for ten minutes, then crash, in both Windows 7 and OS X:

from urllib import urlretrieve
urlretrieve('http://chromedriver.storage.googleapis.com/2.12/chromedriver_win32.zip', 'chromedriver_win32.zip')

Here's a thread on StackOverflow where I originally posted about this bug, assuming it was an issue in my
code, before other people let me know that the problem wasn't my code, but with Python 2.7.8, on both
Windows 7 and OS X, and that in older versions of Python, such as 2.7.6, the code works fine.

http://stackoverflow.com/questions/27025998/urllib-urlretreive-completely-locks-up-python

----------
components: Library (Lib)
messages: 231492
nosy: TaylorSMarks
priority: normal
severity: normal
status: open
title: urlretreive locks up in 2.7.8
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22912>
_______________________________________
_______________________________________________
(Continue reading)

Ian Kelly | 21 Nov 19:42 2014

[issue22911] Segfault on recursive itertools.chain.from_iterable


New submission from Ian Kelly:

I expect this should result in a recursion depth exceeded error, not a segmentation fault.

$ cat test.py
import itertools

l = []
it = itertools.chain.from_iterable(l)
l.append(it)
next(it)
$ python3 test.py
Segmentation fault (core dumped)

----------
components: Library (Lib)
messages: 231489
nosy: ikelly
priority: normal
severity: normal
status: open
title: Segfault on recursive itertools.chain.from_iterable
versions: Python 3.4

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22911>
_______________________________________
_______________________________________________
(Continue reading)


Gmane