[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-18 Thread Yury Selivanov
Yury Selivanov added the comment: Fixed in https://hg.python.org/peps/rev/7ad183c1d9be I'll quote the commit message here: pep-492: Update benchmark code Since coroutines now have a distinct type, they do not support iteration. Instead of doing 'list(o)', we now do 'o.send(None)'

[issue3616] finalizer

2015-07-18 Thread Ilya Kulakov
Ilya Kulakov added the comment: This issue is marked as closed as a duplicate without a reference to the original task. I still have this issues on Python 3.4.2, on Windows when shutil.rmtree fails to -- nosy: +Ilya.Kulakov title: shutil.rmtree() fails on invalid filename - finalizer

[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for updating the micro-benchmark. Just FYI (and sorry for hijacking this ticket), I ran it through Cython. Here are the numbers: Cython 0.23 (latest master) binary(21) * 3: total 1.609s abinary(21) * 3: total 1.514s CPython 3.5 (latest branch)

[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-18 Thread Christian Barcenas
Christian Barcenas added the comment: Should have clarified that the specific issue that is outlined in #5945 is that PyMapping_Check returns 1 on sequences (e.g. lists), which would mean something like x = [('one', 1), ('two', 2)]; dict(x) would fail in 3.x because x would be incorrectly

[issue3616] finalizer

2015-07-18 Thread STINNER Victor
STINNER Victor added the comment: Hi, the issue was fixed in Python 3. On Windows, you must use Unicode. Otherwise, you can get errors like that. On other platforms, Unicode is now also the best choice on Python 3. See the second message for the superseder issue. --

[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-18 Thread Christian Barcenas
New submission from Christian Barcenas: I noticed an inconsistency today between the dict() documentation vs. implementation. The documentation for the dict() built-in [1] states that the function accepts an optional positional argument that is either a mapping object [2] or an iterable

[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-18 Thread Martin Panter
Martin Panter added the comment: It is at least an omission from the documentation. The glossary https://docs.python.org/dev/glossary.html#term-mapping refers to the Mapping ABC. From Christian’s point of view, the quack of an iterator with just a “keys” attribute sounds more like an iterator

[issue24661] CGIHTTPServer: premature unescaping of query string

2015-07-18 Thread John S
New submission from John S: I created a simple CGI script that outputs the query string passed to it: ``` #!/usr/bin/env python import os print 'Content-Type: text/html\n\n' print os.environ['QUERY_STRING'] ``` I saved it as cgi-bin/test.cgi and made it executable. I then ran `python -m

[issue24660] Heapq + functools.partial : TypeError: unorderable types

2015-07-18 Thread Josh Rosenberg
Josh Rosenberg added the comment: Neither of those example should work (and neither do on my 3.4.0 installation). Heaps must have sortable components; you could only include callables (which are not sortable) in the tuples being sorted if you guarantee that some element(s) before the callable

[issue10845] test_multiprocessing failure under Windows

2015-07-18 Thread Gabi Davar
Changes by Gabi Davar grizzly@gmail.com: -- nosy: +Gabi.Davar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10845 ___ ___ Python-bugs-list

[issue24656] remove assret from mock error checking

2015-07-18 Thread Ethan Furman
Ethan Furman added the comment: Better patch: fixes NEWS, tests, and docs, as well as the code. -- Added file: http://bugs.python.org/file39945/remove_assret.stoneleaf.02.patch ___ Python tracker rep...@bugs.python.org

[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-18 Thread R. David Murray
R. David Murray added the comment: Well, this is an example of duck typing, something we commonly do in Python. I'm not convinced this is a bug. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24659

[issue24660] Heapq + functools.partial : TypeError: unorderable types

2015-07-18 Thread Марк Коренберг
New submission from Марк Коренберг: import heapq from functools import partial qwe = [(0, lambda x: 42), (0, lambda x: 56)] heapq.heapify(qwe) qwe = [(0, partial(lambda x: 42)), (0, partial(lambda x: 56))] heapq.heapify(qwe) Traceback (most recent call last): File

[issue24660] Heapq + functools.partial : TypeError: unorderable types

2015-07-18 Thread Martin Panter
Martin Panter added the comment: I can’t compare non-partial functions either. How did your first heapify() call succeed? Python 3.4.3 (default, Mar 25 2015, 17:13:50) [GCC 4.9.2 20150304 (prerelease)] on linux Type help, copyright, credits or license for more information. import heapq from

[issue23573] Avoid redundant allocations in str.find and like

2015-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that restores optimization of bytes.rfind() and bytearray.rfind() with 1-byte argument on Linux (it also reverts bc1a178b3bc8). -- nosy: +christian.heimes resolution: fixed - stage: resolved - patch review Added file:

[issue24660] Heapq + functools.partial : TypeError: unorderable types

2015-07-18 Thread Марк Коренберг
Марк Коренберг added the comment: Exactly the same with bound class methods -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24660 ___ ___

[issue23883] __all__ lists are incomplete

2015-07-18 Thread Martin Panter
Martin Panter added the comment: That raiseExecptions thing looks like a typo to me. The code should probably be monkey patching the module variable, and restoring it after the test. Then you wouldn’t need to add your extra typoed version to the blacklist. In the logging module, I reckon

[issue24656] remove assret from mock error checking

2015-07-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656 ___

[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-07-18 Thread Frédéric Jolliton
Frédéric Jolliton added the comment: Oh god. The HTML produced by pydoc is awful. This is absolutely nothing modern about it. The code itself hurts my brain. It feels very old (14 years old..), and the HTML production is overly complex, and hard to check regarding correct quoting/escaping.

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread Steve Dower
Steve Dower added the comment: I was going to guess it was timemodule.c. You need to make distclean or hg purge to clean up your repo. This seems to be some sort of gcc/configure issue. So far everyone else who has seen this has fixed it by cleaning their repo. --

[issue24206] Issues with equality of inspect objects

2015-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5ec2bfbe8115 by Serhiy Storchaka in branch '3.4': Issue #24206: Fixed __eq__ and __ne__ methods of inspect classes. https://hg.python.org/cpython/rev/5ec2bfbe8115 New changeset 66a5f66b4049 by Serhiy Storchaka in branch '3.5': Issue #24206: Fixed

[issue24407] Use after free in PyDict_merge

2015-07-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24407 ___

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread Mark Lawrence
Mark Lawrence added the comment: There is a reference in the patch file to #23524. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24664 ___

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek added the comment: Oh, for the record, the build failure: building 'time' extension gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I../Include -I.

[issue24656] remove assret from mock error checking

2015-07-18 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +kushal.das, ncoghlan, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656 ___

[issue24641] Log type of unserializable value when raising JSON TypeError

2015-07-18 Thread Bob Ippolito
Bob Ippolito added the comment: This seems like a very reasonable proposal. It would be great if we could also include a path in the error message (e.g. `obj[foo][1][bar]`) as well to provide enough context to track down the error quickly. -- ___

[issue24206] Issues with equality of inspect objects

2015-07-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed versions: +Python 3.4, Python 3.6 ___ Python tracker rep...@bugs.python.org

[issue24568] Misc/NEWS: free-after-use - use-after-free

2015-07-18 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Still not fixed. -- nosy: +Arfrever, benjamin.peterson resolution: fixed - stage: resolved - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24568

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-18 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: commit review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___

[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-07-18 Thread Alex Walters
Alex Walters added the comment: Isn't this whats sphinx's apidoc is for? -- nosy: +tritium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10716 ___

[issue24642] Will there be an MSI installer?

2015-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f60ec6d6586 by Steve Dower in branch '3.5': Issue #24642: Improves help text displayed in the Windows installer. https://hg.python.org/cpython/rev/9f60ec6d6586 -- ___ Python tracker

[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-18 Thread Christian Barcenas
Christian Barcenas added the comment: I'm aware of duck typing but I don't think this is the right place for it. (Although ABCs are ostensibly a kind of duck typing, as they do not require implementing classes to inherit from the ABC.) As Martin noticed, the glossary directly defines a

[issue24663] ast.literal_eval does not handle empty set literals

2015-07-18 Thread Ezio Melotti
Ezio Melotti added the comment: I believe this is by design, since set() -- like str(), list(), dict(), etc -- is not a literal. I don't think set() should be special-cased either. Perhaps you could tell us more about your use case? -- nosy: +ezio.melotti resolution: - not a bug

[issue24663] ast.literal_eval does not handle empty set literals

2015-07-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24663 ___ ___ Python-bugs-list

[issue24663] ast.literal_eval does not handle empty set literals

2015-07-18 Thread Filip Haglund
Filip Haglund added the comment: Okey, then this is not a bug. I can just handle this special case myself. Thanks! -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24663

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread Zbyszek Jędrzejewski-Szmek
New submission from Zbyszek Jędrzejewski-Szmek: I'm not sure if I'm doing something wrong, because other people should be seeing this too... Anyway, attached patch fixes the issue for me. -- components: Interpreter Core, Library (Lib) files:

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 24cf6b4d72c2 by Benjamin Peterson in branch '3.4': improve style of the convert macro (#24655) https://hg.python.org/cpython/rev/24cf6b4d72c2 New changeset bffa3b5fd2d8 by Benjamin Peterson in branch '3.5': merge 3.4 (#24655)

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-18 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___

[issue24665] CJK support for textwrap

2015-07-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: This is new feature and can be added only in 3.6. Issue12499 looks related. See also issue12568. -- nosy: +georg.brandl, pitrou, serhiy.storchaka versions: +Python 3.6 -Python 2.7 ___ Python tracker

[issue24666] Buffered I/O does not take file position into account when reading blocks

2015-07-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +benjamin.peterson, pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24666 ___

[issue24666] Buffered I/O does not take file position into account when reading blocks

2015-07-18 Thread Eric Pruitt
New submission from Eric Pruitt: When buffering data from a file, the buffered I/O does not take into account the current file descriptor position. In the following example, I open a file and seek forward 1,000 bytes: f = open(test-file, rb) f.seek(1000) 1000 f.readline() The filesystem

[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2015-07-18 Thread Chris Mattmann
Chris Mattmann added the comment: Hi there, we are experiencing this in tika-python too, see: https://github.com/chrismattmann/tika-python/issues/44 -- nosy: +chrismattmann ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23054

[issue24568] Misc/NEWS: free-after-use - use-after-free

2015-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 669d6b5c1734 by Raymond Hettinger in branch '2.7': Issue #24568: fix typo. https://hg.python.org/cpython/rev/669d6b5c1734 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24568

[issue24568] Misc/NEWS: free-after-use - use-after-free

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24568 ___

[issue24656] remove assret from mock error checking

2015-07-18 Thread Ethan Furman
Ethan Furman added the comment: Addressed comments from berker.peksag. -- Added file: http://bugs.python.org/file39948/remove_assret.stoneleaf.03.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656

[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24659 ___

[issue8450] httplib: false BadStatusLine() raised

2015-07-18 Thread Martin Panter
Martin Panter added the comment: Issue 3566 has added a new exception subclass, RemoteDisconnected, in 3.5. People are still complaining about the old BadStatusLine exception in Python 2 though. See Issue 23054. Python 2 could still get better documentation of the BadStatusLine exception.

[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +easy -patch versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10716 ___

[issue24568] Misc/NEWS: free-after-use - use-after-free

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24568 ___

[issue24656] remove assret from mock error checking

2015-07-18 Thread Michael Foord
Michael Foord added the comment: -1 The whole thread is absurd. I'm travelling for europython and only have internet access on my phone until tomorrow at the earliest. On Saturday, 18 July 2015, Berker Peksag rep...@bugs.python.org wrote: Changes by Berker Peksag berker.pek...@gmail.com:

[issue24661] CGIHTTPServer: premature unescaping of query string

2015-07-18 Thread Eric V. Smith
Eric V. Smith added the comment: I would expect the cgi script to receive the unescaped values. Can you point to some reference that says otherwise? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24661

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- resolution: - not a bug stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24664 ___

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek added the comment: Indeed, make distclean fixes the problem. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24664 ___

[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm aware of duck typing but I don't think this is the right place for it. The code for dicts is very old, stable, and unlikely to change. Also, the logic of checking for .keys() is immortalized in the collections.abc.MutableMapping update() method.

[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2015-07-18 Thread Martin Panter
Martin Panter added the comment: There is hopefully a better RemoteDisconnected exception and documentation in 3.5, thanks to Issue 3566. In Python 2, I think this is the same as Issue 8450. -- resolution: - duplicate status: open - closed superseder: - httplib: false BadStatusLine()

[issue8450] httplib: false BadStatusLine() raised

2015-07-18 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- components: +Documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8450 ___ ___

[issue24665] CJK support for textwrap

2015-07-18 Thread Florent Gallaire
Changes by Florent Gallaire fgalla...@gmail.com: -- components: Library (Lib) files: CJK.patch keywords: patch nosy: fgallaire priority: normal severity: normal status: open title: CJK support for textwrap type: enhancement versions: Python 2.7 Added file: