[issue23749] asyncio missing wrap_socket (starttls)

2016-06-27 Thread 박세원
박세원 added the comment: https://bugs.python.org/review/23749/#msg1 yuri, did you saw guido added review on your patch? -- nosy: +박세원 ___ Python tracker

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread Martin Panter
Martin Panter added the comment: Forgot to say I reviewed invalid_stdlib_escapes_1.patch the other day and can’t see any problems. -- ___ Python tracker

[issue27380] IDLE: add base Query dialog with ttk widgets

2016-06-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Revised load_module and new query.ModuleName work, including when invoked by open_class_browser. Tests are need for both. One problem was that using withdrawn root rather than a text as parent caused query.Query to not appear, so wait_window could not be

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread Emanuel Barry
Emanuel Barry added the comment: Just brought this to the attention of the code-quality mailing list, so linter maintainers should (hopefully!) catch up soon. Also new patch, I forgot to add '\c' in the tests. -- Added file:

[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-27 Thread Andre Merzky
Andre Merzky added the comment: I can confirm that the patch provided by Victor addresses the problem. It seems to be against the current HEAD -- is there a chance that this will be backported to 2.7 (which is what I need to use)? Thanks! Andre. --

[issue27403] os.path.dirname doesn't handle Windows' URNs correctly

2016-06-27 Thread Eryk Sun
Eryk Sun added the comment: Paths starting with "\\.\" (or "//./") and "\\?\" are not UNC paths. I've provided some explanations and examples below, and I also encourage you to read "Naming Files, Paths, and Namespaces": https://msdn.microsoft.com/en-us/library/aa365247 "\\.\" is the

[issue27380] IDLE: add base Query dialog with ttk widgets

2016-06-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks, I will switch to True and False. I am aware of the possibility of separately importing the constants, but like some others, I prefer the strings. Compile-time checking is a good point, especially with no run tests. In this case, test_query has 100%

[issue27403] os.path.dirname doesn't handle Windows' URNs correctly

2016-06-27 Thread Dustin Oprea
Dustin Oprea added the comment: Thank you for your elaborate response. I appreciate knowing that "\\server\share" could be considered as the "drive" portion of the path. I'm having trouble determining if "\\?\" is literally some type of valid UNC prefix or you're just using it to represent

[issue27255] More opcode predictions

2016-06-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: The BUILD_SLICE pairing with BINARY_SUBSCR has a tight conceptual linkage with the lookup case dominating use patterns over slice deletion and slice assignment. IIRC, I passed on that pairing long ago because even though the predictive power was good, it

[issue27403] os.path.dirname doesn't handle Windows' URNs correctly

2016-06-27 Thread Eryk Sun
Eryk Sun added the comment: dirname() is implemented via split(), which begins by calling splitdrive(). The 'drive' for a UNC path is the r"\\server\share" component. For example: >>> path = r'\\server\share\folder\file' >>> os.path.splitdrive(path) ('server\\share',

[issue27403] os.path.dirname doesn't handle Windows' URNs correctly

2016-06-27 Thread Eryk Sun
Changes by Eryk Sun : -- Removed message: http://bugs.python.org/msg269406 ___ Python tracker ___

[issue27173] Modern Unix key bindings for IDLE

2016-06-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I rebooted and reran build in case this was another funny heisenbug. It isn't. Before patch, start 3.6 repository IDLE. Click Options, Configure IDLE, and Keys tab. Look at 'Use a Custom Key Set'. It says 'Terry', which is correct. After patch: repeat. It

[issue27403] os.path.dirname doesn't handle Windows' URNs correctly

2016-06-27 Thread Eryk Sun
Eryk Sun added the comment: dirname() is implemented via split(), which begins by calling splitdrive(). The 'drive' for a UNC path is the r"\\server\share" component. For example: >>> path = r'\\server\share\folder\file' >>> os.path.splitdrive(path) ('server\\share',

[issue27404] Misc/NEWS: add [Security] prefix to Python 3.5.2 changelog

2016-06-27 Thread STINNER Victor
New submission from STINNER Victor: As discussed on the Security-SIG mailing list, changes related to security should be prefixed by [Security]: https://mail.python.org/pipermail/security-sig/2016-June/03.html Here is a first patch for Python 3.5.2 (and the future 3.5.3) changelog.

[issue27403] os.path.dirname doesn't handle Windows' URNs correctly

2016-06-27 Thread Dustin Oprea
New submission from Dustin Oprea: Notice that os.path.dirname() returns whatever it is given if it is given a URN, regardless of slash-type. Oddly, you have to double-up the forward-slashes (like you're escaping them) in order to get the correct result (if you're using forward-slashes).

[issue27352] Bug in IMPORT_NAME

2016-06-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Victor! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue27352] Bug in IMPORT_NAME

2016-06-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5063a82f490 by Serhiy Storchaka in branch 'default': Issue #27352: Fixed an error message in a test. https://hg.python.org/cpython/rev/e5063a82f490 -- ___ Python tracker

[issue27352] Bug in IMPORT_NAME

2016-06-27 Thread STINNER Victor
STINNER Victor added the comment: You broke Python! Example: http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/4853/steps/test/logs/stdio == FAIL: test_importfrom (test.test_ast.ASTValidatorTests)

[issue22557] Local import is too slow

2016-06-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: faster_import_pkg.patch optimizes also an import of names with dots. $ ./python -m timeit 'import os.path' Unpatched:10 loops, best of 3: 2.08 usec per loop faster_import_5.patch:100 loops, best of 3: 1.79 usec per loop

[issue27401] Wrong FTP links in 3.5.2 installer

2016-06-27 Thread Zachary Ware
Zachary Ware added the comment: Yep, looks fine now. I suspect from a couple of commits that Steve just did he did in fact have to purge cache :) Thanks, Steve! -- status: open -> closed ___ Python tracker

[issue27401] Wrong FTP links in 3.5.2 installer

2016-06-27 Thread Larry Hastings
Larry Hastings added the comment: I can independently confirm that the "amd64" directory is in the proper place, and all relevant files & directories look like they have the correct permissions. I did that by logging in to the appropriate server and nosing around. Also, the web link works

[issue27401] Wrong FTP links in 3.5.2 installer

2016-06-27 Thread Steve Dower
Steve Dower added the comment: Should be good now. Thanks for the heads-up! -- resolution: -> fixed stage: -> resolved ___ Python tracker ___

[issue27352] Bug in IMPORT_NAME

2016-06-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Brett. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue27352] Bug in IMPORT_NAME

