[issue25959] tkinter - PhotoImage.zoom() causes segfault

2015-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you. Can you provide your image? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue25958] Implicit ABCs have no means of "anti-registration"

2015-12-26 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-12-26 Thread Tim Smith
Changes by Tim Smith : -- nosy: +tdsmith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue25930] Document that os.remove is semantically identical to os.unlink

2015-12-26 Thread Swati Jaiswal
Swati Jaiswal added the comment: Please check this. Fixed according to previous comment. -- keywords: +patch nosy: +curioswati Added file: http://bugs.python.org/file41428/iss_25930.patch ___ Python tracker ___

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-12-26 Thread Jens Troeger
Jens Troeger added the comment: With my update from Python 3.4.3 to Python 3.4.4 (default, Dec 25 2015, 06:14:41) I started experiencing crashes of my applications and I suspect this change is the culprit. I have a class that inherits from namedtuple, and code calls vars() (i.e. retrieve __di

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Guido van Rossum
Guido van Rossum added the comment: All sounds fine. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Andrew Barnert
Andrew Barnert added the comment: > This sounds good. Also, reversed() could then be modified to produce a better error. Should `iter` also be modified to produce a better error if `__iter__` is None? Also, should this be documented? Maybe a sentence in the "Special method names" section of th

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Guido van Rossum
Guido van Rossum added the comment: This sounds good. Also, reversed() could then be modified to produce a better error. (The "unhashable" error comes from the hash() builtin, so that's also a precedent.) On Sat, Dec 26, 2015 at 4:32 PM, Andrew Barnert wrote: > > Andrew Barnert added the comme

[issue25959] tkinter - PhotoImage.zoom() causes segfault

2015-12-26 Thread hcdb
hcdb added the comment: system 1: os: Linux Mint 17.3 (64bit Mate) python version: 2.7.6 python-tk version: 2.7.5-1ubuntu1 (according to packagemanager) python3 version 3.4.3 python3-tk version: 3.4.3-1~14.04.2 (according to packagemanager) running python in gdb on this system gives me these o

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I wonder why this does not trigger the exception. Because in case of utf-8 and iso-8859-1 decoding and encoding steps are omitted. In general case the input is decoded from specified encoding and than encoded to UTF-8 for parser. But for utf-8 and iso-8859

[issue25958] Implicit ABCs have no means of "anti-registration"

2015-12-26 Thread Andrew Barnert
Andrew Barnert added the comment: As Serhiy pointed out on -ideas, there's no reason `reversed` couldn't add special handling for `__reversed__ is None`, akin to `hash`'s special handling for `__hash__ is None`, to produce whatever error message we wanted in the `TypeError`, instead of "'NoneT

[issue25959] tkinter - PhotoImage.zoom() causes segfault

2015-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can't reproduce a crash. What is your OS? What versions of your Python and Tk? Can you provide your image? -- nosy: +serhiy.storchaka ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2015-12-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Andrew Barnert
Andrew Barnert added the comment: As mentioned in #25958, Guido pointed out on -ideas that `__hash__ = None` is already the standard way to declare a class unhashable, and it's recognized by `collections.abc.Hashable`. Doing `__reversed__ = None` does make `reversed(m)` raise a `TypeError` (a

[issue25958] Implicit ABCs have no means of "anti-registration"

2015-12-26 Thread Andrew Barnert
Andrew Barnert added the comment: As Guido pointed out on -ideas, hashing already uses the convention of `__hash__ is None` to declare a type unhashable, and `collections.abc.Hashable.__subclasshook__` already checks for that. Meanwhile, setting `__iter__` and `__reversed__` to `None` already

[issue25959] tkinter - PhotoImage.zoom() causes segfault

2015-12-26 Thread hcdb
New submission from hcdb: My 6 lines of code crash and cause a segmentation fault when using .zoom() on a PhotoImage in tkinter (run test.py) tested and crashed in python 2.7.6, 2.7.9, 3.4.2 & 3.4.3 on linux mint 17.3 and debian jessie ps. just learning to code python, so maybe i'm doing it w

[issue25956] Unambiguous representation of recursive objects

2015-12-26 Thread Chris Angelico
Chris Angelico added the comment: LGTM. I'm currently seeing failures in test_ssl, but they weren't introduced by this patch. I'll run with this patch and see if I run into any third party test failures. +1 on the change. -- nosy: +Rosuav ___ Pytho

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Andrew Barnert
Andrew Barnert added the comment: Also, I filed #25958 as an ABC equivalent to Serhiy's typehinting problem. I don't know if that actually needs to be solved, but that definitely takes it out of the way for this issue. -- ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2015-12-26 Thread Andrew Barnert
New submission from Andrew Barnert: Serhiy Storchaka raised an issue (http://bugs.python.org/msg256910) with static type hints on #25864 (http://bugs.python.org/issue25864), which I believe also applies to runtime ABCs. Consider this class, which uses `[]` in a way similar to generic types:

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 26.12.2015 22:46, STINNER Victor wrote: > > In Python, there are multiple implementations of the utf-8 codec with many > shortcuts. I'm not surprised to see bugs depending on the exact syntax of > the utf-8 codec name. Maybe we need to share even more cod

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread STINNER Victor
STINNER Victor added the comment: In Python, there are multiple implementations of the utf-8 codec with many shortcuts. I'm not surprised to see bugs depending on the exact syntax of the utf-8 codec name. Maybe we need to share even more code to normalize and compare codec names. (I think that py

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Andrew Barnert
Andrew Barnert added the comment: Serhiy already filed the typing.Reversible bug on the separate typehinting tracker (https://github.com/ambv/typehinting/issues/170). So, unless fixing that bug requires some changes back to collections.abc or something else in the stdlib, I think the only issu

[issue25955] email.utils.formataddr does not support RFC 6532

2015-12-26 Thread Sergei Maertens
Sergei Maertens added the comment: I could probably come up with a patch, but the reason I ran into this is because it's used in the core of Django. I already submitted a bug with Django, and with the legaciness of this function it feels like Django should move to the new API or implement its

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please fold these cases into one: if (strcmp(buf, "utf-8") == 0 || strncmp(buf, "utf-8-", 6) == 0) return "utf-8"; else if (strcmp(buf, "utf8") == 0 || strncmp(buf, "utf8-", 6) == 0) return "utf-8"; -> if

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread R. David Murray
R. David Murray added the comment: So this issue now has two problems being discussed in it. Someone should start a new issue for the typing.Reversible problem. -- ___ Python tracker _

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-26 Thread Andrew Barnert
Andrew Barnert added the comment: > Perhaps there is a bug in typing.Reversible. It doesn't accept all types > supported by reversed(). > ... And accepts types that don't work with reversed(). The problem is the way the two are defined: * Reversible is true if you implement __reversed__ * rev

[issue25949] Lazy creation of __dict__ in OrderedDict

2015-12-26 Thread Camilla Montonen
Camilla Montonen added the comment: Hi Serhiy, I tried to see whether the patch's unit test in test_ordered_dict.py would fail when the changes to odictobject.c were not applied and it did not. The code change to test_ordered_dict.py does not appear to test the fact that a dict is not automat

[issue25957] sockaddr_l2 lacks CID, address type (AF_BLUETOOTH sockets)

2015-12-26 Thread Mike Ryan
New submission from Mike Ryan: The AF_BLUETOOTH socket type lacks support for specifying CID and address type in sockaddr_l2. These structure members have been present since 2009 and 2012 respectively: https://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=3de95535 https://git.kernel.org/c

[issue25702] Link Time Optimizations support for GCC and CLANG

2015-12-26 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I'm adding Brett, Gregory, Stefan and Victor as nosy because this issue might be interesting for them also. -- nosy: +brett.cannon, gregory.p.smith, haypo, scoder, skrah ___ Python tracker

[issue25954] Python 3.5.1 installer fails on Windows 7

2015-12-26 Thread Eryk Sun
Eryk Sun added the comment: Packages are installed from the ProgramData folder on the system volume. For example, the log shows the CRT update executed as follows: "C:\Windows\system32\wusa.exe" "C:\ProgramData\Package Cache\ D4036846864773E3D647F421DFE7F6CA536E307B\ Windows6.1-KB29

[issue25664] Logging cannot handle Unicode logger names

2015-12-26 Thread Vinay Sajip
Vinay Sajip added the comment: > Why not doing that in record constructor? You're right, that's probably better. Perhaps I was too hasty ... -- ___ Python tracker ___ __

[issue25955] email.utils.formataddr does not support RFC 6532

2015-12-26 Thread R. David Murray
R. David Murray added the comment: formataddr is part of the legacy interface and has no knowledge of the current policy. So it doesn't support RFC 6532. For that you need to use the new API: just assign your address to the appropriate field, or create a headerregistry.Address object. I'm i

[issue25955] email.utils.formataddr does not support RFC 6532

2015-12-26 Thread Alessandro Cucci
Alessandro Cucci added the comment: Sergei can you submit a patch? Otherwise I can work on that, I have free time. -- nosy: +acucci ___ Python tracker ___ __

[issue25956] Unambiguous representation of recursive objects

2015-12-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For now repr() of recursive object replaces nested representations of self with a placeholder containing "...": "[...]" for list, "{...}" for dict, "set(...)" for set, and just "..." for Python classes that use reprlib. Unfortunately such replacements are

[issue25664] Logging cannot handle Unicode logger names

2015-12-26 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 512a628c683e by Vinay Sajip in branch '2.7': > Closes #25664: handled logger names in Unicode. > https://hg.python.org/cpython/rev/512a628c683e .format() doesn't look to me like the best place to encode the name. Why not doing that in record con

[issue25954] Python 3.5.1 installer fails on Windows 7

2015-12-26 Thread Ned Batchelder
Ned Batchelder added the comment: This is in a virtualbox. I have my host OS files mapped in the guest Windows OS to drive N:. When I try to install by running N:\Downloads\python-3.5.1.exe, it fails with the error shown above. When I copy the file to the C: drive, it succeeds! ? -

[issue25955] email.utils.formataddr does not support RFC 6532

2015-12-26 Thread Claude Paroz
Changes by Claude Paroz : -- nosy: +claudep ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue25955] email.utils.formataddr does not support RFC 6532

2015-12-26 Thread Sergei Maertens
New submission from Sergei Maertens: The function `formataddr` in stdlib `email.utils` does not allow unicode e-mail addresses where the first part (before the @) is unicode. Python 3.5 promises support for SMTPUTF8 through `EmailPoliy.utf8` (https://docs.python.org/3/whatsnew/3.5.html#email),

[issue24940] RotatingFileHandler uses tell in non-binary mode to determine size of the file in bytes

2015-12-26 Thread Vinay Sajip
Vinay Sajip added the comment: I propose to close this as not a bug, as the exact rollover size is just meant to be in the close ball-park rather than to the exact byte. -- resolution: -> not a bug status: open -> pending ___ Python tracker

[issue25360] pyw should search for pythonw to implement #!/usr/bin/env python

2015-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2af2367d7eda by Vinay Sajip in branch '3.5': Fixes #25360: Search for pythonw.exe when in pyw.exe. https://hg.python.org/cpython/rev/2af2367d7eda New changeset ba1e102c3320 by Vinay Sajip in branch 'default': Closes #25360: Merged fix from 3.5. http

[issue25954] Python 3.5.1 installer fails on Windows 7

2015-12-26 Thread Ned Batchelder
Ned Batchelder added the comment: This was my second attempt, and there is no other installation running. -- ___ Python tracker ___ __

[issue25685] Inefficiency with SocketHandler - may send log record message string twice in pickled data structure

2015-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6210b41a2394 by Vinay Sajip in branch '3.5': Closes #25685: Made SocketHandler emission more efficient. https://hg.python.org/cpython/rev/6210b41a2394 New changeset 6a6a68a3d323 by Vinay Sajip in branch 'default': Closes #25685: Merged fix from 3.5.

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset d0a84d0c5ceb by Vinay Sajip in branch 'default': Closes #25789: Improved buffering behaviour in launcher. https://hg.python.org/cpython/rev/d0a84d0c5ceb -- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread 王杰
王杰 added the comment: I'm learning about Python's encoding rule and I write it as a test case. -- ___ Python tracker ___ ___ Python-bu

[issue25664] Logging cannot handle Unicode logger names

2015-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 512a628c683e by Vinay Sajip in branch '2.7': Closes #25664: handled logger names in Unicode. https://hg.python.org/cpython/rev/512a628c683e -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed __

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is not that an error is raised with coding:utf8, but that it isn't raised with coding:utf-8. Here is an example with bad iso8859-3. An error is raised as expected. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file41425/ba

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread STINNER Victor
STINNER Victor added the comment: > I has a file "gbk-utf-8.py" and it's encoding is GBK. I don't understand why you use "# coding: utf-8" if the file is encoded to GBK. Why not using "# coding: gbk"? -- ___ Python tracker

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread STINNER Victor
STINNER Victor added the comment: > Here is a fix with a patch. Oops, I mean 'with an unit test', sorry ;-) -- ___ Python tracker ___ ___

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread STINNER Victor
STINNER Victor added the comment: Here is a fix with a patch. -- keywords: +patch versions: +Python 2.7 Added file: http://bugs.python.org/file41424/utf8.patch ___ Python tracker ___

[issue25923] More const char

2015-12-26 Thread Stefan Krah
Stefan Krah added the comment: There's no need to revert it. Both versions are okay, but I wanted to point out that these kinds of changes a) add a cognitive load for other developers (I have to look what has changed in memoryobject.c) and b) may override other developers' conscious decisions.

[issue20767] Some python extensions can't be compiled with clang 3.4

2015-12-26 Thread Stefan Krah
Stefan Krah added the comment: Over at the llvm bug tracker this is marked as a release blocker: https://llvm.org/bugs/show_bug.cgi?id=18164 -- nosy: +skrah ___ Python tracker _

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2015-12-26 Thread 王杰
王杰 added the comment: Python 2.7 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mai