[issue23575] MIPS64 needs ffi's n32.S

2015-05-26 Thread Frank Schaefer
Frank Schaefer added the comment: This patch alone is apparently not enough. When this is enabled, and python 2.7.10 is built with -mabi=n32, make test segfaults on test_ctypes. Using --with(out)-system-ffi does not make a difference. When I run the test by itself, it specifically fails at:

[issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open

2015-05-26 Thread Martin Panter
Martin Panter added the comment: I do not believe the change fixes anything on its own. It essentially just changed the error message to something even worse, and the added test case already passes without the change. I am posting a patch which cleans up the code and related tests. It also fix

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-li

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset a77214dbf1f3 by Steve Dower in branch '3.5': Issue #24293: Fixes installer colors to use system settings throughout. https://hg.python.org/cpython/rev/a77214dbf1f3 New changeset 37ed61b1234a by Steve Dower in branch 'default': Issue #24293: Fixes in

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Steve Dower
Steve Dower added the comment: Thanks, good catch. I'm not entirely sure how we ended up in this state, since the background is actually the system colour and the text is currently hardcoded, but I'll go through and make sure that the system colour indexes are used throughout. FWIW, it's just

[issue22758] Regression in Python 3.2 cookie parsing

2015-05-26 Thread Tim Graham
Tim Graham added the comment: Patch rebased again after cookie fix from #22931. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22758] Regression in Python 3.2 cookie parsing

2015-05-26 Thread Tim Graham
Changes by Tim Graham : Added file: http://bugs.python.org/file39512/secure-httponly-3.2-backport.diff ___ Python tracker ___ ___ Python-bugs-

[issue24292] wsgiref.simple_server.WSGIRequestHandler doesn't log request timeouts

2015-05-26 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23560] Group the docs of similar methods in stdtypes.rst

2015-05-26 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Mike Miller
New submission from Mike Miller: The new Windows installer displays itself with an HTML (or perhaps skinned) interface with hard-coded white background which does not adhere to the desktop GUI color scheme chosen by the user. Many times this is only an aesthetic problem, but it may cause the w

[issue23648] PEP 475 meta issue

2015-05-26 Thread STINNER Victor
Changes by STINNER Victor : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue23756] Tighten definition of bytes-like objects

2015-05-26 Thread Martin Panter
Changes by Martin Panter : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread Martin Panter
Martin Panter added the comment: How about this for What’s New: * The :meth:`str.startswith` and :meth:`str.endswith` methods no longer return ``True`` when finding the empty string and the indexes are completely out of range. See :issue:`24284`. Perhaps that is good enough, but if you wanted

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-26 Thread Martin Panter
Martin Panter added the comment: [UTF-8 error workaround] What kind of object is “stdout”? Plain Python socket objects don’t have a write() method. Perhaps “stdout” is meant to implement the BufferedIOBase.write() interface, which guarantees everything is written, even if it takes multiple ra

[issue23359] Speed-up set_lookkey()

2015-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file39510/new_set_timings.txt ___ Python tracker ___ ___ Python-bugs-list ma

[issue24292] wsgiref.simple_server.WSGIRequestHandler doesn't log request timeouts

2015-05-26 Thread Ned Deily
Changes by Ned Deily : -- nosy: +pje versions: +Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-26 Thread Ned Deily
Changes by Ned Deily : -- nosy: +pje versions: +Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Ned Deily
Ned Deily added the comment: Without diving into the details of your test program, I get the same results on a 64-bit Debian Python 2.7.9 as with a 64-bit OS X 2.7.10: c_uint32 TESTS: Class Name exponentnumber Signfloat binary repr IEEE754Flo

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: I don't actually know if the 5th option is possible. My strong requirement is that no matter what the child process does, the parent should still be able to continue using the loop. IMO it's better to leak a FD in the child than to close a resource owned by

[issue24292] wsgiref.simple_server.WSGIRequestHandler doesn't log request timeouts

2015-05-26 Thread Jonathan Kamens
New submission from Jonathan Kamens: http.BaseHTTPRequestHandler logs request timeouts. In handle_one_request(): except socket.timeout as e: #a read or a write timed out. Discard this connection self.log_error("Request timed out: %r", e) self.close_co

