[issue20167] Exception on IDLE closing

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> In any case, the traceback makes no sense. Before
> "self.color_breakpoint_text()" in __init__ are 3 "self.text.bind"
> statements.  So self.text = None seems implausible.

The code runs up to self.text.update() in restore_file_breaks() and runs 
further only after windows closing. At this time self.text already is None.

--

___
Python tracker 

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



[issue20167] Exception on IDLE closing

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Changing update() to update_idletasks() fixes the issue. But we should 
investigate why all works on 3.5 and is there downside of this change.

--

___
Python tracker 

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



[issue22493] Deprecate the use of flags not at the start of regular expression

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> That sounds a bit random. It wouldn't totally address the discrepancy with 
> regex, would it?

No, it will not totally address the discrepancy with regex, but at least it 
will allow as to change the behavior of flags in subpatterns. And we always can 
convert a pattern to a subpattern (surround by "(?:" and ")").

For now Python re module is only one regular expression implementation in which 
flags in the middle of the expression affect all expression. [1]

[1] http://www.regular-expressions.info/modifiers.html

--

___
Python tracker 

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



[issue22580] PyUnicode_Tailmatch documentation does not match signature

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

> It looks rather as a bug in C code. There is no need to return Py_ssize_t 
> instead of int.

Oh yes, you're right. A Py_ssize_t to return -1, 0 or 1 is overkill :-)

But PyUnicode_Tailmatch() is now part of the stable ABI, the inefficient return 
type is not a bug import enough to break the ABI in Python 3.5.

In Python 2.7, I see for example that the function is implemented with 
tailmatch() which returns an int, and PyUnicode_Tailmatch() casts it to 
Py_ssize_t.

--

___
Python tracker 

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



[issue22594] Add a link to the regex module in re documentation

2014-10-10 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The regex module is purposed as a replacement of standard re module. Of course 
we fix re bugs, but for now regex is more bugfree. Even after fixing all open 
re bugs, regex will remain more featured. It would be good to add a link to 
regex in re documentation (as there are links to other GUI libraries in Tkinter 
documentation).

--
assignee: docs@python
components: Documentation, Regular Expressions
keywords: easy
messages: 228961
nosy: docs@python, ezio.melotti, mrabarnett, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Add a link to the regex module in re documentation
type: enhancement
versions: Python 2.7, 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



[issue1519638] Unmatched Group issue - workaround

2014-10-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue22584] Get rid of SRE character tables

2014-10-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue22595] F5 shortcut key not working in IDLE for OSX

2014-10-10 Thread Mc128k

New submission from Mc128k:

Hi
I am using the latest version of python and IDLE, and when I edit a file and I 
press the key F5 it runs fine in the other window, while if I do it inside the 
IDLE command line it just prints the character  (which cannot be seen in the 
browser here). Using the menu to run works fine.

--
components: IDLE
files: Screenshot 2014-10-10 09.56.46.png
messages: 228962
nosy: mc128k
priority: normal
severity: normal
status: open
title: F5 shortcut key not working in IDLE for OSX
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file36859/Screenshot 2014-10-10 09.56.46.png

___
Python tracker 

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



[issue22595] F5 shortcut key not working in IDLE for OSX

2014-10-10 Thread Mc128k

Mc128k added the comment:

I'm sorry, the menu confused me. the command line has no such menu, it was 
showing the editor menu with the IDLE window on top. False alarm.

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

___
Python tracker 

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



[issue19380] Optimize parsing of regular expressions

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1adeac2a8714 by Serhiy Storchaka in branch 'default':
Issue #19380: Optimized parsing of regular expressions.
https://hg.python.org/cpython/rev/1adeac2a8714

--
nosy: +python-dev

___
Python tracker 

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



[issue22584] Get rid of SRE character tables

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 07b7b587837f by Serhiy Storchaka in branch 'default':
Issue #22584: Got rid of character tables in _sre.c and use standard macros
https://hg.python.org/cpython/rev/07b7b587837f

--
nosy: +python-dev

___
Python tracker 

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



[issue1519638] Unmatched Group issue - workaround

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd2f1ea04025 by Serhiy Storchaka in branch 'default':
Issue 1519638: Now unmatched groups are replaced with empty strings in re.sub()
https://hg.python.org/cpython/rev/bd2f1ea04025

--
nosy: +python-dev

___
Python tracker 

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



[issue22588] memory corrupted in test_capi refleaks test

2014-10-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

That was really fast Victor!

I confirm that the '-R 23:23' refleak test does not crash any more here after 
changeset 5d87a6b38422.

--

___
Python tracker 

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



[issue22588] memory corrupted in test_capi refleaks test

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

> That was really fast Victor!

I modified test_capi to only run one testcase, and I modified the testcase 
which caused the issue to run a subset of tests. By dichotomy, I found that 
only one function caused the fatal error.

Does anyone know how to automatize the dichotomy process? Maybe I should open a 
new issue for this?

It's very boring to disable tests by modifying the source code.

It would help a lot to identify memory leaks, crash, reference leak, resource 
leak, etc.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue1519638] Unmatched Group issue - workaround

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Antoine.

--
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



[issue19380] Optimize parsing of regular expressions

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your reviews Yury, Josh, and Antoine.

--
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



[issue22584] Get rid of SRE character tables

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Antoine.

--
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



[issue22578] Add additional attributes to re.error

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Synchronized with the tip after issue19380 changes.

--
Added file: http://bugs.python.org/file36860/re_error_attrs4.patch

___
Python tracker 

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



[issue1703178] link_objects in setup.cfg crashes build

2014-10-10 Thread Valerie Lambert

Valerie Lambert added the comment:

Here is a simple one-line-fix patch with a test. 

Except for the libraries option, other options separate using ':'. The 
documentation didn't seem to say much, so I wasn't sure if link_objects should 
be consistent with that or if it should follow libraries's example and instead 
allow spaces and commas for separation. This patch uses ensure_string_list as 
suggested, but let me know if using .split(os.pathsep) is a better idea.

--
keywords: +patch
nosy: +lambertv
Added file: http://bugs.python.org/file36861/build_ext.diff

___
Python tracker 

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



[issue22591] Drop support of MS-DOS

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

I hope that "MS_WINDOWS" is also defined when Python is compiled by the Borland 
C compiler or OpenWatcom. IMO if it's not the case, it's a bug and it should be 
fixed.

It means that my patch drop_msdos_support.patch only drops support for the 
DJGPP compiler in fact. DJGPP is (was) the MS-DOS port of GCC.

So, what do you think of drop_msdos_support.patch? Is it ok for Python 3.5?

--

___
Python tracker 

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



[issue22591] Drop support of MS-DOS

2014-10-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yes!

--

___
Python tracker 

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



[issue22591] Drop support of MS-DOS

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a1605d2508af by Victor Stinner in branch 'default':
Issue #22591: Drop support of MS-DOS
https://hg.python.org/cpython/rev/a1605d2508af

--
nosy: +python-dev

___
Python tracker 

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



[issue22591] Drop support of MS-DOS (DJGPP compiler)

2014-10-10 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed
title: Drop support of MS-DOS -> Drop support of MS-DOS (DJGPP compiler)

___
Python tracker 

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



[issue22596] support.transient_internet() doesn't catch connection refused errors

2014-10-10 Thread Berker Peksag

New submission from Berker Peksag:

This issue is similar to issue 22289.

==
ERROR: test_ftp (test.test_urllib2net.OtherNetworkTests) 
(url='ftp://ftp.debian.org/debian/README')
--
Traceback (most recent call last):
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1399, 
in ftp_open
fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1445, 
in connect_ftp
dirs, timeout)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2243, 
in __init__
self.init()
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2249, 
in init
self.ftp.connect(self.host, self.port, self.timeout)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/ftplib.py", line 153, in connect
source_address=self.source_address)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 655, in 
create_connection
raise err
  File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 646, in 
create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 
226, in _test_urls
f = urlopen(url, req, TIMEOUT)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 
33, in wrapped
return _retry_thrice(func, exc, *args, **kwargs)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 
29, in _retry_thrice
raise last_exc
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 
23, in _retry_thrice
return func(*args, **kwargs)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 463, in 
open
response = self._open(req, data)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 481, in 
_open
'_open', req)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 441, in 
_call_chain
result = func(*args)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1417, 
in ftp_open
raise exc.with_traceback(sys.exc_info()[2])
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1399, 
in ftp_open
fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1445, 
in connect_ftp
dirs, timeout)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2243, 
in __init__
self.init()
  File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2249, 
in init
self.ftp.connect(self.host, self.port, self.timeout)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/ftplib.py", line 153, in connect
source_address=self.source_address)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 655, in 
create_connection
raise err
  File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 646, in 
create_connection
sock.connect(sa)
urllib.error.URLError: 

http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/5026/steps/test/logs/stdio

--
components: Tests
files: connection-refused.diff
keywords: patch
messages: 228977
nosy: berker.peksag, orsenthil
priority: normal
severity: normal
stage: patch review
status: open
title: support.transient_internet() doesn't catch connection refused errors
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36862/connection-refused.diff

___
Python tracker 

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



[issue22597] printf-style formatting allows mixing keyed and keyless specifiers

2014-10-10 Thread Jakub Wilk

New submission from Jakub Wilk:

>>> '%(eggs)s %s' % {'eggs': 'ham'}
Traceback (most recent call last):
  File "", line 1, in 
TypeError: not enough arguments for format string

>>> '%s %(eggs)s' % {'eggs': 'ham'}
"{'eggs': 'ham'} ham"