2016-06-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset e3164c9edb0b by Serhiy Storchaka in branch 'default': Issue #27352: Correct the validation of the ImportFrom AST node and simplify https://hg.python.org/cpython/rev/e3164c9edb0b -- nosy: +python-dev ___

[issue27401] Wrong FTP links in 3.5.2 installer

2016-06-27 Thread Steve Dower
Steve Dower added the comment: Actually, the correct link is amd64/, but it didn't upload on my second try, apparently. Or somehow disappeared... Fixing that now. -- ___ Python tracker

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-27 Thread R. David Murray
R. David Murray added the comment: No, I'm talking about the threading docs, not the encoding docs. I think that's the only place it matters. Specifically, in the section that I linked to, in the bullet point that warns against launching threads on import, it can note that even if you try

[issue27255] More opcode predictions

2016-06-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Raymond. Committed without the prediction from DUP_TOP_TWO to BINARY_SUBSCR. What are you think about following highly predictive pairs? 1. From UNPACK_SEQUENCE to STORE_FAST with 96.5% probability. This is the 15th of most common pairs. It is

[issue27402] Sequence example in typing module documentation does not typecheck

2016-06-27 Thread Michael Lee
Michael Lee added the comment: Whoops, forgot the link to the error in the docs: https://docs.python.org/3/library/typing.html#typing.List -- ___ Python tracker

[issue27402] Sequence example in typing module documentation does not typecheck

2016-06-27 Thread Michael Lee
New submission from Michael Lee: In the documentation for the `typing` module, the [entry for the `List` type][0] uses the following example to help demonstrate when to use `Sequence` vs `List`: T = TypeVar('T', int, float) def vec2(x: T, y: T) -> List[T]: return [x, y]

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread Emanuel Barry
Emanuel Barry added the comment: Easing transition is always a good idea. I'll contact the PyCQA people later today when I'm back home. On afterthought, it makes sense to wait more than two release cycles before making this an error. I don't really have a strong opinion when exactly that

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-27 Thread STINNER Victor
STINNER Victor added the comment: > Maybe it is worth adding a warning to that section of the 2.7 docs about > implicit imports in general and encode/decode in particular? Ok to add a note to str.encode and str.decode methods to explain that an import is needed the first time that an encoding

[issue27401] Wrong FTP links in 3.5.2 installer

2016-06-27 Thread Zachary Ware
Changes by Zachary Ware : -- assignee: -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware priority: normal -> high title: Wrong FTP links in 5.3.2 installer -> Wrong FTP links in 3.5.2 installer type: crash -> behavior

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-27 Thread Brett Cannon
Brett Cannon added the comment: Adding a note to the docs sounds reasonable. -- ___ Python tracker ___ ___

[issue27352] Bug in IMPORT_NAME

2016-06-27 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- stage: patch review -> commit review ___ Python tracker ___ ___

[issue27401] Wrong FTP links in 5.3.2 installer

2016-06-27 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list

[issue27401] Wrong FTP links in 5.3.2 installer

