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

2015-07-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson, pitrou, stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list

[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

[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

[issue24665] CJK support for textwrap

2015-07-18 Thread Florent Gallaire
Changes by Florent Gallaire : -- 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: http://bugs.python.org/file39949/CJK.patch __

[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

[issue8450] httplib: false BadStatusLine() raised

2015-07-18 Thread Martin Panter
Changes by Martin Panter : -- components: +Documentation ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[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

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

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

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

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[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 wrote: > > Changes by Berker Peksag : > > > -- > nosy: +kushal.das, ncoghlan,

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

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread Zachary Ware
Changes by Zachary Ware : -- resolution: -> not a bug stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Un

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

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

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

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

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

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

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

2015-07-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +easy -patch versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list

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

[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 ___ ___ Python-bugs-list

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

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

2015-07-18 Thread Berker Peksag
Changes by Berker Peksag : -- stage: commit review -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24656] remove "assret" from mock error checking

2015-07-18 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +kushal.das, ncoghlan, rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[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

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

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

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

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

[issue24407] Use after free in PyDict_merge

2015-07-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue24206] Issues with equality of inspect objects

2015-07-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.4, Python 3.6 ___ Python tracker

[issue24580] Wrong or missing exception when compiling regexes with recursive named backreferences

2015-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 361d7af9396e by Serhiy Storchaka in branch '3.5': Issue #24580: Symbolic group references to open group in re patterns now are https://hg.python.org/cpython/rev/361d7af9396e New changeset 4d3557500019 by Serhiy Storchaka in branch 'default': Issue #

[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined

2015-07-18 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Build, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ __

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

[issue24656] remove "assret" from mock error checking

2015-07-18 Thread Ethan Furman
Changes by Ethan Furman : -- stage: -> patch review type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

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

2015-07-18 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[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) https://hg.python.org/c

[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: 0001-Always-define-_Py_-_SUPPRESS_IPH-macros.

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

2015-07-18 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

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

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

[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 "mappin

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

2015-07-18 Thread Filip Haglund
New submission from Filip Haglund: ast.literal_eval handles sets, if they contain at least one value, but does not handle empty ones, which are represented as `set()` since `{}` is already used by dicts. -- components: Library (Lib) messages: 246906 nosy: Filip Haglund priority: normal

[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

[issue24662] While condition not satisfied embarrassingly

2015-07-18 Thread Ezio Melotti
Ezio Melotti added the comment: This is expected: >>> .1+.1+.1+.1+.1+.1+.1+.1+.1+.1 0. See https://docs.python.org/3/tutorial/floatingpoint.html for further info. -- nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue24662] While condition not satisfied embarrassingly

2015-07-18 Thread Agniva Roychowdhury
Changes by Agniva Roychowdhury : -- versions: +Python 2.7 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue24662] While condition not satisfied embarrassingly

2015-07-18 Thread Agniva Roychowdhury
New submission from Agniva Roychowdhury: A simple while loop that prints a variable 'test' (initialized by 0.0 and incremented by 0.1 in the loop) with a condition test<1.0 prints values UPTO 1.0. It is a serious error. Please check attached file and the output. -- components: Interpre

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

[issue10845] test_multiprocessing failure under Windows

2015-07-18 Thread Gabi Davar
Changes by Gabi Davar : -- nosy: +Gabi.Davar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[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: http://bugs.p

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

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

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

[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

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

2015-07-18 Thread Марк Коренберг
Марк Коренберг added the comment: Exactly the same with bound class methods -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

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

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

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

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

[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) binary(21)

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

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

[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