I would expect a raised exception also in the latter case.

--
components: Library (Lib)
messages: 228978
nosy: jwilk
priority: normal
severity: normal
status: open
title: printf-style formatting allows mixing keyed and keyless specifiers
type: behavior

___
Python tracker 

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



[issue22598] IMAP4 UTF-7 support

2014-10-10 Thread Jesús Cea Avión

New submission from Jesús Cea Avión:

Looks like there is consensus to add "mUTF-7" or "imap4 UTF-7" to the codec 
module for Python 3.5. Details in https://mail.python.org/pipermail/python- 
dev/2014-October/136601.html

--
assignee: jcea
messages: 228979
nosy: jcea
priority: normal
severity: normal
status: open
title: IMAP4 UTF-7 support
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue5305] imaplib should support international mailbox names

2014-10-10 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

First step is to provide mUTF-7 in Python 3.5. Then we can try to update 
imaplib. I am specially worried about the points cfraire raises in 
http://bugs.python.org/issue5305#msg151859. Lets see.

--
dependencies: +IMAP4 UTF-7 support

___
Python tracker 

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



[issue22564] ssl: post-commit review of the new memory BIO API

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 54402b25f0b9 by Victor Stinner in branch '3.4':
Issue #22564: ssl doc: fix typos
https://hg.python.org/cpython/rev/54402b25f0b9

New changeset 61e52fda1006 by Victor Stinner in branch '3.4':
Issue #22564: ssl doc: document read(), write(), pending, server_side and
https://hg.python.org/cpython/rev/61e52fda1006

New changeset 63386eda0cb7 by Victor Stinner in branch '3.4':
Issue #22564: ssl doc: use "class" marker to document the SSLSocket class
https://hg.python.org/cpython/rev/63386eda0cb7

New changeset 8338ae599931 by Victor Stinner in branch '3.4':
Issue #22564: ssl doc: mention how SSLSocket are usually created
https://hg.python.org/cpython/rev/8338ae599931

--
nosy: +python-dev

___
Python tracker 

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



[issue22597] printf-style formatting allows mixing keyed and keyless specifiers

2014-10-10 Thread Eric V. Smith

Eric V. Smith added the comment:

This is a duplicate of issue 1467929.

--
nosy: +eric.smith
resolution:  -> duplicate
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



[issue22564] ssl: post-commit review of the new memory BIO API

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 61fbd3d5c307 by Victor Stinner in branch '3.4':
Issue #22564: ssl doc: mention asyncio in the non-blocking section
https://hg.python.org/cpython/rev/61fbd3d5c307

New changeset 11ad670ca663 by Victor Stinner in branch 'default':
Issue #22564: ssl doc: reorganize and reindent documentation of SSLObject and
https://hg.python.org/cpython/rev/11ad670ca663

New changeset 28fcf6c01bd9 by Victor Stinner in branch 'default':
Issue #22564: ssl doc, add more links to the non-blocking section
https://hg.python.org/cpython/rev/28fcf6c01bd9

New changeset 5f773540e2ef by Victor Stinner in branch 'default':
Issue #22564: cleanup SSLObject doc
https://hg.python.org/cpython/rev/5f773540e2ef

--

___
Python tracker 

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



[issue1467929] %-formatting and dicts

2014-10-10 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue22564] ssl: post-commit review of the new memory BIO API

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I think I addressed most of my remarks and I consider the issue as done.

> For total cleanness maybe the constructor should raise a TypeError if 
> server_hostname is passes as a bytes.

Please open a new issue to address this point.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue21456] skip 2 tests in test_urllib2net.py if _ssl module not present

2014-10-10 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Remi.

--
assignee:  -> berker.peksag
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.4

___
Python tracker 

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



[issue21456] skip 2 tests in test_urllib2net.py if _ssl module not present

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ac55331c1df6 by Berker Peksag in branch '3.4':
Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not present.
https://hg.python.org/cpython/rev/ac55331c1df6

New changeset 470ea66f5bee by Berker Peksag in branch 'default':
Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not present.
https://hg.python.org/cpython/rev/470ea66f5bee

--
nosy: +python-dev

___
Python tracker 

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



[issue22428] asyncio: KeyboardInterrupt inside a coroutine causes AttributeError

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

> => IMO it's an issue in the traceback module. It may catch the AttributeError 
> on the call to linecache.getline().

I created the issue #22599 for this bug.

--

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-10 Thread STINNER Victor

New submission from STINNER Victor:

Attached destructortest.py script comes the issue #22480. It calls 
traceback.print_exception() at exit. The problem is that the call occurs late 
during Python finalization. The object was stored in the namespace of the main 
module. Currently, Python deletes builtin functions and then deletes modules 
(in a random order?).

Since the traceback module is used to display errors, it's annoying to get 
errors in the traceback module :-) I see two options to fix the specific issue 
of destructortest.py:

* Ignore exceptions while calling linecache
* Detect Python finalization and don't try to use the linecache module in this 
case

Attached patch implements the second option. I'm not sure that it's the best 
one. It includes an unit test.

Depending on the option, we can fix the issue only in Python 3.5, or fix Python 
2.7, 3.4 and 3.5.

Current output:
---
Traceback (most recent call last):
Exception ignored in: >
Traceback (most recent call last):
  File "destructortest.py", line 15, in __del__
  File "/home/haypo/prog/python/default/Lib/traceback.py", line 169, in 
print_exception
  File "/home/haypo/prog/python/default/Lib/traceback.py", line 153, in 
_format_exception_iter
  File "/home/haypo/prog/python/default/Lib/traceback.py", line 18, in 
_format_list_iter
  File "/home/haypo/prog/python/default/Lib/traceback.py", line 65, in 
_extract_tb_or_stack_iter
  File "/home/haypo/prog/python/default/Lib/linecache.py", line 15, in getline
  File "/home/haypo/prog/python/default/Lib/linecache.py", line 41, in getlines
  File "/home/haypo/prog/python/default/Lib/linecache.py", line 126, in 
updatecache
  File "/home/haypo/prog/python/default/Lib/tokenize.py", line 438, in open
AttributeError: module 'builtins' has no attribute 'open'
---

Expected output:
---
Traceback (most recent call last):
  File "destructortest.py", line 7, in __init__
ZeroDivisionError: division by zero
---

--
components: Library (Lib)
files: destructortest.py
messages: 228986
nosy: haypo
priority: normal
severity: normal
status: open
title: traceback: errors in the linecache module at exit
versions: Python 3.5
Added file: http://bugs.python.org/file36863/destructortest.py

___
Python tracker 

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



[issue22480] SystemExit out of run_until_complete causes AttributeError when using python3 -m

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

I created a more specific issue for destructortest.py: issue #22599. It's not 
directly related to asyncio.

--

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

Errors in the traceback module (caused by linecache) are common when working on 
the asyncio module in debug mode. The asyncio tries to log exceptions at exit 
to help the debug to track bugs. It uses the garbage collector and destructors 
on objects. Example of debug tool:
https://docs.python.org/dev/library/asyncio-dev.html#detect-exceptions-never-consumed

See for examples issues #22428 and #22480.

--

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

There is no patch.

--
nosy: +pitrou

___
Python tracker 

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



[issue22600] In Multiprocessing Queue() doesn't work with list : __.put(list) != __.get()

2014-10-10 Thread CALMET

New submission from CALMET:

Hello,
I have to find the right order of a list, for example
try = [0,1,2,3,4,5,6,7,8,9]
try = [0,1,2,3,4,5,6,7,9,8]
try = [0,1,2,3,4,5,6,8,7,9]
and so on... in this example there are factorial(10) = 3,6 million possible 
order to test.
The results with be all the list  'try'  that match with the test.

To go faster
- I use mutiproceesiing
- I define   rightorder = Queue() 
- I define a function test   with a line  rightorder.put(try)
- I wait for all the processes are finished  p.join()
- Then I read all the results in the main programm   rightorder.get()

The problem is that on exactly the same example
- the rightorder.put() found by the process are always good
- but the rightorder.get() in the main programm can be different (randomly).

I first believed that when 2 processes call the function  rightorder.put(try)  
at the same time, the lists ares mixed together in the Queue().

But even when I force cpu_count() to 1 (mono process) I still have the problem.

To solve the problem I converted the list try=[2,3,0,4,2,9,7,8,1,5]
in a string try2="2304297815"
and since now  rightorder.put(try)  and  rightorder.get()  always give the same 
results.

So I suppose that in multiprocessing with a Queue() rightorder.put(try)  works 
if try is a number or a string
but doesn't works if try is a list.

--
files: BisesAmouRmulti-debug.py
messages: 228993
nosy: AlainCALMET
priority: normal
severity: normal
status: open
title: In Multiprocessing Queue() doesn't work with list : __.put(list) != 
__.get()
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file36865/BisesAmouRmulti-debug.py

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

> There is no patch.