2016-06-27 Thread Jarod Brennfleck
New submission from Jarod Brennfleck: So far, the only installers tested is the Python 5.3.2 x86 and x86_64 installers. When selecting customise install, the installer is unable to gather the files required, because the installer is looking for them in:

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread Guido van Rossum
Guido van Rossum added the comment: I think ultimately it has to become an error (otherwise I wouldn't have agreed to the warning, silent or not). But because there's so much 3rd party code that depends on it we indeed need to take "several" releases before we go there. Contacting the PyCQA

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2016-06-27 Thread Denny Weinberg
Denny Weinberg added the comment: Just to be clear: The error happens after these steps: 1. Call strptime 2. Call cpython function "Py_Finalize" and "Py_Initialize" 3. Call strptime again Now we get the error "attribute of type 'NoneType' is not callable" --

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2016-06-27 Thread Denny Weinberg
New submission from Denny Weinberg: After calling Py_Finalize and Py_Initialize I get the message "attribute of type 'NoneType' is not callable" on the datetime.strptime method. Example: from datetime import datetime s = '20160505 16' refdatim = datetime.strptime(s, '%Y%m%d %H%M%S') The

[issue17408] second python execution fails when embedding

2016-06-27 Thread Denny Weinberg
Denny Weinberg added the comment: Ok, thank you very much for your comments. See Issue27400 -- ___ Python tracker ___

[issue17408] second python execution fails when embedding

2016-06-27 Thread R. David Murray
R. David Murray added the comment: The interpreter is not crashing in your case, so this is a mostly-unrelated problem. (The part that is related is that it is triggered by module finalization.) As Berker said, please open a new issue, but be warned that it may get closed as a being

[issue17408] second python execution fails when embedding

2016-06-27 Thread Berker Peksag
Berker Peksag added the comment: We don't re-open old issues (this was closed more than 3 years ago). Please open a new issue and provide a minimal reproducer. Thanks! -- nosy: +berker.peksag ___ Python tracker

[issue27399] ChainMap.keys() is broken

2016-06-27 Thread R. David Murray
Changes by R. David Murray : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread R. David Murray
R. David Murray added the comment: Yes, this change is likely to break a lot of code, so an extended deprecation period (certainly longer than 3.7, which Guido has already mandated) is the minimum). Guido hasn't agreed to making it an error yet, as far as I can see ;) --

[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-06-27 Thread R. David Murray
R. David Murray added the comment: This appears to be a bug in b64decode. It should not be raising that error if validate=False, as it is in the code being executed during the test case. It's not that b64decode is ignoring the validate argument; the error appears to be data-dependent. I

[issue17408] second python execution fails when embedding

2016-06-27 Thread Denny Weinberg
Denny Weinberg added the comment: Can we please reopen this issue? -- ___ Python tracker ___ ___

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread STINNER Victor
STINNER Victor added the comment: @ebarry: To move faster, you should also worker with linters (pylint, pychecker, pyflakes, pycodestyle, flake8, ...) to log a warning to help projects to be prepared this change. linters are used on Python 2-only projects, so it will help them to be prepared

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread Emanuel Barry
Emanuel Barry added the comment: I think ultimately a SyntaxError should be fine. I don't know *when* it becomes appropriate to change a warning into an error; I was thinking 3.7 but, as Serhiy said, there's no rush. I think waiting five release cycles is overkill though, that means the error

[issue27399] ChainMap.keys() is broken

2016-06-27 Thread Zahari Dim
Changes by Zahari Dim : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-27 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file43564/64bit_support_for_zlib_v8.patch ___ Python tracker ___

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-27 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file43565/64bit_support_for_zlib_v8.patch ___ Python tracker ___

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-27 Thread Xiang Zhang
Xiang Zhang added the comment: Make v8 patch consistent with the latest changeset. -- Added file: http://bugs.python.org/file43564/64bit_support_for_zlib_v8.patch ___ Python tracker

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-27 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file43563/64bit_support_for_zlib_v8.patch ___ Python tracker ___

[issue27399] ChainMap.keys() is broken

2016-06-27 Thread Zahari Dim
New submission from Zahari Dim: When trying to see if the keys() of a collections.ChainMap object are empty, it tries to compute the hash of the dicts that compose the ChainMap, giving rise to an error: In [1]: from collections import ChainMap In [2]: m = ChainMap([{'a':1}, {'b':2}]) In

[issue27350] Compact and ordered dict

2016-06-27 Thread INADA Naoki
INADA Naoki added the comment: And Python benchmark result is here. https://gist.github.com/methane/e7a2ae389ca13905508905f5fa4ad46c pickup --- ### call_method_slots ### Min: 0.282221 -> 0.266215: 1.06x faster Avg: 0.282379 -> 0.266448: 1.06x faster Significant (t=780.35) Stddev: 0.00015

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: DeprecationWarning is used when we want to remove a feature. It becomes an error in the future. FutureWarning is used when we want change the meaning of a feature instead of removing it. For example re.split(':*', 'a:bc') emits a FutureWarning and returns

[issue27350] Compact and ordered dict

2016-06-27 Thread INADA Naoki
INADA Naoki added the comment: Last patch I've posted implements "strict ordering rule" on key sharing dict. * Insertion order should be strictly equal to order in shared key. If insertion position is not equal to ma_used, convert it to combined form. * Deleting from split table is

[issue27393] Command to activate venv in Windows has wrong path

2016-06-27 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Eryk. By the way, there is no need to change the state of 'resolution' and 'stage' fields. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue27393] Command to activate venv in Windows has wrong path

2016-06-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset b82149953a8c by Berker Peksag in branch '3.5': Issue #27393: Fix escaping of C:\ too https://hg.python.org/cpython/rev/b82149953a8c New changeset e1a0582896d6 by Berker Peksag in branch 'default': Issue #27393: Merge from 3.5

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-27 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file43561/64bit_support_for_zlib_v8.patch ___ Python tracker ___

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-27 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file43563/64bit_support_for_zlib_v8.patch ___ Python tracker ___

[issue27398] configure warning for Python 3.5.2 during compilation

2016-06-27 Thread Martin Panter
Martin Panter added the comment: FWIW adding a blank fourth argument in configure.ac silences this warning (and speeds up the configure run by 7%, or 4 s). But I don’t want to become an Autoconf nerd and I don’t know if this change could have negative consequences on other platforms (e.g.

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-27 Thread Xiang Zhang
Xiang Zhang added the comment: This is the v8 patch. It does two things: [1] Apply Martin's comment about decompressobj.decompress so when user passes in PY_SSIZE_T_MAX and there is enough memory, no error will be raised. [2] Now decompressobj.flush can still work even if

[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-27 Thread STINNER Victor
STINNER Victor added the comment: Attached interrupt_main.patch fixes for _thread.interrupt_main(): raise an exception if the SIGINT signal is ignored (SIG_IGN) or not handled by Python (SIG_DFL). My patch updates the documentation and addds unit tests. issue23395.2.patch looks wrong: it's

[issue27393] Command to activate venv in Windows has wrong path

2016-06-27 Thread Eryk Sun
Eryk Sun added the comment: You missed "C:\\>". -- nosy: +eryksun resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker ___

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-06-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: Regeneration of the platdir files needs to be aware of the value of sysroot [1]. For example on Android cross-builds, sysroot must be set to the path of the headers and libraries for the targeted Android API level corresponding to a version of the Android

[issue22724] byte-compile fails for cross-builds

2016-06-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: The byte-compiling for cross-builds fails because PYTHON_FOR_BUILD defined in configure, sets PYTHONPATH with the directory of the newly built extension modules shared libraries and because PYTHON_FOR_BUILD is used to run compileall.py in the Makefile.

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread STINNER Victor
STINNER Victor added the comment: Guido: "I am okay with making it a silent warning." The current patch raises a DeprecationWarning which is silent by default, but seen using python3 -Wd. What is the "long term" plan: always raise an *exception* in Python 3.7? Which exception? Another option

[issue27350] Compact and ordered dict

2016-06-27 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file43558/compact-dict.patch ___ Python tracker ___

[issue27398] configure warning for Python 3.5.2 during compilation

2016-06-27 Thread David
David added the comment: Forgot to mention - this is for Debian 4. A really old legacy system we're running, but where we like to use new versions of Python. -- ___ Python tracker

[issue27398] configure warning for Python 3.5.2 during compilation

2016-06-27 Thread David
New submission from David: Hi there. 3.5.1 final didn't have this problem, 3.5.2 final does have this problem. I'm compiling Python 3.5.2 under Debian, and get this warning during the ./configure step: --- configure: WARNING: linux/random.h: present but cannot be compiled

[issue27393] Command to activate venv in Windows has wrong path

2016-06-27 Thread Berker Peksag
Berker Peksag added the comment: Thanks! 3.3 and 3.4 docs are not maintained anymore. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> behavior versions: -Python 3.3, Python 3.4 ___ Python

[issue27393] Command to activate venv in Windows has wrong path

2016-06-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset fd1236294b88 by Berker Peksag in branch '3.5': Issue #27393: Fix escaping of venv activate commands on Windows https://hg.python.org/cpython/rev/fd1236294b88 New changeset cf560010e6f8 by Berker Peksag in branch 'default': Issue #27393: Merge from

[issue19536] MatchObject should offer __getitem__()

2016-06-27 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the detailed report! Issue 24454 is actually a duplicate of this but it has a patch and the idea was discussed by several core developers there. I'm going to close this one. -- nosy: +berker.peksag resolution: -> duplicate stage: needs