[issue28766] Remove the semicolon in source code

2016-11-22 Thread Yuwei Ba
Yuwei Ba added the comment: Okay. Thanks you two fellows! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-22 Thread Xiang Zhang
Xiang Zhang added the comment: v2 applies the suggestions. -- priority: low -> normal versions: +Python 3.7 Added file: http://bugs.python.org/file45597/issue27414_v2.patch ___ Python tracker __

[issue28766] Remove the semicolon in source code

2016-11-22 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Mathieu: "For consistency, all header values should be str." Xiang: issue27414_v2.patch: Doc/library/http.server.rst "*keyword* and *value* should both be :class:`str`." I'm sorry, but I don't understand the whole point of this issue. The current code works, I

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Ah, on IRC Xiang told me that send_header("Connection", 1) raises an error. Right, *this* specific case raises an error. But I don't think that it's worth to require text for HTTP header values. If you consider that it's a shame, Python should handle this corner

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: I'm ok to close this bug :-) > As long as we are restricted by backwards compatibility, it will be hard to > find a hack-free solution. The ideal solution IMO is to re-create > _warnings.filters from scratch when _warnings is reloaded, but such a change > wou

[issue28769] Make PyUnicode_AsUTF8 returning "const char *" rather of "char *"

2016-11-22 Thread Martin Panter
Martin Panter added the comment: No opinion if this is a good change to make, but I left some review suggestions -- nosy: +martin.panter ___ Python tracker ___ __

[issue28763] Use en-dashes for ranges in docs

2016-11-22 Thread Mark Dickinson
Mark Dickinson added the comment: > It is recommended to use an em-dash instead of a hyphen for numerical ranges. Who makes that recommendation? Did you mean en-dash rather than em-dash? -- nosy: +mark.dickinson ___ Python tracker

[issue28769] Make PyUnicode_AsUTF8 returning "const char *" rather of "char *"

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Hum, I would like to discuss this topic on python-dev. Changing PyUnicode_AsUTF8() alone is fine, but the issue with changing return type is that the const has to be propagated to callers, and then to callers of callers, etc. For example, if your patch, you ca

[issue28769] Make PyUnicode_AsUTF8 returning "const char *" rather of "char *"

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Hum, sorry, my opinion on const is not obvious in my previous message: I like const :-) I want to use const everywhere! I still "believe" (I don't know if it's true or not) that const helps a lot compilers to optimize the code. I don't know if it helps for a s

[issue28763] Use en-dashes for ranges in docs

2016-11-22 Thread Mark Dickinson
Mark Dickinson added the comment: > Did you mean en-dash rather than em-dash? Ah, judging by the title and the patch, you did. :-) Phew! Now I can delete the long post I had citing multiple sources for using en-dashes (not em-dashes) for numeric ranges... -- _

[issue28763] Use en-dashes for ranges in docs

2016-11-22 Thread Martin Panter
Martin Panter added the comment: My Australian Style Manual says to use en rules for spans of figures etc. Wikipedia mentions some other guides: ; apparently some prefer the hyphen. That is why I said it is a style issue, not a black and whi

[issue28763] Use en-dashes for ranges in docs

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, yes, I meant en-dashes of course. I read this recommendation in many books about TeX, and also in other typographic resources. In modern fonts a hyphen-minus (U+002D) is shorter than digits in modern fonts and is placed lower than the middle of digits

[issue28004] Optimize bytes.join(sequence)

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Ok, I agree that it's not worth it to optimize bytes.join(list of byte strings). Code is already fast enough. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: dict_gdb2.patch LGTM. Can you please follow Ned's instructions to get this change merged into 3.6 final? python-gdb.py is an important tool and it's completly broken. The patch cannot make python-gdb.py worse :-D (More seriously, it fixes python-gdb.py.)

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Martin Panter
Martin Panter added the comment: https://mail.python.org/pipermail/python-checkins/2016-November/147171.html test_collections leaked [0, 0, 7] memory blocks, sum=7 test_contextlib leaked [38, 38, 38] references, sum=114 test_contextlib leaked [13, 12, 12] memory blocks, sum=37 test_descr leaked

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Martin Panter
Martin Panter added the comment: Hmm, it seems I already discovered this leak six months ago: https://bugs.python.org/review/27100 -- ___ Python tracker ___

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: So, the API is implemented, but I leave it as private because nobody tried it whereas I was waiting for a feedback from numpy at least. If you want a public API in Python 3.7, please tell if the API fits your use case and if the implementation works.

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2016-11-22 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Christian, Senthil, would appreciate if I got another round of feedback (in the review thread) :-) -- nosy: +orsenthil ___ Python tracker _