Oh no :-( I revert all my local changes and I forgot to produce the patch... My 
change added a new sys._is_finalizing() function which exposes the private C 
variable "_Py_Finalizing".

Well, here is a patch which implements the first option (ignore linecache 
errors).

--
keywords: +patch
Added file: 
http://bugs.python.org/file36864/traceback_ignore_linecache_error.patch

___
Python tracker 

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



[issue22601] asyncio: loop.run_forever() should consume exception of the temporary task

2014-10-10 Thread STINNER Victor

New submission from STINNER Victor:

BaseEventLoop.run_forever() creates a temporary task when it gets a coroutine 
object. If the coroutine raises a base exception, it is stored in the temporary 
task (task.set_exception(exc)). run_forever() doesn't catch the exception, 
which is the expected behaviour.

The problem is that the temporary task still holds the exception, whereas the 
caller doesn't have access to this temporary task object. As a result, a 
warning is logger.

I propose to simply drop the exception from the task object (consume it). The 
call will get it anyway, it's not catched.

Attached patch implements this idea with a unit test.

--
components: asyncio
files: run_forever.patch
keywords: patch
messages: 228994
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: loop.run_forever() should consume exception of the temporary 
task
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36866/run_forever.patch

___
Python tracker 

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



[issue22428] asyncio: KeyboardInterrupt inside a coroutine causes AttributeError

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

> If the coroutine raises an exception which doesn't inherit from Exception 
> (but inherits from BaseException), run_until_complete() doesn't consume the 
> exception from the temporary task object

I created the issue #22601 for this bug.

--

___
Python tracker 

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



[issue22602] UTF-7 codec decodes ill-formed sequences starting with "+"

2014-10-10 Thread Jakub Wilk

New submission from Jakub Wilk:

RFC 2152 reads:

  A "+" character followed immediately by any character other than
  members of set B or "-" is an ill-formed sequence.

"@" is not a member of B, so I would expect this to raise UnicodeDecodeError:

>>> b'+@'.decode('UTF-7')
'@'

--
components: Library (Lib)
messages: 228996
nosy: jwilk
priority: normal
severity: normal
status: open
title: UTF-7 codec decodes ill-formed sequences starting with "+"
type: behavior

___
Python tracker 

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



[issue22597] printf-style formatting allows mixing keyed and keyless specifiers

2014-10-10 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2014-10-10 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue22587] os.path.abspath(None) behavior is inconsistent between platforms

2014-10-10 Thread Martin Panter

Martin Panter added the comment:

I always assumed that None was a unwise value to pass to the “os.path” 
functions. Indeed, at the top of the documentation page it says they only 
accept bytes or (text) string parameters. Although returning a consistent error 
might be a sensible addition.

--
nosy: +vadmium

___
Python tracker 

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



[issue22601] asyncio: loop.run_forever() should consume exception of the temporary task

2014-10-10 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-10 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue19421] FileIO destructor imports indirectly the io module at exit

2014-10-10 Thread Martin Panter

Martin Panter added the comment:

For the record, the python-dev thread about blocking imports is at 
. It 
sounded like the conclusion was that there shouldn’t be a problem importing a 
module at finalization.

I am investigating Issue 21049, and finding sys.meta_path is set to None at 
finalization, which is not handled well by the import code.

--
nosy: +vadmium

___
Python tracker 

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



