[issue23312] google thinks the docs are mobile unfriendly
Georg Brandl added the comment: There is already an enhanced theme: https://github.com/ionelmc/sphinx-py3doc-enhanced-theme I will have a look at it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
Akira Li added the comment: I've removed mentioning of GIL and uploaded a new patch. -- Added file: http://bugs.python.org/file37850/docs-time.sleep-other-threads-are-not-blocked-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23292] Enum doc suggestion
Mark Summerfield added the comment: Since this is a bit controversial, I've tried marking it as 'rejected' with this comment. I've also added a very brief explanation and link back to here on my web site: http://www.qtrac.eu/pyenum.html -- resolution: - rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23292] Enum doc suggestion
Changes by Mark Summerfield m...@qtrac.eu: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2
New submission from Akira Li: Python 2.7.9 (default, Jan 25 2015, 13:41:30) [GCC 4.9.2] on linux2 Type help, copyright, credits or license for more information. import os, sys, tempfile d = u'\u20ac'.encode(sys.getfilesystemencoding()) # non-ascii if not os.path.isdir(d): os.makedirs(d) ... os.environ['TEMP'] = d tempfile.mkdtemp(prefix=u'') Traceback (most recent call last): File stdin, line 1, in module File .../python2.7/tempfile.py, line 331, in mkdtemp file = _os.path.join(dir, prefix + name + suffix) File .../python2.7/posixpath.py, line 80, in join path += '/' + b UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 13: ordinal not in range(128) Related: https://bugs.python.org/issue1681974 -- components: Unicode messages: 234662 nosy: akira, ezio.melotti, haypo priority: normal severity: normal status: open title: tempfile.mkdtemp fails with non-ascii paths on Python 2 type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23315 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23292] Enum doc suggestion
Ethan Furman added the comment: Amusingly enough, I posted a question/answer to StackOverflow (http://stackoverflow.com/q/28130683/208880) and so far the only other respondent posted an answer with similar functionality to my own, and also recommended that such a method be added to the base Enum class. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
SilentGhost added the comment: It seems, if I read https://docs.python.org/3/reference/expressions.html#calls correctly that the evaluation order of the function arguments is not defined in general, as it depends on your use of keyword argument and exact function signature. Naturally, f(a(), b()) would be evaluated in the order you're expecting. -- nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
R. David Murray added the comment: The resolution of issue 16967 argues that this should probably be considered a bug. It certainly goes against normal Python expectations. I think it should also be considered to be of low priority, though. -- nosy: +r.david.murray priority: normal - low stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23317] Incorrect description of descriptor invocation in Python Language Reference
New submission from Justin Eldridge: The section titled Invoking Descriptors in the Python Language Reference [1] says: Class Binding If binding to a new-style class, A.x is transformed into the call: A.__dict__['x'].__get__(None, A). This suggests that __get__ is looked up on the instance of x, when I believe that it is actually looked up on the type. That is, it's my understanding that A.x invokes: type(A.__dict__['x']).__get__(A.__dict__['x'], None, Foo)) Here's some Python 3.4 code demonstrating this: class A: pass class Descriptor: def __get__(self, obj, cls): print(Getting!) A.x = Descriptor() def replacement_get(obj, cls): print(This is a replacement.) A.__dict__['x'].__get__ = replacement_get Now, writing: A.x Getting! A.__dict__['x'].__get__(None, A) This is a replacement! type(A.__dict__['x']).__get__(A.__dict__['x'], None, A) Getting! The documentation makes a similar statement about instance binding that also appears to be incorrect. This is the case in all versions of the document I could find. What I believe to be the actual behavior is implied by a later section in the same document, which states that the implicit invocation of special methods is only guaranteed to work correctly if the special method is defined on the type, not the instance. This suggests that the statements in Invoking Descriptors aren't quite correct, and while the true behavior is a little more verbose, I think it would be worthwhile to update the documentation so as to avoid confusion. [1]: https://docs.python.org/2/reference/datamodel.html#invoking-descriptors -- assignee: docs@python components: Documentation messages: 234676 nosy: Justin.Eldridge, docs@python priority: normal severity: normal status: open title: Incorrect description of descriptor invocation in Python Language Reference type: enhancement 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/issue23317 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Neil Girdhar added the comment: Fixed all tests except test_parser. New node numbers are not reflected here for some reason. -- Added file: http://bugs.python.org/file37854/starunpack18.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
New submission from Joshua Landau: It is claimed that all expressions are evaluated left-to-right, including in functions¹. However, f(*a(), b=b()) will evaluate b() before a(). ¹ https://docs.python.org/3/reference/expressions.html#evaluation-order -- components: Interpreter Core messages: 234672 nosy: Joshua.Landau priority: normal severity: normal status: open title: Incorrect evaluation order of function arguments with *args type: behavior versions: Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21279] str.translate documentation incomplete
John Posner added the comment: Per Martin's suggestion, deltas from issue21279.v5.patch: * no change to patch for doc/library/stdtypes.rst * doc string reflowed in patch for objects/unicodeobject.c -- Added file: http://bugs.python.org/file37855/issue21279.v6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21279 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23318] (compiled RegEx).split gives unexpected results if () in pattern
New submission from Dave Notman: # Python 3.3.1 (default, Sep 25 2013, 19:30:50) # Linux 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:25:33 UTC 2013 i686 i686 i686 GNU/Linux import re splitter = re.compile( r'(\s*[+/;,]\s*)|(\s+and\s+)' ) ll = splitter.split( 'Dave Sam, Jane and Zoe' ) print(repr(ll)) print( 'Try again with revised RegEx' ) splitter = re.compile( r'(?:(?:\s*[+/;,]\s*)|(?:\s+and\s+))' ) ll = splitter.split( 'Dave Sam, Jane and Zoe' ) print(repr(ll)) Results: ['Dave', ' ', None, 'Sam', ', ', None, 'Jane', None, ' and ', 'Zoe'] Try again with revised RegEx ['Dave', 'Sam', 'Jane', 'Zoe'] -- components: Regular Expressions messages: 234677 nosy: dnotmanj, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: (compiled RegEx).split gives unexpected results if () in pattern type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23318 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2
STINNER Victor added the comment: Why do you use an unicode prefix? Does it work with a bytes prefix? You should use Python 3 if you want the best Unicode support. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23315 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23312] google thinks the docs are mobile unfriendly
Maries Ionel Cristian added the comment: You can see that theme in action at http://python-aspectlib.readthedocs.org/en/latest/ -- nosy: +ionel.mc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Neil Girdhar added the comment: Dict comprehensions work. -- Added file: http://bugs.python.org/file37852/starunpack16.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
Neil Girdhar added the comment: actually, we accept alternation, so maybe a bit to say whether we start with a list or a dict followed by a length of the alternating sequence? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS
R. David Murray added the comment: At a quick glance this does not seem like a reasonable patch...introducing copies of two stdlib modules is basically a non-starter. Nor do I understand from the description what the problem is that it is trying to solve. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23284 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21408] delegation of `!=` to the right-hand side argument is not always done
Martin Panter added the comment: I looked over your __ne__ removals from the library, and they all seem sensible to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21408 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745722] please add wsgi to SimpleXMLRPCServer
Berker Peksag added the comment: I've updated the patch for 3.5. I also have cleaned-up the documentation to avoid duplicate content. -- components: +Library (Lib) -XML nosy: +berker.peksag versions: +Python 3.5 -Python 3.4 Added file: http://bugs.python.org/file37860/issue1745722.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745722 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
R. David Murray added the comment: Neil: I presume you are speaking of your in-progress PEP patch, and not the current python code? If so, please keep the discussion of handling this in the context of the PEP to the PEP issue. This issue should be for resolving the bug in the current code (if we choose to do so...if the PEP gets accepted for 3.5 this issue may become irrelevant, as I'm not sure we'd want to fix it in 3.4 for backward compatibility reasons). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
Neil Girdhar added the comment: Yes, sorry David. I got linked here from the other issue. In any case, in the current code, the longest alternating sequence possible is 4. So one way to solve this is to change the CALL_FUNCTION parameters to be lists and dicts only and then process the final merging in CALL_FUNCTION. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
Neil Girdhar added the comment: another option is to add a LIST_EXTEND(stack_difference) opcode that would allow us to take the late iterable and extend a list at some arbitrary stack position. I had to add something like that for dicts for the other issue, so it would follow that pattern. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
New submission from Serhiy Storchaka: Debugging build crashes in some circumstances in str.decode() with error handler which produces replacement string with length larger than malformed data. For example the backslashreplace error handler produces 4-character string for every illegal byte. All other standard error handlers produce no longer than 1 character for every illegal unit. Here is a patch which fixes this issue. I'll commit it without review because buildbots are broken without it. This issue is open for reference and post-commit review. -- assignee: serhiy.storchaka components: Interpreter Core files: unicode_decode_call_errorhandler_writer.patch keywords: patch messages: 234705 nosy: haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Crash in str.decode() with special error handler type: crash versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37861/unicode_decode_call_errorhandler_writer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22286] Allow backslashreplace error handler to be used on input
Changes by Steve Dower steve.do...@microsoft.com: -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
Roundup Robot added the comment: New changeset 2de90090e486 by Serhiy Storchaka in branch '3.4': Issue #23321: Fixed a crash in str.decode() when error handler returned https://hg.python.org/cpython/rev/2de90090e486 New changeset 1cd68b3c46aa by Serhiy Storchaka in branch 'default': Issue #23321: Fixed a crash in str.decode() when error handler returned https://hg.python.org/cpython/rev/1cd68b3c46aa -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22286] Allow backslashreplace error handler to be used on input
Serhiy Storchaka added the comment: Yes, I see. The patch exposed existing bug in decoding error handing. See issue23321 for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23322] parser module docs missing second example
New submission from Devin Jeanpierre: The port to reST missed the second example: https://docs.python.org/release/2.5/lib/node867.html This is still referred to in the docs, so it is not deliberate. For example, the token module docs say The second example for the parser module shows how to use the symbol module: https://docs.python.org/3.5/library/token.html#module-token There is no second example, nor any use of the symbol module, in the docs: https://docs.python.org/3.5/library/parser.html -- assignee: docs@python components: Documentation messages: 234716 nosy: Devin Jeanpierre, docs@python priority: normal severity: normal status: open title: parser module docs missing second example versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23322 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23269] Tighten-up search loops in sets
Raymond Hettinger added the comment: May be worth to move this test outside of the loop as in the set_lookup function. The loop used to be this way but testing showed no benefit, so a while back I recombined it back to a j=0 start point and the code looked much nicer. I don't really want to go back if I don't have to. There may or may not be a microscopic benefit to moving the leaq 9(%rcx), %rsi / cmpq %rsi, %rax / jae L237 sequence before the table[i+0]-key == NULL check. I don't still have access to VTune to verify that this highly predictable branch is essentially free. I do have a preference at this point for the simpler code -- that will make the future optimization work easier (perhaps inlining the lookkey code into set_insert_key, set_discard, and set_contains). Also, looking at the disassembly of your patch, there is an additional cost for setting up the table[i+1] entry that wasn't there before (two new extra instructions: leaq1(%rcx), %rsi; salq $4, %rsi; occur before the normal lookup and test sequence: leaq 0(%rbp,%rsi), %rdx; cmpq $0, (%rdx); je L237) That said, if you think it is important to move the table[i+0] test outside the (i + LINEAR_PROBES = mask) test, just say so and I'll apply your version of the patch instead of mine. Otherwise, I prefer the cleaner code (both C and generated assembly) of my patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8796] Deprecate codecs.open()
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8796 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15852] typos in curses argument error messages
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15852 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23319] Missing SWAP_INT in I_set_sw
New submission from Matthieu Gautier: I_set_sw function is missing a SWAP_INT. This leads to wrong set of bitfield value. Here is a script to reproduce: -- from ctypes import * class HEADER(BigEndianStructure): _fields_ = ( ('pad', c_uint32, 16), ('v1', c_uint32, 4), ('v2', c_uint32, 12) ) b = bytearray(4) header = HEADER.from_buffer(b) header.type = 1 assert b == b'\x00\x00\x10\x00' header.mode = 0x234 assert b == b'\x00\x00\x12\x34' -- -- components: ctypes files: ctypes_swap_uint.patch keywords: patch messages: 234682 nosy: mgautierfr priority: normal severity: normal status: open title: Missing SWAP_INT in I_set_sw type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file37856/ctypes_swap_uint.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23319 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Joshua Landau added the comment: Amazing, thanks. I also just uncovered http://bugs.python.org/issue23316; we'll need to support a patch for that. In fact, bad evaluation order is why I haven't yet gotten down my unification strategy. I wouldn't worry about extra opcodes when using *args or **kwargs, though; what matters is mostly avoiding extra copies. I guess a few `timeit`s will show whether I'm right or totally off-base. Most of what's needed for the error stuff is already implemented; one just needs to set the top bit flag (currently just 18) to 1 + arg_count_on_stack(), which is a trivial change. I'll push a patch for that after I'm done fiddling with the unification idea. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23318] (compiled RegEx).split gives unexpected results if () in pattern
SilentGhost added the comment: Looks like it works exactly as the docs[1] describe: re.split(r'\s*[+/;,]\s*|\s+and\s+', string) ['Dave', 'Sam', 'Jane', 'Zoe'] You're using capturing groups (parentheses) in your original regex which returns separators as part of a match. [1] https://docs.python.org/3/library/re.html#re.split -- nosy: +SilentGhost resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23318 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23282] Slightly faster set lookup
Raymond Hettinger added the comment: I had intentionally moved the entry-key == key test to be after the hash test. Unlike dicts where exact key matches are norm, sets are used for deduping (cased where keys are equal but not dups). By moving the test inside the entry-key == hash test, we reduce the number of comparisons per loop for collisions and increase the predictability of the entry-key == key branch (once the hash matches, the chance of an equality match is very high. The one part I'm looking at changing is moving the dummy test after the identity key test. However, the dummy test inside the hash test is perfectly predictable (it basicly never matches) and may be cost free. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23282 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23290] Faster set copying
Raymond Hettinger added the comment: For the time being (while I working on other parts of sets), I'm holding-off an anything that adds more lookkey variants. When the neatening-up and tweaking of search routines comes to a close, I'll revisit this one because it looks like there is a some low hanging fruit here. -- resolution: - later ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23290 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19996] httplib infinite read on invalid header
Roundup Robot added the comment: New changeset 25ecf3d0ea03 by Benjamin Peterson in branch '3.4': handle headers with no key (closes #19996) https://hg.python.org/cpython/rev/25ecf3d0ea03 New changeset 29923a9987be by Benjamin Peterson in branch 'default': merge 3.4 (#19996) https://hg.python.org/cpython/rev/29923a9987be New changeset 9a4882b12218 by Benjamin Peterson in branch '2.7': simply ignore headers with no name (#19996) https://hg.python.org/cpython/rev/9a4882b12218 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19996 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17911] traceback: add a new thin class storing a traceback without storing local variables
Robert Collins added the comment: Right, and a usable API. I believe that this will meet Guido's use case: tb = TracebackException(*sys.exc_info, lookup_lines=False) some time later if should_show_tb: lines = list(tb.format()) I'm not 100% sold on the public API being a generator, but rather than forcing it one way or the other, I'll let reviewers tell me what they think :) Performance wise, this is better, with the following times: format_stack - 5.19ms new API to extract and not format - 3.06ms new API to extract, not lookup lines and not format - 2.32ms Formatting is then 2-3ms per 500 line traceback actually formatted, which seems terribly slow, but its still better than the 8+ms trunk takes (see my earlier tests). I'll look at tuning the time to render an actual trace later, since I don't like paying high costs in unittest ;) - but AIUI this should be enough to help asyncio as is. Updated test script I used to isolate times with timeit: import traceback def recurse(count, lookup_lines=True): if count 0: return recurse(count - 1, lookup_lines=lookup_lines) if lookup_lines: return traceback.Stack.extract(traceback.walk_stack(None), lookup_lines=True) else: return traceback.Stack.extract(traceback.walk_stack(None), lookup_lines=False) def doit(): len(recurse(500)) def doit_lazy(): len(recurse(500, False)) -- Added file: http://bugs.python.org/file37862/issue17911-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23269] Tighten-up search loops in sets
Serhiy Storchaka added the comment: I have no strong preferences. This code is used very rarely and I have no any example which exposes performance differences. But how large the benefit of your patch? It doesn't make the C code more clean. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Neil Girdhar added the comment: Dict displays work. -- Added file: http://bugs.python.org/file37851/starunpack15.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Changes by Chris Angelico ros...@gmail.com: -- nosy: -Rosuav ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Neil Girdhar added the comment: All tests pass, polishing. Joshua, I'm still not sure how to do show the right error for the function call with duplicate arguments… -- Added file: http://bugs.python.org/file37853/starunpack17.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23312] google thinks the docs are mobile unfriendly
Georg Brandl added the comment: Are you ok with us copying parts of the enhancements? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23312] google thinks the docs are mobile unfriendly
Maries Ionel Cristian added the comment: Sure, take anything you want. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22286] Allow backslashreplace error handler to be used on input
R. David Murray added the comment: Looks like the buildbots aren't happy with this change. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23320] devguide should mention rules about paragraph reflow in the documentation
R. David Murray added the comment: That wording is a bit strong :). On that issue I requested a patch without the reflow, because I prefer that. Personally, I think it is in fact worth noting in the devguide that it is better for doc patches to not reflow paragraphs so that it is easier to see just the changed text in the patch file and in the 'hg diff' output. However, since reitveld can handle reflowed paragraphs, other developers my not agree with me on this. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23320 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23320] devguide should mention rules about paragraph reflow in the documentation
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23320 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__
Martin Panter added the comment: Adding a new patch that just fixes the typo error in the first patch -- Added file: http://bugs.python.org/file37859/default-ne-reflected-priority.v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23316] Incorrect evaluation order of function arguments with *args
Neil Girdhar added the comment: I assume this is the problem: dis.dis('f(*a(), b=b())') 1 0 LOAD_NAME0 (f) 3 LOAD_NAME1 (a) 6 CALL_FUNCTION0 (0 positional, 0 keyword pair) 9 LOAD_CONST 0 ('b') 12 LOAD_NAME2 (b) 15 CALL_FUNCTION0 (0 positional, 0 keyword pair) 18 CALL_FUNCTION_VAR 256 (0 positional, 1 keyword pair) 21 RETURN_VALUE — looks fine. dis.dis('f(b=b(), *a())') 1 0 LOAD_NAME0 (f) 3 LOAD_NAME1 (a) 6 CALL_FUNCTION0 (0 positional, 0 keyword pair) 9 LOAD_CONST 0 ('b') 12 LOAD_NAME2 (b) 15 CALL_FUNCTION0 (0 positional, 0 keyword pair) 18 CALL_FUNCTION_VAR 256 (0 positional, 1 keyword pair) 21 RETURN_VALUE Joshua, we could make function calls take: x lists y dictionaries one optional list z dictionaries but we as well do all the merging in advance: one optional list one optional dictionary one optional list one optional dictionary which is representable in three bits, but four is easier to decode I think. -- nosy: +neil.g ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23119] Remove unicode specialization from set objects
Raymond Hettinger added the comment: May be add the unicode specialization right in PyObject_RichCompareBool? That's a possibility but it has much broader ramifications and might or might not be the right thing to do. I'll leave that for someone else to pursue and keep my sights on sets for while. (If you do modify PyObject_RichCompareBool, take a look moving the surrounding incref/decref pair as well). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Neil Girdhar added the comment: Sounds good. I'll stop working until I see your patch. I tried to make it easy for you to implement your error idea wrt BUILD_MAP_UNPACK :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23119] Remove unicode specialization from set objects
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23119] Remove unicode specialization from set objects
Roundup Robot added the comment: New changeset 20f54cdf351d by Raymond Hettinger in branch 'default': Issue #23119: Simplify setobject by inlining the special case for unicode equality testing. https://hg.python.org/cpython/rev/20f54cdf351d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.
Martin Panter added the comment: Thanks for the reviews. I agree about the new HTTPResponse flag being a bit awkward; the HTTPResponse class should probably raise the ConnectionClosed exception in all cases. I was wondering if the the HTTPConnection class should wrap this in a PersistentConnectionClosed exception or something if it wasn’t for the first connection, now I’m thinking that should be up to the higher level user, in case they are doing something like HTTP preconnection. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3566 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11822] Improve disassembly to show embedded code objects
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23282] Slightly faster set lookup
Serhiy Storchaka added the comment: What about just removing the dummy test inside the hash test? The benefit is smaller but statistically sygnificant and always positive. $ ./python -m timeit -s a = list(range(10**6)); s1 = set(a); s2 = set(a) -- s1 = s2 Unpatched: 10 loops, best of 3: 39.3 msec per loop Patched: 10 loops, best of 3: 38.7 msec per loop -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23282 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23317] Incorrect description of descriptor invocation in Python Language Reference
R. David Murray added the comment: I believe that you are correct: special methods are looked up on the type, and this is assumed implicitly in the Class Binding description. (This was not 100% true in python2, but it is in current python3.) But the Class Binding description is correct, since if the __get__ method is *not* defined on the type (of the descriptor), the descriptor instance itself is returned (so explicitly calling type in the equivalent expression would be wrong). This is one of the most complex topics to describe in Python (I still don't have it solid in my head and I've been working with Python for years now). If we can come up with clearer wording that is good, but we've tried several times already to improve it :( I don't know what you are referring to for the 'instance binding' that makes the same 'mistake', but I suspect it is also covered by the special methods are looked up on the type rule. -- nosy: +r.david.murray versions: -Python 3.2, Python 3.3, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23317 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
R. David Murray added the comment: Oops, typoed the issue number. New changeset 3a9b1e5fe179 by R David Murray in branch '3.4': #23215: reflow paragraph. https://hg.python.org/cpython/rev/3a9b1e5fe179 New changeset 52a06812d5da by R David Murray in branch 'default': Merge: #23215: note that time.sleep affects the current thread only. https://hg.python.org/cpython/rev/52a06812d5da -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22286] Allow backslashreplace error handler to be used on input
Roundup Robot added the comment: New changeset dd8a03e98158 by Serhiy Storchaka in branch 'default': Issue #22286: The backslashreplace error handlers now works with https://hg.python.org/cpython/rev/dd8a03e98158 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23269] Tighten-up search loops in sets
Serhiy Storchaka added the comment: What timing results? There is large chance that first tested entry is empty. May be worth to move this test outside of the loop as in the set_lookup function. i = mask; may be moved to the start of the loop. -- Added file: http://bugs.python.org/file37858/tight2a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21279] str.translate documentation incomplete
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21279 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23269] Tighten-up search loops in sets
Raymond Hettinger added the comment: Reopening this with a better patch that nicely tightens the inner-loop without an algorithmic change or any downside. Currently, the entry computation adds a constant (i+j), masks it (mask) to wrap on overflow, scales it to a table index ( 4), and then does the key lookup (one memory access). These steps are sequential (not parallizeable). The patch moves the wrap-on-overflow decision out of the inner loop (adding a single, fast, predictable branch (i + LINEAR_PROBES mask). The inner-loop then simplifies to an add, fetch, and test (no masking and shifting). The generated code on Clang is very tight: LBB29_26: cmpq$0, (%rsi) # entry-key == NULL je LBB29_30 incq%rdx # j++ addq$16, %rsi# entry++ (done in parallel with the incq) cmpq$9, %rdx # j = LINEAR_PROBES jbe LBB29_26 On gcc-4.9, the loop is unrolled and we get even better code: leaq(%rbx,%rsi), %rdx # entry = table[i] cmpq$0, (%rdx) # entry.key == NULL je L223 leaq16(%rbx,%rsi), %rdx # entry = table[i+1]; cmpq$0, (%rdx) # entry.key == NULL je L223 leaq32(%rbx,%rsi), %rdx cmpq$0, (%rdx) je L223 -- resolution: rejected - status: closed - open Added file: http://bugs.python.org/file37857/tight2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23215] MemoryError with custom error handlers and multibyte codecs
Roundup Robot added the comment: New changeset 3a9b1e5fe179 by R David Murray in branch '3.4': #23215: reflow paragraph. https://hg.python.org/cpython/rev/3a9b1e5fe179 New changeset 52a06812d5da by R David Murray in branch 'default': Merge: #23215: note that time.sleep affects the current thread only. https://hg.python.org/cpython/rev/52a06812d5da -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23215 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
Roundup Robot added the comment: New changeset 55ad65c4f9e2 by R David Murray in branch '3.4': #23251: Note that time.sleep affects the calling thread only. https://hg.python.org/cpython/rev/55ad65c4f9e2 New changeset 5e01c68cabbf by R David Murray in branch '2.7': #23251: note that time.sleep affects the current thread only. https://hg.python.org/cpython/rev/5e01c68cabbf New changeset 5db28a3199b2 by R David Murray in branch '2.7': #23251: Reflow paragraph. https://hg.python.org/cpython/rev/5db28a3199b2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
R. David Murray added the comment: Thanks, Akira, but I did not use your patch, since it still had the paragraph reflow in it. -- resolution: - fixed stage: commit review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23215] MemoryError with custom error handlers and multibyte codecs
R. David Murray added the comment: Oops, typoed the issue number. That should have been 23251. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23215 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23320] devguide should mention rules about paragraph reflow in the documentation
New submission from Akira Li: It is suggested in https://bugs.python.org/issue23251 that only a core Python developer may reflow paragraphs while submitting patches for the Python documentation. It should be codified in devguide: I haven't found the word *reflow* in it. -- components: Devguide messages: 234692 nosy: akira, ezio.melotti priority: normal severity: normal status: open title: devguide should mention rules about paragraph reflow in the documentation type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23320 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com