[issue4347] Circular dependency causes SystemError when adding new syntax

2016-11-22 Thread Martin Panter
Martin Panter added the comment: I’m not sure I understand your questions Brett (Which tokenizer? What rebuilding?), but I will try to explain some relevant parts. My main goal is to add a makefile dependency of parsetok.o on $(GRAMMAR_H). In Python 3, that is easy, and (I realize now) my prob

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: FYI I wrote an article about this issue: https://haypo.github.io/analysis-python-performance-issue.html Sadly, it seems like I was just lucky when adding __attribute__((hot)) fixed the issue, because call_method is slow again! * acde821520fc (Nov 21): 16.3 ms

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread INADA Naoki
INADA Naoki added the comment: https://mail.python.org/pipermail/python-committers/2016-November/004065.html > The 3.6 branch in the cpython repo is now available again but, as noted, > *only* for reviewed release critical fixes appropriate for the 3.6.0 final > and for final 3.6.0 doc updates!

[issue28763] Use en-dashes for ranges in docs

2016-11-22 Thread Mark Dickinson
Mark Dickinson added the comment: > I read this recommendation in many books about TeX, and also in other > typographic resources. Same here. I'd add Apple's Style Guide and the Chicago Manual of Style to that list. -- ___ Python tracker

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f6fb9e47f6b by INADA Naoki in branch '3.6': Issue #28023: Fix python-gdb.py didn't support new dict implementation https://hg.python.org/cpython/rev/4f6fb9e47f6b New changeset c51045920410 by INADA Naoki in branch 'default': Issue #28023: Fix pytho

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-22 Thread INADA Naoki
INADA Naoki added the comment: Wow. It's sad that tagged version is accidentally slow... I want to reproduce it and check `perf record -e L1-icache-load-misses`. But IaaS (EC2, GCE, Azure VM) doesn't support CPU performance counter. -- ___ Python tra

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: test_gdb failed on a lot of buildbots. Examples: * http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/2089 * http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.6/builds/330 * http://buildbot.python.org/all/builders/x86%20Gentoo%20

[issue28770] Update python-gdb.py for fastcalls

2016-11-22 Thread STINNER Victor
New submission from STINNER Victor: Python 3.6 has a new C calling convention: "fast calls". python-gdb.py was disabled when compact dict was merged, see issue #27350. Sadly, I missed that fast calls also broke python-gdb.py. Attached patch fixes python-gdb.py, but I failed to fix test_gdb.py.

[issue28770] Update python-gdb.py for fastcalls

2016-11-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue28770] Update python-gdb.py for fastcalls

2016-11-22 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file45599/gdb_fastcall-2.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: 2016-11-22 12:07 GMT+01:00 INADA Naoki : > I want to reproduce it and check `perf record -e L1-icache-load-misses`. > But IaaS (EC2, GCE, Azure VM) doesn't support CPU performance counter. You don't need to go that far to check performances: just run call_method

[issue28771] Update documented signatures of tp_get/setattr

2016-11-22 Thread Martin Panter
New submission from Martin Panter: https://docs.python.org/3.7/c-api/typeobj.html#c.PyTypeObject.tp_getattr tp_getattr and tp_setattr take a non-const char pointer in their signatures, but the documentation points to PyObject_GetAttrString() etc which were changed to take const char pointers a

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Naoki: "Wow. It's sad that tagged version is accidentally slow..." If you use PGO compilation, for example use "./configure --enable-optimizations" as suggested by configure if you don't enable the option, you don't get the issue. I hope that most Linux distrib

[issue26072] pdb fails to access variables closed over

2016-11-22 Thread Chun-Yu Tseng
Chun-Yu Tseng added the comment: Hey xdegaye, have you confirmed it? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue28768] Warning: implicit declaration of function '_setmode'