[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-10-10 Thread Matej Cepl

Matej Cepl added the comment:

> Regardless of whether we add this to 2.7 or not, it should be an entirely 
> separate class. I personally feel this isn't a bug fix but a feature addition 
> for 2.7 so I'm -0.5 on adding it there. It's also not a security backport so 
> it doesn't fit into PEP 466.

Could we keep the 2.7 question on the side? I don't care about that that much 
as I would like to have this finally in 3.*.

What should I do now?

--

___
Python tracker 

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



[issue22603] Fix a typo in the contextlib docs

2014-10-10 Thread Francisco Fernández Castaño

New submission from Francisco Fernández Castaño:

>From the code example at 
>https://docs.python.org/3/library/contextlib.html#contextlib.ContextDecorator

"logging.info('Entering: {}'.format(name))
NameError: name 'name' is not defined"

name is referenced instead of self.name

--
assignee: docs@python
components: Documentation
files: doctypo.patch
keywords: patch
messages: 229000
nosy: Francisco.Fernández.Castaño, docs@python
priority: normal
severity: normal
status: open
title: Fix a typo in the contextlib docs
type: crash
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36867/doctypo.patch

___
Python tracker 

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



[issue22602] UTF-7 codec decodes ill-formed sequences starting with "+"

2014-10-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Interpreter Core, Unicode -Library (Lib)
nosy: +ezio.melotti, haypo, lemburg, loewis, serhiy.storchaka
stage:  -> needs patch
versions: +Python 2.7, 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



[issue22598] IMAP4 UTF-7 support

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please add a link to RFC?

--
nosy: +serhiy.storchaka
stage:  -> needs patch

___
Python tracker 

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



[issue21049] Warning at interpreter exit triggers flood of “ImportWarning: sys.meta_path is empty”

2014-10-10 Thread Brett Cannon

Brett Cannon added the comment:

This has now been fixed in https://hg.python.org/cpython/rev/d9f71bc6d897 . 
Thanks to everyone who helped with the bug report!

--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-10-10 Thread Brett Cannon

Brett Cannon added the comment:

Fixed in https://hg.python.org/cpython/rev/d9f71bc6d897

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Alternative solution of this issue would be to use "from builtins import open 
as _open" instead of "import builtins".

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d9f71bc6d897 by Brett Cannon in branch 'default':
Issue #21052: Don't raise ImportWarning for sys.meta_path or
https://hg.python.org/cpython/rev/d9f71bc6d897

--
nosy: +python-dev

___
Python tracker 

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



[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-10-10 Thread Ethan Furman

Ethan Furman added the comment:

Sample code:

class AutoEnum(enum.Enum):
"""
Automatically numbers enum members starting from 1.

Includes support for a custom docstring per member.
"""
__last_number__ = 0
def __new__(cls, *args):
"""
Ignores arguments (will be handled in __init__.
"""
value = cls.__last_number__ + 1
cls.__last_number__ = value
obj = object.__new__(cls)
obj._value_ = value
return obj
def __init__(self, *args):
"""
Can handle 0 or 1 argument; more requires a custom __init__.
0  = auto-number w/o docstring
1  = auto-number w/ docstring
2+ = needs custom __init__
"""
if len(args) == 1 and isinstance(args[0], str):
self.__doc__ = args[0]
elif args:
raise TypeError('%s not dealt with -- need custom __init__' % 
(args,))

class AddressSegment(AutoEnum):
misc = "not currently tracked"
ordinal = "N S E W NE NW SE SW"
secondary = "apt bldg floor etc"
street = "st ave blvd etc"

def huh(self):
return 'did I show up?'


The 'huh' function, shown above, does *not* show up in a dir of either AutoEnum 
nor AddressSegment, regardless of which class it is defined in -- this is 
because a directory of an Enum class is meant to show ['__class__', '__doc__', 
'__members__', '__module__'] + whatever Enum members have been defined.

However, a directory of an Enum member should show any normal methods* 
available on that member.  Currently, if 'huh' is defined in the final class it 
will show up, but if defined in a superclass it will not.

That is the bug.


* 'normal method' means any method not prefixed by any underscores.

--

___
Python tracker 

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



[issue22598] IMAP4 UTF-7 support

2014-10-10 Thread Raúl Cumplido

Changes by Raúl Cumplido :


--
nosy: +raulcd

___
Python tracker 

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



[issue22603] Fix a typo in the contextlib docs

2014-10-10 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +ncoghlan
stage:  -> commit review
type: crash -> enhancement

___
Python tracker 

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



[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-10-10 Thread Ram Rachum

Ram Rachum added the comment:

Ethan: I'm very confused by your example. `huh` isn't even a method, why would 
it be included? Or are you saying "if it was a method"? I'm really not sure 
what your example is adding over mine, given that it's 10 times longer and more 
complex. I'm not sure why you'd want to demonstrate the bug in a 50-line code 
sample that has non-trivial logic when it's demonstrable in a simple 5-line 
code sample.

--

___
Python tracker 

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



[issue22587] os.path.abspath(None) behavior is inconsistent between platforms

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It's because None quacks as empty string.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue1703178] link_objects in setup.cfg crashes build

2014-10-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Valerie, I cannot review this.  If Éric does not respond in a month or two, you 
might enquire on python-dev or core-mentorship lists.

--
stage: test needed -> patch review
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue1703178] link_objects in setup.cfg crashes build

2014-10-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-10-10 Thread Ethan Furman

Ethan Furman added the comment:

Yes, the 'huh' function would have to be in either AutoEnum or AddressSegment 
to be included in the dir of an AddressSegment member.

Here's a shorter example:

(this works)

class SuperEnum(Enum):
pass

class SubEnum(SuperEnum):
sample = 5
def visible(self):
return "saw me, right?"

'visible' in dir(SubEnum.sample)


(this does not work)

class SuperEnum(Enum):
def invisible(self):
return "but you didn't see me!"

class SubEnum(SuperEnum):
sample = 5

'invisible' in dir(SubEnum.sample)


Sorry for the noise.

Do please note that the dir where 'visible' showed up was on the Enum member, 
not the Enum class.

--

___
Python tracker 

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



[issue22604] assertion error in complex division

2014-10-10 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This only happens in debug mode:

>>> complex(0.0, 0.0) / complex(float('nan'), 0.0)
python: Objects/complexobject.c:98: _Py_c_quot: Assertion `b.imag != 0.0' 
failed.

In release mode, this gives:

>>> complex(0.0, 0.0) / complex(float('nan'), 0.0)
(nan+nanj)

(is it the right result?)

--
components: Interpreter Core
messages: 229011
nosy: eric.smith, lemburg, mark.dickinson, pitrou, stutzbach
priority: normal
severity: normal
status: open
title: assertion error in complex division
type: behavior
versions: Python 2.7, 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



[issue22604] assertion error in complex division

2014-10-10 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

See also the issue #19421.

--

___
Python tracker 

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



[issue22598] IMAP4 UTF-7 support

2014-10-10 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Unicode
nosy: +ezio.melotti, haypo

___
Python tracker 

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



[issue22598] Add mUTF-7 codec (UTF-7 modified for IMAP)

2014-10-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: IMAP4 UTF-7 support -> Add mUTF-7 codec (UTF-7 modified for IMAP)

___
Python tracker 

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



[issue22604] assertion error in complex division

2014-10-10 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue22557] Locale import is too slow

2014-10-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: Local import is too slow -> Locale import is too slow

___
Python tracker 

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



[issue22559] [backport] ssl.MemoryBIO

2014-10-10 Thread Alex Gaynor

Alex Gaynor added the comment:

Updated patch cherry-picks in some of the documentation updates that were 
pushed by Victor.

--
Added file: http://bugs.python.org/file36868/issue22559.diff

___
Python tracker 

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



[issue22557] Local import is too slow

2014-10-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The issue is local imports, not imports of the locale module :-)

--
title: Locale import is too slow -> Local import is too slow

___
Python tracker 

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



[issue22558] Missing hint to source code - complete

2014-10-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Messages and patches can be unlinked from an issue (and that action recorded in 
the history list) but not edited.  Proofread before clicking.

Originally, only a few module docs had a source code link where the source code 
was thought to be especially useful.  When these links were determined to be 
useful, more have gradually been added as some developer thought of it or as 
some user requested, as you did in #22528.  I don't know if any requests have 
been denied.  I also don't know if there is a written policy anywhere.  To me, 
it might be easier to link all python sources and be done with the issue.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue22604] assertion error in complex division

2014-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think it is the right result.

>>> 0.0 / float('nan')
nan

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19884] Importing readline produces erroneous output

2014-10-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue22575] bytearray documentation confuses string for unicode objects

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0c75819f1d86 by Terry Jan Reedy in branch '2.7':
Issue #22575: Revise bytearray entry for 2.7.
https://hg.python.org/cpython/rev/0c75819f1d86

--
nosy: +python-dev

___
Python tracker 

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



[issue22575] bytearray documentation confuses string for unicode objects

2014-10-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I changed the line to 
* If it is unicode, you must also give the encoding (and optionally, errors) 
parameters; bytearray() then converts the unicode to bytes using 
unicode.encode().

Thank you for the report, and for your work answering questions on SO

--
assignee: docs@python -> terry.reedy
nosy: +terry.reedy
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue22604] assertion error in complex division

2014-10-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a patch.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file36869/c_quot_nan.patch

___
Python tracker 

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



[issue11694] xdrlib raises ConversionError in inconsistent way

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9cee201388c9 by Petri Lehtinen in branch '2.7':
Issue #11694: Raise ConversionError in xdrlib as documented
https://hg.python.org/cpython/rev/9cee201388c9

New changeset 7ef6e5f53418 by Petri Lehtinen in branch '3.4':
Issue #11694: Raise ConversionError in xdrlib as documented
https://hg.python.org/cpython/rev/7ef6e5f53418

New changeset 8e3387f566f6 by Petri Lehtinen in branch 'default':
#11694: merge with 3.4
https://hg.python.org/cpython/rev/8e3387f566f6

--
nosy: +python-dev

___
Python tracker 

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



[issue11694] xdrlib raises ConversionError in inconsistent way

2014-10-10 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Applied, thanks!

--
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



[issue22588] memory corrupted in test_capi refleaks test

2014-10-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

With the attached patch (the patch does reintroduce the bug in 
'test_incref_decref_API' for testing purposes), it is possible to find the 
failing subtest rapidly:

Get the number of subtests (35 subsets):
$ export SUBTEST_RANGE="[]"
$ ./python -m test -m test__testcapi test_capi

Then run:
$ ./python -m test -m test__testcapi -R 23:23 test_capi

after modifying, each time, the range of subtests to execute, with:
$ export SUBTEST_RANGE="range(1,18)"# tests 1-17  result: fail
$ export SUBTEST_RANGE="range(1,9)" # test 1-8result: pass
$ export SUBTEST_RANGE="range(1,13)"# test 1-12   result: fail
$ export SUBTEST_RANGE="range(1,11)"# test 1-10   result: fail
$ export SUBTEST_RANGE="[9]"# so it must be test #9, check it now

The strong limitation with this solution is that the subTest context manager 
must now be enclosed in a 'try except unittest.SkipTest' clause and that the 
context manager is used more than 100 times in the test suite.

--

___
Python tracker 

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



[issue22588] memory corrupted in test_capi refleaks test

2014-10-10 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
keywords: +patch
Added file: http://bugs.python.org/file36870/subtest_in_range.diff

___
Python tracker 

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



[issue22605] memcpy(NULL, NULL, 0) in

2014-10-10 Thread Jakub Wilk

Changes by Jakub Wilk :


--
components: Library (Lib)
nosy: jwilk
priority: normal
severity: normal
status: open
title: memcpy(NULL, NULL, 0) in
versions: Python 3.5

___
Python tracker 

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



[issue22605] memcpy(NULL, NULL, 0) in array_new()

2014-10-10 Thread Jakub Wilk

Jakub Wilk added the comment:

The attached patch should fix the bug.

--
keywords: +patch
Added file: http://bugs.python.org/file36871/229023.patch

___
Python tracker 

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



[issue22605] memcpy(NULL, NULL, 0) in array_new()

2014-10-10 Thread Jakub Wilk

New submission from Jakub Wilk:

If you initialize array with another empty array, then this code runs:

memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize);

But self->ob_item and other->ob_item are NULL in such case.
Passing null pointer to memcpy() is undefined behavior even when length is 0.

--
title: memcpy(NULL, NULL, 0) in -> memcpy(NULL, NULL, 0) in array_new()

___
Python tracker 

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



[issue22604] assertion error in complex division

2014-10-10 Thread Mark Dickinson

Mark Dickinson added the comment:

Patch LGTM.

> (is it the right result?)

Difficult to tell :-). Complex arithmetic in general isn't well standardised.  
Annex G of the C standard is about as close I've seen.  But it doesn't look 
terribly wrong.

--

___
Python tracker 

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



[issue22587] os.path.abspath(None) behavior is inconsistent between platforms

2014-10-10 Thread Kevin Keating

Kevin Keating added the comment:

I agree that None is an unwise value to pass in.  Of the four different abspath 
implementations, though, one will treat None (or any falsey value) as an empty 
string, while the other three will raise an exception unless passed an actual 
str or bytes object.  I think the ideal solution would be to have abspath(None) 
raise a TypeError regardless of operating system, which would make it 
consistent with normcase (http://bugs.python.org/issue9018).  It's conceivable 
that some Windows-only code might rely on the current behavior of 
abspath(None), though.

--

___
Python tracker 

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



[issue22603] Fix a typo in the contextlib docs

2014-10-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee: docs@python -> terry.reedy
nosy: +terry.reedy
type: enhancement -> behavior
versions:  -Python 3.2, Python 3.3

___
Python tracker 

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



[issue22587] os.path.abspath(None) behavior is inconsistent between platforms

2014-10-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+1 for raising TypeError, but I think this should only be changed in 3.5, since 
we don't want to break code in a bugfix release.

--
nosy: +pitrou

___
Python tracker 

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2014-10-10 Thread Martin Taibr

Martin Taibr added the comment:

Same behavior on Windows 8.1. Possible workaround:

>>> from datetime import datetime
>>> from dateutil import tz
>>> datetime.now(tz.tzlocal()).strftime('%z')
'+0200'

--
nosy: +martin-t

___
Python tracker 

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



[issue22603] Fix a typo in the contextlib docs

2014-10-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b81443d9c64a by Terry Jan Reedy in branch '3.4':
Issue 22603: add missing 'self'.  Patch by Francisco Fernández Castaño.
https://hg.python.org/cpython/rev/b81443d9c64a

--
nosy: +python-dev

___
Python tracker 

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



[issue22588] memory corrupted in test_capi refleaks test

2014-10-10 Thread STINNER Victor

STINNER Victor added the comment:

Please open a new issue, this one is closed.

--

___
Python tracker 

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



[issue22603] Fix a typo in the contextlib docs

2014-10-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks. Should you be alphabetized in our ACKS file under Ca... or Fe...?

--
resolution:  -> fixed
stage: commit review -> resolved

___
Python tracker 

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



[issue15414] os.path.join behavior on Windows (ntpath.join) is unexpected and not well documented

2014-10-10 Thread Zachary Ware

Zachary Ware added the comment:

Dave, your patch is a significant improvement on the accuracy of the current 
doc, but the whole paragraph seems somewhat haphazard and confusing to me.  
Here's my own attempt to clean it up, though I'm not certain just how much 
improvement it is :)

--
nosy: +zach.ware
Added file: http://bugs.python.org/file36872/issue15414.diff

___
Python tracker 

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



[issue15414] os.path.join behavior on Windows (ntpath.join) is not well documented

2014-10-10 Thread Zachary Ware

Changes by Zachary Ware :


--
title: os.path.join behavior on Windows (ntpath.join) is unexpected and not 
well documented -> os.path.join behavior on Windows (ntpath.join) is not well 
documented

___
Python tracker 

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



[issue22603] Fix a typo in the contextlib docs

2014-10-10 Thread Francisco Fernández Castaño

Francisco Fernández Castaño added the comment:

Under Fernández it's ok.

--

___
Python tracker 

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



[issue15414] os.path.join behavior on Windows (ntpath.join) is not well documented

2014-10-10 Thread R. David Murray

R. David Murray added the comment:

I'd say it was definitely an improvement in terms of comprehensibility.

--

___
Python tracker 

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



  1   2   >