[issue24270] PEP 485 (math.isclose) implementation

2015-05-26 Thread Tal Einat
Tal Einat added the comment: Attached is a revised patch including changed due to the reviews by Berker and Yuri. The significant changes from the previous patch are: 1. The "rel_tol" and "abs_tol" parameters have been made keyword-only. 2. The tests have been extracted into a separate TestCa

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-26 Thread Jonathan Kamens
New submission from Jonathan Kamens: The _write method of wsgiref.handlers.SimpleHandler reads as follows: def _write(self,data): self.stdout.write(data) The problem here is that calling write() on a socket is not actually guaranteed to write all of the data in the buffer. If the l

[issue16500] Add an 'atfork' module

2015-05-26 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21998] asyncio: support fork

2015-05-26 Thread Martin Richard
Martin Richard added the comment: 015-05-26 20:40 GMT+02:00 Yury Selivanov : > > Yury Selivanov added the comment: > The only solution to safely fork a process is to fix loop.close() to > check if it's called from a forked process and to close the loop in > a safe way (to avoid breaking the mast

[issue23509] Speed up Counter operators

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps update __pos__ docstring? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue23509] Speed up Counter operators

2015-05-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg244128 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23509] Speed up Counter operators

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps correct __pos__ docstring? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Rony Batista
Rony Batista added the comment: Silly me, Heres the code. -- Added file: http://bugs.python.org/file39508/ctypesBug.py ___ Python tracker ___

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Ronald Oussoren
Ronald Oussoren added the comment: You forgot to actually attach the code. -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Rony Batista
New submission from Rony Batista: ctypes Structures with c_uint32 bitfields have strange behaviour on OS X. In the attached code when the field "number" is set, it changes the whole 32 bits, even thou its meant to be 23 bits. The behavior is unexpected in: OS X: Python 2.7.9 The behavior is a

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please help me with wording? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16991] Add OrderedDict written in C