2016-11-22 Thread Martin Panter
Martin Panter added the comment: The Modules/main.c change at least looks reasonable as a bug fix. In the long term, it would be nice to clean up some of the conditions for including . Currently it is unconditional via PC/pyconfig.h, configure.ac optionally enables HAVE_IO_H, and there are var

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9b974f988c95 by Victor Stinner in branch '3.6': Issue #28023: Fix python-gdb.py on old GDB versions https://hg.python.org/cpython/rev/9b974f988c95 -- ___ Python tracker

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-22 Thread Martin Panter
Changes by Martin Panter : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list maili

[issue28771] Update documented signatures of tp_get/setattr

2016-11-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue28768] Warning: implicit declaration of function '_setmode'

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: include-io.h.patch LGTM. 2.7-include-io.h.patch: Cygwin is not currently officially supported in CPython. I suggest to focus efforts on supporting Cygwin in the default branch (future 3.7) only, as we are doing with Android. -- nosy: +haypo _

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-22 Thread INADA Naoki
INADA Naoki added the comment: I setup Ubuntu 14.04 on Azure, built python without neither PGO nor LTO. But I failed to reproduce it. @haypo, would you give me two binaries? $ ~/local/py-2a143/bin/python3 -c 'import sys; print(sys.version)' 3.7.0a0 (default:2a14385710dc, Nov 22 2016, 12:02:34)

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread INADA Naoki
INADA Naoki added the comment: Thanks a lot! I hope I can run test on multiple environment before merge, after we move to Github. -- ___ Python tracker ___ _

[issue28772] Bus error in Python 3.6.0beta

2016-11-22 Thread Stefan Scherfke
New submission from Stefan Scherfke: Hi all, I am trying to build a custom Conda installer for Python 3.6.0b4. I could successfully build an run Python. However, when I run the generated Conda installer, it dies with a "Bus error". It happens when Conda's meta-installer script tries to replac

[issue28773] typing.FrozenSet missing in documentation.

2016-11-22 Thread Manuel Krebber
New submission from Manuel Krebber: The typing.FrozenSet is missing in the typing module documentation. I have attached a patch that adds it similar to the typing.Set which is already in the documentation. -- components: Library (Lib) files: frozenset-doc.patch keywords: patch messages

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: > But I failed to reproduce it. Hey, performance issues with code placement is a mysterious secret :-) Nobody understands it :-D The server runner the benchmark is a Intel Xeon CPU of 2011. It seems like code placement issues are more important on this CPU than

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Ah nice, it seems like test_gdb pass again. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: + && left->codesize && right->codesize); There is a typo. Should be: + && left->codesize == right->codesize); -- status: closed -> open ___ Python tracker _

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: While we are here, it perhaps worth to add a fast path for self == other. -- ___ Python tracker ___ __

[issue28635] Update What's New for 3.6

2016-11-22 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: https://docs.python.org/3.6/whatsnew/3.6.html#changes-in-python-command-behavior seems appropriate. -- ___ Python tracker ___

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread Xiang Zhang
New submission from Xiang Zhang: unicode_encode_ucs1 now recognizes as many characters as it can one time instead of one character a time. But the unicodeerror positions still only count 1(the second time). A similar problem reported in #28561. -- components: Interpreter Core files: un

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b43d15fd2d7 by Victor Stinner in branch '3.6': Issue #28727: Fix typo in pattern_richcompare() https://hg.python.org/cpython/rev/6b43d15fd2d7 New changeset c2cb70c97163 by Victor Stinner in branch '3.6': Issue #28727: Optimize pattern_richcompare()

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "&& left->codesize && right->codesize)" Ooops! Fixed! "While we are here, it perhaps worth to add a fast path for self == other." Done. -- status: open -> closed ___ Python tracker

[issue27030] Remove deprecated re features

2016-11-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: FWIW, this breaks Mailman 3.1 (and probably 2.1) -- nosy: +barry ___ Python tracker ___ ___ Python-

[issue27030] Remove deprecated re features

2016-11-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Specifically, point #2; undefined combinations of \ + ASCII becoming an error. -- ___ Python tracker ___ __

[issue27030] Remove deprecated re features

2016-11-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue28635] Update What's New for 3.6

