[issue26378] Typo in regex documentation

2016-02-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c272a1e53f5b by Benjamin Peterson in branch '2.7':
fix typo (closes #26378)
https://hg.python.org/cpython/rev/c272a1e53f5b

New changeset 69717fdd9d5a by Benjamin Peterson in branch '3.5':
fix typo (closes #26378)
https://hg.python.org/cpython/rev/69717fdd9d5a

New changeset 6f0d3ae9f1f3 by Benjamin Peterson in branch 'default':
merge 3.5 (#26378)
https://hg.python.org/cpython/rev/6f0d3ae9f1f3

--
nosy: +python-dev
resolution:  -> fixed
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



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

2016-02-17 Thread Eryk Sun

Eryk Sun added the comment:

%z works correctly in the new CRT that's used by 3.5:

Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25)
[MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strftime('%z', time.localtime(time.time()))
'-'
>>> time.strftime('%Z', time.localtime(time.time()))
'Coordinated Universal Time'

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 2.7

___
Python tracker 

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



[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Martin Panter

Martin Panter added the comment:

Thanks for the review; here is an updated patch.

If we just fall back the the default, it hides the fact that that there is a 
problem in the custom __repr__() method. Another option may be to both indicate 
there was an error, _and_ a fall back.

--
versions:  -Python 3.4
Added file: http://bugs.python.org/file41948/unraisable-continue.v4.patch

___
Python tracker 

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



[issue26380] Add an http method enum

2016-02-17 Thread Demian Brecht

Demian Brecht added the comment:

If nobody's opposed to the addition, I'll run through the unit tests and 
replace the hard coded strings.

--
keywords: +patch
Added file: http://bugs.python.org/file41947/issue26380.diff

___
Python tracker 

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



[issue26323] Add a assert_called() method for mock objects

2016-02-17 Thread Amit Saha

Amit Saha added the comment:

Added assert_call_once()

--
Added file: http://bugs.python.org/file41946/issue26323.patch

___
Python tracker 

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



[issue26380] Add an http method enum

2016-02-17 Thread Demian Brecht

New submission from Demian Brecht:

Super minor annoyance that I've had over multiple projects is seeing either 
hard coded strings being used (which is a bit of a no-no in terms of best 
practices) or each project defining its own set of constants for http methods. 
Why not just include a standard set in http as is done for status codes?

--
components: Library (Lib)
keywords: needs review
messages: 260431
nosy: demian.brecht, r.david.murray
priority: normal
severity: normal
status: open
title: Add an http method enum
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



[issue25939] _ssl.enum_certificates() fails with ERROR_ACCESS_DENIED if python.exe run with low integrity level

2016-02-17 Thread Benjamin Peterson

Benjamin Peterson added the comment:

The patch itself seems fine, so I committed that. It doesn't seem like how best 
to test this has been figured out, so leaving the issue open.

--
nosy: +benjamin.peterson
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue25939] _ssl.enum_certificates() fails with ERROR_ACCESS_DENIED if python.exe run with low integrity level

2016-02-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8ff4c1827499 by Benjamin Peterson in branch '3.5':
merge 3.4 (closes #25939)
https://hg.python.org/cpython/rev/8ff4c1827499

New changeset d6474257ef38 by Benjamin Peterson in branch 'default':
merge 3.5 (closes #25939)
https://hg.python.org/cpython/rev/d6474257ef38

--
nosy: +python-dev
resolution:  -> fixed
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



[issue26323] Add a assert_called() method for mock objects

2016-02-17 Thread Kushal Das

Kushal Das added the comment:

Go ahead and update the patch for assert_called_once and related tests.

--
nosy: +kushal.das

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-17 Thread Mathieu Dupuy

Mathieu Dupuy added the comment:

SilentGhost: the dictionary single dispatch thing attached (apply on top of the 
last, fromisoformat_new3).
I mind the performance penalty for date-only parsing users, but the code is 
definitively shorter and more elegant.

But we have a major problem: tests fails because what is used in tests is a 
subclass of datetime classes (Subclass[Date|Time|DateTime]) and thus, the 
dispatch break with a KeyError: class.SubDate[...]. I have no idea on how 
mitigate that. Do you ?

--

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-17 Thread Mathieu Dupuy

Mathieu Dupuy added the comment:

New patch with all your concerns addressed (martin.panther+ silentghost) EXCEPT 
the single dispatch dictionary thing.

--
Added file: http://bugs.python.org/file41945/fromisoformat_new3.patch

___
Python tracker 

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



[issue25770] expose name, args, and kwargs from methodcaller

2016-02-17 Thread Joe Jevnik

Joe Jevnik added the comment:

ping: any decision on this?

--

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-17 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +SilentGhost

___
Python tracker 

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



[issue26379] zlib decompress as_bytearray flag

2016-02-17 Thread Joe Jevnik

New submission from Joe Jevnik:

Adds a keyword only flag to zlib.decompress and zlib.Decompress.decompress 
which marks that the return type should be a bytearray instead of bytes.

The use case for this is reading compressed data into a mutable array to do 
further operations without requiring that the user copy the data first. Often, 
if a user is choosing to compress the data there might be a real cost to 
copying the uncompressed bytes into a mutable buffer.

The impetus for this change comes from a patch for Pandas 
(https://github.com/pydata/pandas/pull/12359). I have also worked on a similar 
feature for blosc, another popular compression library for python 
(https://github.com/Blosc/python-blosc/pull/107).

My hope is to fix the hacky solution presented in the pandas patch by 
supporting this feature directly in the compression libraries.

As a side note: this is my first time using the argument clinic and I love it. 
It was so simple to add this argument, thank you very much for developing such 
an amazing tool!

--
components: Extension Modules
files: zlib.patch
keywords: patch
messages: 260424
nosy: ll
priority: normal
severity: normal
status: open
title: zlib decompress as_bytearray flag
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41944/zlib.patch

___
Python tracker 

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



[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-17 Thread Mathieu Dupuy

Mathieu Dupuy added the comment:

up

--

___
Python tracker 

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



[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread Ned Deily

Ned Deily added the comment:

I'm not able to test it myself at the moment but you could also try ensuring 
your 2.7 build is with the most up-to-date ABI for your system:

./configure MACOSX_DEPLOYMENT_TARGET=10.9

2.7 builds do not set this automatically; 3.x builds do.

--
nosy: +ned.deily

___
Python tracker 

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



[issue24772] Smaller viewport shifts the "expand left menu" character into the text

2016-02-17 Thread karl

karl added the comment:

Where should I propose a patch to help resolve this issue?
A pointer to the code in the repo and I will do it.

--

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-17 Thread Martin Panter

Martin Panter added the comment:

Hi Aymeric Augustin. I am guessing you are the original author of the code and 
tests in Django for parsing datetime strings 
(https://bugs.python.org/issue15873#msg260342). If so, would you be happy for 
it to be incorporated into Python?

Mathieu: I left a couple quick review comments. (Normally I leave a message in 
the main bug thread, but I forgot the other time.)

Doc strings: Generally I think we keep the doc strings to a minimum, and leave 
the main documentation for the RST files. For the RST documentation, I would 
suggest including a rough summary of the format. E.g. for time.fromisoformat(), 
something like “The string should be in the RFC’s ‘full-time’ format, which 
looks like HH:MM:SS[.mm][Z|±HH:MM].”

Now that you added the two new regex strings, I can see that it might be useful 
to keep them together, rather than next to each class. Or you could even make 
them class attributes. No strong opinions either way; whatever works for you I 
think.

--
nosy: +aymeric.augustin

___
Python tracker 

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



[issue24911] Context manager of socket.socket is not documented

2016-02-17 Thread Martin Panter

Martin Panter added the comment:

Thanks for the reviews.

In this new patch, I modified two existing examples, but did not add any new 
example. Does that work for you Yury?

Also modified example code for the socketserver module.

Victor: IMO the “with conn” in the example is not overkill. It ensures the 
client connection socket is cleaned up, which is completely independent of the 
server listening socket s.

What exceptions can you get out of conn.close()? I can only think of unusual 
programming errors like EBADF. I would prefer to remove close() as being 
redundant with the context manager.

--
Added file: http://bugs.python.org/file41943/socket-context.v2.patch

___
Python tracker 

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread Martin Panter

Martin Panter added the comment:

Yes I understand bufsize (and universal_newlines) affects any of stdin, stdout 
and stderr that is set to PIPE.

--

___
Python tracker 

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



[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-02-17 Thread Mathieu Dupuy

Mathieu Dupuy added the comment:

Oh, my mistake ; I though send_error was to be used internally only, but it's 
actually a documented public method, that does not enforce to only use "actual" 
HTTP error code (I wonder what's the point of calling send_error with a 
non-error status code but that's beyond the point of this bug).

I will finish the work of SpaceOne : do a clean patch with just the 
modification (no rename of the variable nor comments) and write a test case.

--

___
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

2016-02-17 Thread Václav Dvořák

Changes by Václav Dvořák :


--
nosy: +Václav Dvořák

___
Python tracker 

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



[issue10963] "subprocess" can raise OSError (EPIPE) when communicating with short-lived processes

2016-02-17 Thread Martin Panter

Martin Panter added the comment:

FTR Issue 26372 has been opened about Serhiy’s bug with stdin.close() raising 
EPIPE.

--
nosy: +martin.panter

___
Python tracker 

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

bufsize impacts all streams, no only stdin, no?

--

___
Python tracker 

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread Martin Panter

Martin Panter added the comment:

Looking over the code for communicate(), I think setting bufsize=0 should not 
cause a performance problem in the original use case. Communicate() either 
calls stdin.write() once, or bypasses the file object and calls os.write(). 
Only if stdin, stdout, etc were used before communicate(), then there could be 
a problem (and subtly different behaviour).

I left some suggestions on the code review.

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue26376] Tkinter root window won't close if packed.

2016-02-17 Thread Ned Deily

Ned Deily added the comment:

Also note that installing ActiveTcl 8.6.x has no effect if the tkinter in use 
was linked with an 8.5 version of Tcl/Tk, as the one you are using apparently 
was. Make sure you have installed the latest version of ActiveTcl 8.5.x and try 
again.

--

___
Python tracker 

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



[issue26323] Add a assert_called() method for mock objects

2016-02-17 Thread Amit Saha

Amit Saha added the comment:

Thanks for your comments. I am +1 to those additions and would be happy to 
update the patch. Let me know if I should go ahead.

--

___
Python tracker 

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



[issue26378] Typo in regex documentation

2016-02-17 Thread David Rager

New submission from David Rager:

In the following sentence, "few" should probably be "fewer."

"Repetitions such as * are greedy; when repeating a RE, the matching engine 
will try to repeat it as many times as possible. If later portions of the 
pattern don’t match, the matching engine will then back up and try again with 
few repetitions."

https://docs.python.org/2/howto/regex.html

Thanks for such a great language and documentation!  My apologies if this isn't 
actually a typo.

--
assignee: docs@python
components: Documentation
messages: 260411
nosy: David Rager, docs@python
priority: normal
severity: normal
status: open
title: Typo in regex documentation
type: enhancement
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



[issue26323] Add a assert_called() method for mock objects

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

> I would be more consitent with the existing API:

Hum, I'm not sure that I was clear.

If we only add assert_called() (without assert_called_once()), users may use 
assert_called() to check if a function is called exactly once which would be a 
mistake.

--

___
Python tracker 

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



[issue26323] Add a assert_called() method for mock objects

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

If we go into this direction, I suggest to add *two* methods:

* assert_called(): called at least once
* assert_called_once(): called exactly once

I would be more consitent with the existing API:

https://docs.python.org/dev/library/unittest.mock.html#unittest.mock.Mock.assert_not_called

https://docs.python.org/dev/library/unittest.mock.html#unittest.mock.Mock.assert_called_with

https://docs.python.org/dev/library/unittest.mock.html#unittest.mock.Mock.assert_called_once_with

--
nosy: +haypo, rbcollins
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



[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-02-17 Thread Jonathan Goble

Jonathan Goble added the comment:

It would indeed be marked as a CPython implementation detail, and with no 
guarantee of backward compatibility. Others (well, at least one other) have 
suggested the same on python-ideas. So a simple note in the accompanying 
documentation would suffice.

--

___
Python tracker 

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



[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-17 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

> Thanks for testing! It wouldn't entirely surprise me if this turned out to be 
> an Apple bug somewhere.

I'm ran threading_hang.py on Mac OS X 10.10 Yosemite (darwin 14.5) on Python 
2.7 compiled in release mode.

After 28 iterations (~4 hours, 9 minutes per iteration), the bug was still not 
reproduced.

It looks like my OS X version is more recent than yours. You should run your 
test on various OS X versions to try to identify the bug.

Since it's likely a race condition, I would not be surprised that the bug is 
very hard to reproduce and may exist on other platforms, but may be less likely 
on other platforms or even less likely on some computers for various reasons...

--

___
Python tracker 

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



[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread Mark Dickinson

Mark Dickinson added the comment:

Thanks for testing! It wouldn't entirely surprise me if this turned out to be 
an Apple bug somewhere.

--

___
Python tracker 

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



[issue23570] Change "with subprocess.Popen():" (context manager) to ignore broken pipe error

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

"Should this issue be reopened in light of http://bugs.python.org/issue26372 
(Popen.communicate not ignoring BrokenPipeError)?"

I don't like reopen old issues. IMHO the two issues are different enough to 
justify two entries in the bug tracker.

--

___
Python tracker 

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #23570: Change "with subprocess.Popen():" (context manager) to 
ignore broken pipe error.

--

___
Python tracker 

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



[issue23570] Change "with subprocess.Popen():" (context manager) to ignore broken pipe error

2016-02-17 Thread Akira Li

Akira Li added the comment:

Should this issue be reopened in light of
http://bugs.python.org/issue26372 (Popen.communicate not ignoring
BrokenPipeError)?

If .close() shouldn't raise BrokenPipeError in .communicate() (and it
shouldn't) then it seems logical that .close() shouldn't raise
BrokenPipeError in .__exit__() too (and in other subprocess.Popen
methods that do not return until the child process is dead such as
subprocess.run())

--
nosy: +akira

___
Python tracker 

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



[issue26376] Tkinter root window won't close if packed.

2016-02-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What do you mean with "properly"? All looks good to me on Linux.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26377] Tkinter dialogs will not close if root window not packed.

2016-02-17 Thread Sam Yeager

New submission from Sam Yeager:

Using the following code, the messagebox will not close, leaving it on top of 
all other open windows:

from tkinter import *
rootWin = Tk()
messagebox.showinfo("Title", "foo")


If the root window contains a widget (Label, Entry, Button, etc.), the dialog 
can close.
Similar results have been obtained with filedialog. 

OS: Mac OS X 10.10.5
Python IDE: IDLE 3.4.4
tkinter.TkVersion: 8.5
tkinter.TclVersion: 8.5
ActiveTcl: 8.6.4

--
components: IDLE, Macintosh, Tkinter
messages: 260401
nosy: Sam Yeager, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Tkinter dialogs will not close if root window not packed.
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



[issue26376] Tkinter root window won't close if packed.

2016-02-17 Thread Sam Yeager

Changes by Sam Yeager :


Removed file: http://bugs.python.org/file41942/Screen Shot 2016-02-17 at 
10.00.21 AM.png

___
Python tracker 

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



[issue26376] Tkinter root window won't close if packed.

2016-02-17 Thread Sam Yeager

New submission from Sam Yeager:

Using the following code, the root window will not close properly when the 
close icon is clicked:

from tkinter import *
rootWin = Tk()
l = Label(rootWin, text="foo")
l.pack()

Similar issue occurs with Tk.grid().


OS: Mac OS X 10.10.5
Python IDE: IDLE 3.4.4
tkinter.TkVersion: 8.5
tkinter.TclVersion: 8.5
ActiveTcl: 8.6.4

--
components: IDLE, Macintosh, Tkinter
files: Screen Shot 2016-02-17 at 10.00.21 AM.png
messages: 260400
nosy: Sam Yeager, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Tkinter root window won't close if packed.
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file41942/Screen Shot 2016-02-17 at 10.00.21 
AM.png

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-17 Thread Anish Shah

Anish Shah added the comment:

Is this patch ready to merge?

--

___
Python tracker 

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



[issue26375] New versions of Python hangs on imaplib.IMAP4_SSL()

2016-02-17 Thread Michal Niklas

New submission from Michal Niklas:

I have application that import emails from client IMAP4 mailboxes on home.pl (I 
think it is popular provider in Poland). It worked very well up to Python 2.7.9 
but with version 2.7.10 it hangs on read() in imaplib.IMAP4_SSL().

On my Fedora 23 I have Python 3.4.3 and 2.7.10.

With Python 3.4.3 such code works as expected:

[mn] python3 -c "import imaplib; x=imaplib.IMAP4_SSL('imap.home.pl', 
993); print('finish', x)"
finish 

But with Python 2.7.10 it hangs. I pressed Ctrl-C after few seconds:

[mn] python -c "import imaplib; x=imaplib.IMAP4_SSL('imap.home.pl', 
993); print('finish', x)"
^CTraceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python2.7/imaplib.py", line 1166, in __init__
IMAP4.__init__(self, host, port)
  File "/usr/lib64/python2.7/imaplib.py", line 202, in __init__
typ, dat = self.capability()
  File "/usr/lib64/python2.7/imaplib.py", line 374, in capability
typ, dat = self._simple_command(name)
  File "/usr/lib64/python2.7/imaplib.py", line 1088, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/lib64/python2.7/imaplib.py", line 910, in _command_complete
typ, data = self._get_tagged_response(tag)
  File "/usr/lib64/python2.7/imaplib.py", line 1017, in 
_get_tagged_response
self._get_response()
  File "/usr/lib64/python2.7/imaplib.py", line 929, in _get_response
resp = self._get_line()
  File "/usr/lib64/python2.7/imaplib.py", line 1027, in _get_line
line = self.readline()
  File "/usr/lib64/python2.7/imaplib.py", line 1189, in readline
return self.file.readline()
  File "/usr/lib64/python2.7/socket.py", line 451, in readline
data = self._sock.recv(self._rbufsize)
  File "/usr/lib64/python2.7/ssl.py", line 734, in recv
return self.read(buflen)
  File "/usr/lib64/python2.7/ssl.py", line 621, in read
v = self._sslobj.read(len or 1024)
KeyboardInterrupt

You can also test it with docker to see that it worked with older versions of 
Python:

[mn] sudo docker run --rm -it python:2.7.9 python -c "import imaplib; 
x=imaplib.IMAP4_SSL('imap.home.pl', 993); print('finish', x)"
('finish', )

[mn] sudo docker run --rm -it python:2.7.10 python -c "import imaplib; 
x=imaplib.IMAP4_SSL('imap.home.pl', 993); print('finish', x)"
^CTraceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python2.7/imaplib.py", line 1166, in __init__
IMAP4.__init__(self, host, port)
  File "/usr/local/lib/python2.7/imaplib.py", line 202, in __init__
typ, dat = self.capability()
  File "/usr/local/lib/python2.7/imaplib.py", line 374, in capability
typ, dat = self._simple_command(name)
  File "/usr/local/lib/python2.7/imaplib.py", line 1088, in 
_simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/local/lib/python2.7/imaplib.py", line 910, in 
_command_complete
typ, data = self._get_tagged_response(tag)
  File "/usr/local/lib/python2.7/imaplib.py", line 1017, in 
_get_tagged_response
self._get_response()
  File "/usr/local/lib/python2.7/imaplib.py", line 929, in _get_response
resp = self._get_line()
  File "/usr/local/lib/python2.7/imaplib.py", line 1027, in _get_line
line = self.readline()
  File "/usr/local/lib/python2.7/imaplib.py", line 1189, in readline
return self.file.readline()
  File "/usr/local/lib/python2.7/socket.py", line 451, in readline
data = self._sock.recv(self._rbufsize)
  File "/usr/local/lib/python2.7/ssl.py", line 734, in recv
return self.read(buflen)
  File "/usr/local/lib/python2.7/ssl.py", line 621, in read
v = self._sslobj.read(len or 1024)
KeyboardInterrupt

The same way I tested that it hangs with Python 3.4.4.

I think it is a bug because it hangs instead of raising an exception with 
helpful information.
Maybe it is caused by removing RC4 cipher from new versions of Python?

How can I workaround this problem?

--
messages: 260398
nosy: mniklas
priority: normal
severity: normal
status: open
title: New versions of Python hangs on imaplib.IMAP4_SSL()
type: behavior
versions: Python 2.7, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 

[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-02-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Regex bytecode is implementation detail. It was 16-bit in narrow builds, but 
was changed to at least 32-bit in bugfix releases. It can be changed to 64-bit 
or to pack an argument with an opcode in one word. The implementation can not 
use the bytecode at all, but use the tree instead.

--

___
Python tracker 

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



[issue26374] concurrent_futures Executor.map semantics better specified in docs

2016-02-17 Thread F.D. Sacerdoti

New submission from F.D. Sacerdoti:

Hello,

My colleague and I have both written parallel executors for the 
concurrent_futures module, and are having an argument, as described in the 
dialog below. To resolve, I would like to add "order of results is undefined" 
to disambiguate the docs for "map(func, *iterables, timeout=None)".

DISCUSSION

Q: Correct Semantics to return results out of order?
JH: No, breaks API as stated
Rebut: order is undefined, concurrent_futures specifies map() returns an 
iterator, where builtin map returns a list. 
Q: Does it break the spirit of the module?
A: No, I believe one of the best things about doing things async is the 
dataflow model: do the next thing as soon as its inputs are ready.
 Q: Should we hold up the caller in all cases when there are stragglers, i.e. 
elements that compute slower?
 A: No, the interface should allow both modes.

def james_map(exe, fn, *args):
  return iter( sorted( list( exe.map( fn, *args ) ) ) )

--
messages: 260396
nosy: F.D. Sacerdoti
priority: normal
severity: normal
status: open
title: concurrent_futures Executor.map semantics better specified in docs
type: enhancement
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



[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This may be a part of more general issue. Should repr() fail at all? Wouldn't 
be better to fall back to the default __repr__ instead? repr() is typically 
used for debugging. Failing repr() can be a part of larger __repr__, thus 
raising an exception in subobject's repr() leads to the loss of information 
about full object.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26373] asyncio: add support for async context manager on streams?

2016-02-17 Thread STINNER Victor

New submission from STINNER Victor:

While working on the issue #24911 (Context manager of socket.socket is not 
documented), I recalled that asyncio objects don't support context manager. 
With the PEP 492, it becomes possible to add support for async context manager 
for a few asyncio objects. I suggest to start with StreamWriter.

Usually, my rationale to decide which object should implement context manager 
is to check if the destructor can emit ResourceWarning.

In asyncio, ResourceWarning is now emitted by transport and event loop 
destructors:
https://docs.python.org/dev/library/asyncio-dev.html#close-transports-and-event-loops

--
components: asyncio
messages: 260394
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: add support for async context manager on streams?
type: enhancement
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



[issue24911] Context manager of socket.socket is not documented

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed the patch.

> It would also be cool if you can add a short code snippet somewhere:

The socket module has examples.

Why not modifying these examples to promote the context manager protocol?

Example:

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s
# use with to ensure that the socket is closed, especially on error
with s:
  s.bind((HOST, PORT))
  s.listen(1)
  conn, addr = s.accept()
  with conn:
print('Connected by', addr)
while True:
data = conn.recv(1024)
if not data: break
conn.sendall(data)
conn.close()


The second "with conn:" is maybe overkill. What do you think?

For a client connection, usually I prefer to explicitly close the socket (even 
if I use "with conn:") to get exception on my ".close()" line, instead of 
getting an exception from the context manager, which is harder to understand.

--
nosy: +haypo

___
Python tracker 

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +patch
Added file: http://bugs.python.org/file41941/broken_pipe_error.patch

___
Python tracker 

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

It looks like asyncio.subprocess has a similar issue in Process._feed_stdin, 
but I'm not sure that stdin.close() can trigger BrokenPipeError. Well, it 
wouldn't hurd to protect stdin.close() with a try/except BrokenPipeError too ;-)

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

> Explicitly setting bufsize=0 should be a decent workaround.

It kills performances, no?

--

___
Python tracker 

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



[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

> This isn't consistent with the behavior of communicate with a timeout

Right, it looks like BrokenPipeError on writing into stdin is ignored in some 
cases, but not in all cases.

Attached patch for Python 3.6 adds two try/except BrokenPipeError with two unit 
tests.

It looks like Python 2.7 has a similar bug: stdin.close() is not surrounded by 
try/except BrokenPipeError.

--
nosy: +haypo

___
Python tracker 

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



[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Deadlock in thread.join -> Deadlock in thread.join on Python 2.7/Mac OS 
X 10.9

___
Python tracker 

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



[issue26360] Deadlock in thread.join

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

"Each iteration takes around 60 seconds, and I typically get a deadlock within 
the first 5 iterations."

I ran a modified version of threading_hang.py (I added some debug print) a 
whole night: it's still running after 118 iterations.

Each iteration takes ~5 minutes, I'm using a debug build of Python 2.7 on Linux 
(Fedora 23).

--

___
Python tracker 

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



[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Martin Panter

Martin Panter added the comment:

Yes a review would help. Also, I suspect this will require a separate patch for 
Python 2. When I get a chance I will have another look at this and see if I am 
comfortable committing it.

--

___
Python tracker 

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



[issue26371] asynchat.async_chat and asyncore.dispatcher_with_send are not thread-safe

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

"I think we will upgrade that project to python3 soon and will probably use 
asyncio then."

Great :-) You may have a look at my https://pypi.python.org/pypi/sixer project, 
it may help :-)

--

___
Python tracker 

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



[issue26371] asynchat.async_chat and asyncore.dispatcher_with_send are not thread-safe

2016-02-17 Thread NGG

NGG added the comment:

"Why not using asyncio instead of having to rebuild your own implementation?"

The issue happened with python 2.7 and we don't want that project to depend on 
additional libraries.
I think we will upgrade that project to python3 soon and will probably use 
asyncio then.

--

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-17 Thread Mathieu Dupuy

Mathieu Dupuy added the comment:

Crap, I just checked spams today and almost all mails of the reviewboard landed 
in spams ! So I made a new patch addressing all concerns:

* regex moved closer to where they're used
* regex globals start with an _
* case insensitive regex + handling(already handled in the previous revision)
* correct rounding + case suggested by Martin added as a test case
* more precise docstrings specifying that only a subset of ISO 8601 is accepted

bonus:
* useless non-capturing groups removed in regex, thus shorter and simpler

I still have a doubt though about the place I moved the regex. Tell me.

--
Added file: http://bugs.python.org/file41940/fromisoformat_new2.patch

___
Python tracker 

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



[issue26371] asynchat.async_chat and asyncore.dispatcher_with_send are not thread-safe

2016-02-17 Thread STINNER Victor

STINNER Victor added the comment:

"If this usage is not supported (...)"

You can use threads, but access concurrently asyncore/asynchat from different 
threads. You have to build a communicate channel between your threads using 
thread-safe primitive like queue.Queue. asyncio has a builtin support for that: 
loop.call_soon_threadsafe().

Why not using asyncio instead of having to rebuild your own implementation?

--

___
Python tracker 

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



[issue26371] asynchat.async_chat and asyncore.dispatcher_with_send are not thread-safe

2016-02-17 Thread NGG

NGG added the comment:

If I want to write a TCP client which communicates back and forth with the 
server (both parties can send messages anytime) then it would be really easy to 
use it the following way:
Start a background thread with asyncore.loop(), and you can send messages 
easily, and handle_read() will be called automatically whenever data is 
received.
If this usage is not supported and I understand correctly then I can only send 
messages before starting the loop or callbacks from the loop (handle_accept, 
handle_read, etc).
This seems to be a much more difficult and error-prone way (at least for 
pre-Future python versions)

--

___
Python tracker 

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



[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Florian Bruhin

Florian Bruhin added the comment:

I just got bitten by this again - is anything holding this back from being 
merged (other than lack of review-manpower)?

--

___
Python tracker 

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