[issue24654] PEP 492 - example benchmark doesn't work (TypeError)
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)' until StopIteration. Note, that the updated timings are due to the difference of doing a loop in Python vs doing it in C ('list()' vs 'while True'). Marcin and Terry, thanks for reporting this! -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24654 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3616] finalizer
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3616 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24654] PEP 492 - example benchmark doesn't work (TypeError)
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) * 3: total 4.653s abinary(21) * 3: total 4.750s The low factor between the two shows (IMO) that using a type slot function for await was a very good idea. Streamlining FetchStopIteration might bring another bit. I also tried the same thing with alternating recursively between the Python and Cython implementation by changing it to l = await cy_abinary(n - 1) r = await py_abinary(n - 1) binary(21) * 3: total 3.835s abinary(21) * 3: total 3.952s So even the slow fallback paths seem pretty efficient on both sides. -- nosy: +scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24654 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24659] dict() built-in fails on iterators with a keys attribute
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 evaluated as a mapping rather than as an iterable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24659 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3616] finalizer
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3616 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24659] dict() built-in fails on iterators with a keys attribute
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 object [3]. Consider the following: import collections.abc class MyIterable(object): def __init__(self): self._data = [('one', 1), ('two', 2)] def __iter__(self): return iter(self._data) class MyIterableWithKeysMethod(MyIterable): def keys(self): return And now for something completely different class MyIterableWithKeysAttribute(MyIterable): keys = It's just a flesh wound! assert issubclass(MyIterable, collections.abc.Iterable) assert issubclass(MyIterableWithKeysMethod, collections.abc.Iterable) assert issubclass(MyIterableWithKeysAttribute, collections.abc.Iterable) assert not issubclass(MyIterable, collections.abc.Mapping) assert not issubclass(MyIterableWithKeysMethod, collections.abc.Mapping) assert not issubclass(MyIterableWithKeysAttribute, collections.abc.Mapping) # OK assert dict(MyIterable()) == {'one': 1, 'two': 2} # Traceback (most recent call last): # File stdin, line 1, in module # TypeError: 'MyIterableWithKeysMethod' object is not subscriptable assert dict(MyIterableWithKeysMethod()) == {'one': 1, 'two': 2} # Traceback (most recent call last): # File stdin, line 1, in module # TypeError: attribute of type 'str' is not callable assert dict(MyIterableWithKeysAttribute()) == {'one': 1, 'two': 2} The last two assertions should not fail, and it appears that the offending code can be found in Objects/dictobject.c's dict_update_common: else if (arg != NULL) { _Py_IDENTIFIER(keys); if (_PyObject_HasAttrId(arg, PyId_keys)) result = PyDict_Merge(self, arg, 1); else result = PyDict_MergeFromSeq2(self, arg, 1); } PyDict_Merge is used to merge key-value pairs if the optional parameter is a mapping, and PyDict_MergeFromSeq2 is used if the parameter is an iterable. My immediate thought was to substitute the _PyObject_HasAttrId call with PyMapping_Check which I believe would work in 2.7, but due to #5945 I don't think this fix would work in 3.x. Thoughts? [1] https://docs.python.org/3.6/library/stdtypes.html#dict [2] https://docs.python.org/3.6/glossary.html#term-mapping [3] https://docs.python.org/3.6/glossary.html#term-iterable -- assignee: docs@python components: Documentation, Interpreter Core messages: 246890 nosy: christian.barcenas, docs@python priority: normal severity: normal status: open title: dict() built-in fails on iterators with a keys attribute type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24659 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24659] dict() built-in fails on iterators with a keys attribute
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 than a mapping. I think the documentation for the dict() constructor should say how to ensure the iterable and mapping modes are triggered. Perhaps dict.update() should also, because it appears to also treat non-dict() “mappings” differently to plain iterators. -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24659 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24661] CGIHTTPServer: premature unescaping of query string
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 CGIHTTPModule` and opened http://localhost:8000/cgi-bin/test.cgi?H%26M in a web browser. The output was HM when it should have been H%26M I tried with Python 2.7.5, 2.7.3 and 2.6.6 and they all correctly output H%26M. The test.cgi file is attached. -- components: Library (Lib) files: test.cgi messages: 246900 nosy: johnseman priority: normal severity: normal status: open title: CGIHTTPServer: premature unescaping of query string versions: Python 2.7 Added file: http://bugs.python.org/file39943/test.cgi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24661 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24660] Heapq + functools.partial : TypeError: unorderable types
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 will ensure the elements are ordered without falling back on comparing the callable members. This isn't a bug; heapq.heapify() *should* fail in this case, and in any case where sorted() would fail due to uncomparable objects. -- nosy: +josh.r ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24660 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10845] test_multiprocessing failure under Windows
Changes by Gabi Davar grizzly@gmail.com: -- nosy: +Gabi.Davar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10845 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24656] remove assret from mock error checking
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 http://bugs.python.org/issue24656 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24659] dict() built-in fails on iterators with a keys attribute
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24660] Heapq + functools.partial : TypeError: unorderable types
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 /usr/lib/python3.4/code.py, line 90, in runcode exec(code, self.locals) File input, line 1, in module TypeError: unorderable types: functools.partial() functools.partial() So it is not realiable to use heapq if element of the array is (int, callable) -- components: Library (Lib) messages: 246894 nosy: mmarkk priority: normal severity: normal status: open title: Heapq + functools.partial : TypeError: unorderable types type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24660 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24660] Heapq + functools.partial : TypeError: unorderable types
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 functools import partial qwe = [(0, lambda x: 42), (0, lambda x: 56)] heapq.heapify(qwe) Traceback (most recent call last): File stdin, line 1, in module TypeError: unorderable types: function() function() (lambda x: 42) (lambda x: 56) Traceback (most recent call last): File stdin, line 1, in module TypeError: unorderable types: function() function() This is not a problem specific to “heapq”. This is how function objects, lambda objects, bound class methods, etc, are meant to work. Python doesn’t implement ordering comparisons for them. This is kind of explained at https://docs.python.org/dev/reference/expressions.html#comparisons. See Issue 12067 if you want to help improve this section of the documentation. If you don’t care about the order, perhaps you could ensure the first item in each tuple is unique, or add a dummy item in the middle that ensures the tuples have a definite order: (0, 0, lambda x: 42) (0, 1, lambda x: 56) True -- nosy: +vadmium resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24660 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23573] Avoid redundant allocations in str.find and like
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.python.org/file39944/issue23573_bytes_rfind_memrchr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23573 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24660] Heapq + functools.partial : TypeError: unorderable types
Марк Коренберг added the comment: Exactly the same with bound class methods -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24660 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23883] __all__ lists are incomplete
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 raiseExceptions (non-typoed) should actually be added to __all__. It is documented under Handler.handleError(). pickletools.OpcodeInfo: It is briefly mentioned as the type of the first item of genops(). I don’t have a strong opinion, but I tended to agree with your previous patch which added it to __all__. threading.ThreadError: It is not documented, but it was already in __all__. I think it should be restored, in case someone’s code is relying on it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23883 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24656] remove assret from mock error checking
Changes by Ethan Furman et...@stoneleaf.us: -- stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10716] Modernize pydoc to use better HTML and separate CSS
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. Generating modern HTML5/CSS would mean: - Using h1, h2, for section title, - Forget about br (this element should never be used nowadays), - Forget about hr (let the CSS decide when to insert a visual separator after/before a given element), - Don't use code for block of code. This is an inline element. Use pre class=code for example. - Don't use table all over the place for formatting everything (use li for the list of modules for instance), - Drop these useless dd/dd (empty!) - No need to replace \n by br, or to replace space by nbsp;. The formatting can be achieved by white-space: pre in CSS. - a name=.. or a id=.. could be replaced by span id=.. class=.. to distinguish them from hyperlinks. - the table docclass could be a serie of h2 (or h3) title followed by the content of the section. The table seems useless because there are no particular requirement for an alignment. - and so on, and so on, .. Actually, I think this need a complete rewrite. This is a useful tool to have included with Python, but this need a serious refresh. To me, a modern documentation is something like this (from the Rust documentation): https://doc.rust-lang.org/std/option/enum.Option.html https://doc.rust-lang.org/std/option/index.html (Look at the generated HTML too. It's rather straightforward.) -- nosy: +Frédéric Jolliton ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10716 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24664 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24206] Issues with equality of inspect objects
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 __eq__ and __ne__ methods of inspect classes. https://hg.python.org/cpython/rev/66a5f66b4049 New changeset adc9869c6d0d by Serhiy Storchaka in branch 'default': Issue #24206: Fixed __eq__ and __ne__ methods of inspect classes. https://hg.python.org/cpython/rev/adc9869c6d0d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24206 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24407] Use after free in PyDict_merge
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24407 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined
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. -IInclude -I/usr/local/include -I/home/zbyszek/python/cpython/Include -I/home/zbyszek/python/cpython/build -c /home/zbyszek/python/cpython/Modules/timemodule.c -o build/temp.linux-x86_64-3.6/home/zbyszek/python/cpython/Modules/timemodule.o /home/zbyszek/python/cpython/Modules/timemodule.c: In function ‘time_strftime’: /home/zbyszek/python/cpython/Modules/timemodule.c:656:9: error: unknown type name ‘_Py_BEGIN_SUPPRESS_IPH’ _Py_BEGIN_SUPPRESS_IPH ^ /home/zbyszek/python/cpython/Modules/timemodule.c:656:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] /home/zbyszek/python/cpython/Modules/timemodule.c:658:9: error: ‘_Py_END_SUPPRESS_IPH’ undeclared (first use in this function) _Py_END_SUPPRESS_IPH ^ /home/zbyszek/python/cpython/Modules/timemodule.c:658:9: note: each undeclared identifier is reported only once for each function it appears in /home/zbyszek/python/cpython/Modules/timemodule.c:662:9: error: expected ‘;’ before ‘if’ if (buflen 0 || i = 256 * fmtlen) { ^ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24664 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24656] remove assret from mock error checking
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +kushal.das, ncoghlan, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24641] Log type of unserializable value when raising JSON TypeError
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24641 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24206] Issues with equality of inspect objects
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 http://bugs.python.org/issue24206 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24568] Misc/NEWS: free-after-use - use-after-free
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24655] _ssl.c: Missing do for do {} while(0) idiom
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: commit review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10716] Modernize pydoc to use better HTML and separate CSS
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24642] Will there be an MSI installer?
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 rep...@bugs.python.org http://bugs.python.org/issue24642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24659] dict() built-in fails on iterators with a keys attribute
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 mapping as a class that implements the Mapping ABC, and likewise the definition of an iterable under the glossary would satisfy the Iterable ABC. I think this is not just a documentation issue: the quack of a mapping has been well-defined and consistent since Python 2.7. Same for iterables. (It is worth noting that 2.6's definition of mapping was indeed just any object with a __getitem__ method https://docs.python.org/2.7/glossary.html#term-mapping) I think the documentation for the dict() constructor should say how to ensure the iterable and mapping modes are triggered. Doesn't it do this already by referencing the definitions of iterable and mapping? These ABCs are used in other built-ins such as any() and eval(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24659 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24663] ast.literal_eval does not handle empty set literals
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 status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24663 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24663] ast.literal_eval does not handle empty set literals
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24663 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24663] ast.literal_eval does not handle empty set literals
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined
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.patch keywords: patch messages: 246910 nosy: zbysz priority: normal severity: normal status: open title: build failure with _Py_BEGIN_SUPPRESS_IPH undefined versions: Python 3.6 Added file: http://bugs.python.org/file39947/0001-Always-define-_Py_-_SUPPRESS_IPH-macros.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24664 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24655] _ssl.c: Missing do for do {} while(0) idiom
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/cpython/rev/bffa3b5fd2d8 New changeset 35d6606b2480 by Benjamin Peterson in branch 'default': merge 3.5 (#24655) https://hg.python.org/cpython/rev/35d6606b2480 New changeset e4f9562d625d by Benjamin Peterson in branch '2.7': improve style of the convert macro (#24655) https://hg.python.org/cpython/rev/e4f9562d625d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24655] _ssl.c: Missing do for do {} while(0) idiom
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24665] CJK support for textwrap
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 rep...@bugs.python.org http://bugs.python.org/issue24665 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24666] Buffered I/O does not take file position into account when reading blocks
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +benjamin.peterson, pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24666 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24666] Buffered I/O does not take file position into account when reading blocks
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 on which test-file resides has a block size of 4,096 bytes, so on the backend, I would expect Python to read 3,096 bytes so the next read will be aligned with the filesystem blocks. What actually happens is that Python reads a 4,096 bytes. This is the output from an strace attached to the interpreter above: Process 16543 attached lseek(4, 0, SEEK_CUR) = 0 lseek(4, 1000, SEEK_SET)= 1000 read(4, \000\000\000\000\000\000\000\000\000\000..., 4096) = 4096 -- components: IO messages: 246931 nosy: ericpruitt priority: normal severity: normal status: open title: Buffered I/O does not take file position into account when reading blocks type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24666 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24568] Misc/NEWS: free-after-use - use-after-free
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24568] Misc/NEWS: free-after-use - use-after-free
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24568 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24656] remove assret from mock error checking
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24659] dict() built-in fails on iterators with a keys attribute
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8450] httplib: false BadStatusLine() raised
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. Currently it gives the impression that it only happens when the “strict” parameter is True, and a status line was received that was not understood. The exception message could also be improved. Due to Issue 7427, there is a special case to make the message literally two quote signs (''), representing an empty string. Perhaps messages like “End of stream signalled”, “No status line”, or “Empty status line” would be clearer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10716] Modernize pydoc to use better HTML and separate CSS
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24568] Misc/NEWS: free-after-use - use-after-free
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24656] remove assret from mock error checking
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: -- nosy: +kushal.das, ncoghlan, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656 ___ -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24656 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24661] CGIHTTPServer: premature unescaping of query string
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24664] build failure with _Py_BEGIN_SUPPRESS_IPH undefined
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24659] dict() built-in fails on iterators with a keys attribute
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. For the most part, consumers of iterables, sequences, and mappings are allowed to use duct-typing (this is a feature of the language, not a bug). The docs can be improved in a number of places. For example the docstring on the dict constructor is out of sync with the dict.update() method: print(dict.__doc__) dict() - new empty dictionary dict(mapping) - new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) - new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) - new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) print(dict.update.__doc__) D.update([E, ]**F) - None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] In addition, the glossary entries for iterable, sequence, and mapping need to be improved to distinguish between their somewhat vague use in a general sense versus the specific meaning of isinstance(obj, Mapping). Unless the docs specify a check for the latter, they almost always do some form of duck-typing or a check for concrete built-in class or subclass. Terms like mapping and sequence are often used somewhat generally both inside and outside the Python world. Sometimes mapping is used in the mathematic sense (pairing each member of the domain with each member of the range), http://www.icoachmath.com/math_dictionary/mapping.html, and sometimes in the sense of a subset of dict capabilities (i.e. has __getitem__ and keys). The docs for PyMapping_Check() need to be updated to indicate the known limitations of the check and to disambiguate it from isinstance(obj, Mapping). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24659 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))
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() raised ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8450] httplib: false BadStatusLine() raised
Changes by Martin Panter vadmium...@gmail.com: -- components: +Documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24665] CJK support for textwrap
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: http://bugs.python.org/file39949/CJK.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24665 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com