2016-11-22 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: On second thought `-VV` isn't really a porting change, so probably a new section under "Build and C API Changes". Something like "Other Improvements". -- ___ Python tracker

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list ma

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Thanks Naoki for the fix ;-) gdb scripts are a little bit weird sometimes, and the API has subtle changes in each minor GDB release :-/ -- ___ Python tracker _

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: If I understood correctly, the patch fix the ASCII encoder to handle correctly error handlers which return non-ASCII text replacement strings. Right? I am not aware of such error handler, so I guess that it's a more a theorical fix? I really hate the code (in

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread STINNER Victor
Changes by STINNER Victor : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But it is too late for beta 4. I'll commit the patch either after releasing 3.6.0 or in the 3.7 branch only. And while we are here I noticed that handling non-ASCII replacement string could be simpler. -- Added file: http://bugs.python.org/fi

[issue27030] Remove deprecated re features

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could Mailman be fixed? Undefined combinations of \ + ASCII emitted warnings in 3.5. And now they emit warnings even just in string literals (issue27364). If Mailman use undefined escape combinations, it could suffer from issue27364 too. --

[issue28772] Bus error in Python 3.6.0beta

2016-11-22 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: A common cause of bus error is mis-aligned memory access. Which architecture are you on and how did you compile Python? (compiler flags, etc.) FWIW, configure python with --with-pydebug may bring you more debugging information -- nosy: +Chi Hsuan Yen

[issue22298] Lib/warnings.py _show_warning does not protect against being called with a file like object which is closed

2016-11-22 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue18943] argparse: default args in mutually exclusive groups

2016-11-22 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue4347] Circular dependency causes SystemError when adding new syntax

2016-11-22 Thread Brett Cannon
Brett Cannon added the comment: Ah, the fact parsetok.c gets compiled twice into different object files is the detail I was overlooking. Thanks for the clarification. -- ___ Python tracker _

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Martin, do you want to make a patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28775] Option to set startup directory in IDLE

2016-11-22 Thread Raymond Hettinger
New submission from Raymond Hettinger: In my Python courses, Windows users frequently ask about how to set a startup directory so they can run from their Desktop or a custom directory. The usual answer is to create a short-cut and then alter the properties on that shortcut. However, other p

[issue27030] Remove deprecated re features

2016-11-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 22, 2016, at 04:13 PM, Serhiy Storchaka wrote: >Could Mailman be fixed? Undefined combinations of \ + ASCII emitted warnings >in 3.5. And now they emit warnings even just in string literals >(issue27364). If Mailman use undefined escape combinations, it

[issue27030] Remove deprecated re features

2016-11-22 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +ned.deily priority: normal -> release blocker status: closed -> open ___ Python tracker ___ ___

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg281495 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file45604/fix_with_refleak.diff ___ Python tracker ___ ___ Python-bugs-list

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, do you care to double check this patch? Martin, I'll leave the async_with for Yuri to fix-up. I believe that is his code, so he should do the honors. -- assignee: rhettinger -> serhiy.storchaka nosy: +serhiy.storchaka, yselivanov _

[issue27030] Remove deprecated re features

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This part of the documentation was just overlooked. Issue28450 is opened for this. -- ___ Python tracker ___