2015-05-26 Thread Eric Snow
Eric Snow added the comment: > Eric I realize that O (1) deletion is hard, and don't see a good way > around it without changing the implementation ... I just think that the > preserving the current C layout may be forcing an even more complicated > solution than neccessary. I am nervous

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: > I would therefore, in the child after a fork, close the loop without > breaking the selector state (closing without unregister()'ing fds), unset > the default loop so get_event_loop() would create a new loop, then raise > RuntimeError. > > I can elaborate o

[issue21998] asyncio: support fork

2015-05-26 Thread Martin Richard
Martin Richard added the comment: Hi, My patch was a variation of haypo's patch. The goal was to duplicate the loop and its internal objects (loop and self pipes) without changing much to its state from the outside (keeping callbacks and active tasks). I wanted to be conservative with this patch

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: > That's really the problem of the code that calls fork(), not directly of > the event loop. There are some very solid patterns around that (I've > written several in the distant past, and Unix hasn't changed that much :-). Alright ;) I'll draft a patch sometim

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: That's really the problem of the code that calls fork(), not directly of the event loop. There are some very solid patterns around that (I've written several in the distant past, and Unix hasn't changed that much :-). On Tue, May 26, 2015 at 11:01 AM, Yury Sel

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: > I don't understand. If the fork fails nothing changes right? I guess I'm > missing some context or use case. Maybe I'm wrong about this. My line of thoughts is: a failed fork() call is a bug in the program. Now, the master process will continue operating a

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: I don't understand. If the fork fails nothing changes right? I guess I'm missing some context or use case. -- ___ Python tracker ___

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: > I was thinking only in the child. The parent should be able to continue to > use the loop as if the fork didn't happen, right? Yes, everything should be fine. I'll rephrase my question: do you think there is a way (and need) to at least throw a warning in t

[issue23509] Speed up Counter operators

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5780ee2c18e1 by Raymond Hettinger in branch 'default': Issue #23509: Speed up Counter operators https://hg.python.org/cpython/rev/5780ee2c18e1 -- nosy: +python-dev ___ Python tracker

[issue21998] asyncio: support fork

2015-05-26 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: I was thinking only in the child. The parent should be able to continue to use the loop as if the fork didn't happen, right? -- ___ Python tracker __

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: > I think only (3) is reasonable -- raise RuntimeError. Just to be clear -- do we want to raise a RuntimeError in the parent, in the child, or both processes? -- ___ Python tracker

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: I think only (3) is reasonable -- raise RuntimeError. There are too many use cases to consider and the behavior of the selectors seems to vary as well. Apps should ideally not fork with an event loop open; the only reasonable thing to do after a fork with an

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: > How do other event loops handle fork? Twisted, Tornado, libuv, libev, libevent, etc. It looks like using fork() while an event loop is running isn't recommended in any of the above. If I understand the code correctly, libev & gevent reinitialize loops in th

[issue24289] can't start Python3 due to ImportError of copy_reg

2015-05-26 Thread Zachary Ware
Changes by Zachary Ware : -- components: -2to3 (2.x to 3.x conversion tool) ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2015-05-26 Thread Dimitri John Ledkov
Dimitri John Ledkov added the comment: Note that things have changed in this space, since the issue was opened in 2007. -- ___ Python tracker ___ _

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2015-05-26 Thread Dimitri John Ledkov
Dimitri John Ledkov added the comment: Why not change them to parse os-release files as defined by http://www.freedesktop.org/software/systemd/man/os-release.html A lot of things use these functions to check what one is running on, despite the problems, and do different things at install time

[issue24289] can't start Python3 due to ImportError of copy_reg

2015-05-26 Thread R. David Murray
R. David Murray added the comment: copyreg.py is part of the standard library, but you obviously have a file shadowing it in your site-packages. If this is a result of the pip upgrade, you should report this to the pip tracker. -- nosy: +r.david.murray resolution: -> third party stag

[issue24289] can't start Python3 due to ImportError of copy_reg

2015-05-26 Thread Mike Basca
New submission from Mike Basca: Hello, I recently upgraded pip and pip3 and now I can't start python3. This is the Traceback I receive when I started python 3.4.3 (python2.7.10 is fine). localhost:PP4E Mike$ python3 Failed to import the site module Traceback (most recent call last): File "

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread R. David Murray
R. David Murray added the comment: Just in the what's new porting section, I think. The fact that there "should" be very little to no code that relies on this is why I'd like to see it fixed. The fact that the report was a theoretical one, and not one that broke code, is why I think we shoul

[issue24288] Include/opcode.h is modified during building

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: > Other solution is to change Tools/scripts/generate_opcode_h.py to generate a > file without trailing spaces. I like this option. I saw the whitespace, but I usually don't touch autogenerated files, so I naturally thought that someone has modified the toolin

[issue24270] PEP 485 (math.isclose) implementation

2015-05-26 Thread Tal Einat
Tal Einat added the comment: Regarding the tests, I now realize that most of them should be reused for testing cmath.isclose(), which means they'll have to be defined outside of test_math.MathTests. -- ___ Python tracker

[issue24270] PEP 485 (math.isclose) implementation

2015-05-26 Thread Tal Einat
Tal Einat added the comment: Significant questions brought up by Berker Peksağ in his review of the latest patch (thanks for the review!): 1. Should the tolerance parameters be keyword-only? Berker suggests that they should be. I agree. 2. Should the math.isclose() tests be split into a separ

[issue24281] String formatting: incorrect number of decimal places

2015-05-26 Thread James Luscher
James Luscher added the comment: Eric, I am not familiar with the 'g' format and did not know it was the default, but the documentation, read fully, is correct. It just took the response of Christopher Welborn to "wake me up" (it was a LONG day and I was "struggling" to understand the problem

[issue23560] Group the docs of similar methods in stdtypes.rst

2015-05-26 Thread Martin Panter
Martin Panter added the comment: Here is a patch that groups similar methods of the str() class together at various levels. I added an alphabetical index of the methods, currently as a big paragraph of hyperlinks in the existing String Methods section. Then I added the following seven new sec

[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: I registered the fix for importing extension modules from packages against issue 24285 in the commit and NEWS file rather than against this original implementation RFE. Commit references in http://bugs.python.org/issue24285#msg244098 -- resolution: ->

[issue24285] regression for importing extensions in packages

2015-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: Since this error was in the beta release, I used this issue reference in the NEWS file, rather than the original implementation issue. -- resolution: duplicate -> fixed ___ Python tracker

[issue24285] regression for importing extensions in packages

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 55e6f3f94b99 by Nick Coghlan in branch '3.5': Issue #24285: fix importing extensions from packages https://hg.python.org/cpython/rev/55e6f3f94b99 New changeset 32ee7b9d58c9 by Nick Coghlan in branch 'default': Merge fix for issue #24285 from 3.5 htt

[issue24260] TabError behavior doesn't match documentation

2015-05-26 Thread Stefan Krah
Stefan Krah added the comment: > Prohibiting tabs after spaces is not enough. No, I really meant that once a new block is started with tabs, all following nested blocks must use tabs for indentation. The only place where spaces would be allowed is for aligment in logical lines that extend over

[issue24281] String formatting: incorrect number of decimal places

2015-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: And I just double checked: the entirety of the sentence you quoted is: The precision is a decimal number indicating how many digits should be displayed after the decimal point for a floating point value formatted with 'f' and 'F', or before and after the decima

[issue16927] Separate built-in types from functions and group similar functions in functions.rst

2015-05-26 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue24258] BZ2File objects do not have name attribute

2015-05-26 Thread Cliff Dyer
Cliff Dyer added the comment: I'd be happy to take a look at this one, if no one else is working on it. -- nosy: +jcd ___ Python tracker ___ _

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I don't know if it is worth to backport this feature I don't think so either. The Iterator registry is a bit of a waste. > Are there generic set tests similar to mapping_tests and seq_tests? Not that I know of. Also, I don't see the need. --

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff8b603ee51e by Raymond Hettinger in branch 'default': Issue #24286: Forward port dict view abstract base class tests. https://hg.python.org/cpython/rev/ff8b603ee51e -- ___ Python tracker

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9213c70c67d2 by Raymond Hettinger in branch '2.7': Issue #24286: Register dict views with the MappingView ABCs. https://hg.python.org/cpython/rev/9213c70c67d2 -- nosy: +python-dev ___ Python tracker

[issue23359] Speed-up set_lookkey()

2015-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- versions: +Python 3.6 -Python 3.5 Added file: http://bugs.python.org/file39505/nd_lookkey_insertkey3.diff ___ Python tracker ___ ___

[issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings

2015-05-26 Thread Martin Panter
Martin Panter added the comment: Here is a patch. Looking at the code, s#, z#, y and y# are the conversions that call convertbuffer(). These require that the object does not have a PyBufferProcs.bf_releasebuffer() method, which guarantees that the buffer’s lifetime is the same as the underlyi

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know if it is worth to backport this feature (dict views were registered in 1f024a95e9d9), but the patch itself LGTM. I think tests should be foreported to 3.x (if they don't exist in 3.x). Are there generic set tests similar to mapping_tests and seq

[issue24288] Include/opcode.h is modified during building

2015-05-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Changeset eeeb666a5365 in issue24017 unintentionally changed formatting of generated file Include/opcode.h. Now clean building CPython modifies Include/opcode.h. One solution is to restore formatting of Include/opcode.h (regenerate it and commit). Other

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-05-26 Thread Martin Panter
Martin Panter added the comment: Yes I just figured out that myself. Specifically, PyBufferProcs.bf_releasebuffer has to be NULL, and the buffer stays alive as long as the object stays alive. Also it looks like I was wrong about “u” being useless. I was tricked by a contradiction in the docum

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: “s#”, “z#”, “y” and “y#” work only with read-only buffers, for which PyBuffer_Release() is no-op operation. Initially they was designed for work with old buffer protocol that doesn't support releasing a buffer. -- ___

[issue10685] trace does not ignore --ignore-module

2015-05-26 Thread Tom Hines
Tom Hines added the comment: Test attached. Paste into test/test_trace.py. I tested in 2.7 and 3.4. Feel free to modify it. -- Added file: http://bugs.python.org/file39503/test_ignoredir.py ___ Python tracker _