[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/69

[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.str

[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. -- vers

[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

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

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

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

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

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

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

[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

[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: ht

[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.pyt

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

[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/m

[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.de

[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 ___ _

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

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

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

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

[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

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

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

[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

[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. -- _

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

[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

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

[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.m

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

[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:/

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

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

[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. -- ___

[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 ___ _

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

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

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

[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 ___ ___ P

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

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

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

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

[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

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

[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

[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.S

[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 ___ __

[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

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
Changes by STINNER Victor : -- components: +asyncio nosy: +gvanrossum, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing

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

[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

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

2016-02-17 Thread Martin Panter
Martin Panter added the comment: Mathieu: What code are you suggesting to delete? The handling of NO_CONTENT etc? That could potentially break people’s code, and I don’t see the harm in leaving it as it is. I would prefer to either bless it in the documentation, or deprecate it if there is a

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread Martin Panter
Martin Panter added the comment: Seems a reasonable proposal to me. Originally the bufsize parameter defaulted to 0 so this wouldn’t have been such a problem. Explicitly setting bufsize=0 should be a decent workaround. -- nosy: +martin.panter stage: -> needs patch ___

[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 ___ _

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

[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

[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

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

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

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

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

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