[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe just remove the phrase "Unknown escapes such as \& are left alone"? -- ___ Python tracker ___ __

[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2016-11-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I disagree that the documentation is at fault. This is known to break existing code, e.g. http://bugs.python.org/msg281496 I think it's not correct to change the documentation but leave the error-raising behavior for 3.6 because the deprecation was never doc

[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The deprecation was documented in 3.5. https://docs.python.org/3.5/library/re.html#re.sub Deprecated since version 3.5, will be removed in version 3.6: Unknown escapes consist of '\' and ASCII letter now raise a deprecation warning and will be forbidden in

[issue27030] Remove deprecated re features

2016-11-22 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- priority: release blocker -> normal status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The reason for disallowing some undefined escapes is the same as in pattern strings: this would allow as to introduce new special escape sequences. For example: * \N{...} for named character escape. * Perl and extended PCRE use \L and \U for making lower and

[issue27030] Remove deprecated re features

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you insist I could revert converting warnings to errors (only in replacement string or all?) in 3.6. But I think they should left errors in 3.7. The earlier we make undefined escapes the errors, the earlier we can define new special escape sequences witho

[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2016-11-22 Thread Matthew Barnett
Matthew Barnett added the comment: @Barry: repl already supports some escapes, e.g. \g for named groups, although not \xXX et al, so deprecating unknown escapes like in the pattern makes sense to me. BTW, the regex module already supports \xXX, \N{XXX}, etc. -- __

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch LGTM. -- assignee: serhiy.storchaka -> rhettinger ___ Python tracker ___ ___ Python-bugs

[issue28573] Python 3.6.0b4 64-bit has no sys._mercurial info

2016-11-22 Thread Steve Dower
Steve Dower added the comment: Attaching the patch here for visibility. In short, rather than relying on PATH to find hg.exe, we now precalculate it and pass it in to the build. This completely avoids the problem where modifying PATH multiple times for different builds was causing Mercurial to

[issue28573] Python 3.6.0b4 64-bit has no sys._mercurial info

2016-11-22 Thread Steve Dower
Steve Dower added the comment: Ned approved this last night on IRC, so now it's in. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue28573] Python 3.6.0b4 64-bit has no sys._mercurial info

2016-11-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 089886be06df by Steve Dower in branch '3.6': Issue #28573: Missing sys._mercurial info and other build issues. https://hg.python.org/cpython/rev/089886be06df New changeset d0958078bcb6 by Steve Dower in branch 'default': Issue #28573: Missing sys._m

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 749c5d6c4ba5 by Raymond Hettinger in branch '3.6': Issue #27100: Fix ref leak https://hg.python.org/cpython/rev/749c5d6c4ba5 -- ___ Python tracker ___

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yuri, do you want to do the same for async-with? -- assignee: rhettinger -> yselivanov priority: release blocker -> normal ___ Python tracker ___

[issue27030] Remove deprecated re features

2016-11-22 Thread R. David Murray
R. David Murray added the comment: There is still the argument that we shouldn't break 2.7 compatibility unnecessarily until 2.7 is out of maintenance. That is: warnings are good, removals are bad. (I haven't read through this issue, so I may be off base.) -- nosy: +r.david.murray _

[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2016-11-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 22, 2016, at 07:28 PM, Serhiy Storchaka wrote: >The reason for disallowing some undefined escapes is the same as in pattern >strings: this would allow as to introduce new special escape sequences. I'll note that technically speaking, you can still intro

[issue28776] Duplicate method names should be an error

2016-11-22 Thread Peter Inglesby
New submission from Peter Inglesby: It should be an error for a class to define a method twice. That is, Python should raise an exception when the following code is loaded: class C: def m(self): # do something def m(self): # do something I have just witnessed a beginner

[issue28773] typing.FrozenSet missing in documentation.

2016-11-22 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Manuel. Looks like FrozenSet is in PEP 484 and has been added to typing.__all__ in https://github.com/python/typing/pull/261 (already synced with the stdlib version of typing module) The patch looks good to me. Adding Guido to nosy list fo

[issue28776] Duplicate method names should be an error

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Redefine a method is a common practice indirectly using decorators: @staticmethod def method(): pass is like: def method(): pass method = staticmethod(method) So you can clarify what do you mean by "redefining"? Some linters already can such common m

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: > LGTM. But it is too late for beta 4. I'll commit the patch either after > releasing 3.6.0 or in the 3.7 branch only. Right now, I suggest to only commit into 3.7. Such minor bug can wait for Python 3.6.1. > And while we are here I noticed that handling non

[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2016-11-22 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue28776] Duplicate method names should be an error

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Without modifying the language, I guess that it's already technically possible to implement that in Python 3 in an application. Using the __prepare__() method of a metaclass and a custom dict subclass, I think that you can build what you want. I mean that you

[issue28776] Duplicate method names should be an error

2016-11-22 Thread R. David Murray
R. David Murray added the comment: Yes, IMO this is something that needs to go into a linter, not Python itself. The dynamic nature of the class dictionary is too important to many programs to change it at this point. -- nosy: +r.david.murray ___ P

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not a bug itself. It seems to me that at worst case the current code is less efficient with non-standard error handler than it can be. I would commit the path to the 3.6 branch before beta 4 as it is nice and simple additional to already added optimi

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: > No need to backport it to 3.6 (if I didn't miss something). Sorry, I misunderstood the issue. It's an enhancement, so for 3.7 only. Right, 3.6 is now almost frozen, only major bug fixes blocking the release are accepted now (in short). Regular bugfixes shoul

[issue28752] datetime object fails to restore from reduction

2016-11-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks all! So pleased to see this fixed. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

  1   2   >