[issue32176] Zero argument super is broken in 3.6 for methods with a hacked __class__ cell

2017-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Given that, I'd say the way to cleanest way to fix this would be to remove these lines from "compute_code_flags" in compile.c: if (!PyDict_GET_SIZE(c->u->u_freevars) && !PyDict_GET_SIZE(c->u->u_cellvars)) { flags |=

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-01 Thread Martin Panter
Martin Panter added the comment: Michael Felt: if you still want the code compatible with Python 2 and 3 (and others are happy with that), I suggest documenting that in a code comment. -- ___ Python tracker

[issue32173] linecache.py add lazycache to __all__ and use dict.clear to clear the cache

2017-12-01 Thread Lisa Roach
Lisa Roach added the comment: I think these changes look good, ganziqim has real code improvements (in the form of adding lazycache to __all__ and using clear() in clearchache), as well as improving the code formatting for readability. --

[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-12-01 Thread robbuckley
robbuckley added the comment: hi, as the reporter i just want to say this is working for me with 3.6.3. Regarding https://bugs.python.org/issue30581#msg301150, I take your point that a lot of multiprocessing using the standard libraries may not benefit, as processes may

[issue32147] improve performance of binascii.unhexlify() by using conversion table

2017-12-01 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: Serhiy, did you use the same benchmark as mentioned here? -- ___ Python tracker ___

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

2017-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 01/12/2017 à 10:47, Christian Heimes a écrit : > > It doesn't matter for certificates. I guess you also want to load the key > from a memory buffer, don't you? That's going to be less secure. Yes, that's what I meant. --

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

2017-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is it possible to have a single C function that loads the certificates from memory, or would that make the file-loading case less secure? Le 01/12/2017 à 10:25, Christian Heimes a écrit : > > Christian Heimes added the

[issue32147] improve performance of binascii.unhexlify() by using conversion table

2017-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes. And I can't reproduce a slowdown with a simplified a2b_qp(). Maybe this depends on the compiler and on the CPU. What are your OS, compiler and CPU? Do you build 32- or 64-bit Python? Do you build in a debug or release mode?

[issue32147] improve performance of binascii.unhexlify() by using conversion table

2017-12-01 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: > OS x86_64 GNU/Linux > compiler gcc version 7.2.0 (Debian 7.2.0-16) > CPU Architecture:x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s)

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

2017-12-01 Thread Christian Heimes
Christian Heimes added the comment: Correct, PEP 543 won't land in Python 3.7 because neither me nor Cory have the resources to land it. However I want all changes and new additions to the SSL module to follow PEP 543 so I can provide a PEP 543-compatible interface in the

[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the heads up Rob! -- ___ Python tracker ___

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Andrew Svetlov
New submission from Andrew Svetlov : As discussed several times before we need to convert `@coroutine` / `yield from` to async/await. All existing functionality should keep working (like yielding from new style coroutine and `with (yield from lock)`. We could

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Andrew Svetlov
Change by Andrew Svetlov : -- nosy: +gvanrossum, vstinner ___ Python tracker ___

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Andrew Svetlov
Change by Andrew Svetlov : -- type: -> enhancement ___ Python tracker ___ ___

[issue32192] Provide importlib.util.lazy_import helper function

2017-12-01 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +brett.cannon, eric.snow stage: -> needs patch type: -> enhancement versions: +Python 3.7, Python 3.8 ___ Python tracker

[issue32192] Provide importlib.util.lazy_import helper function

2017-12-01 Thread Nick Coghlan
New submission from Nick Coghlan : While importlib provides all the *pieces* to implement lazy imports, we don't actually provide a clear way of chaining them together into a lazy import operation. Without any error checking, that looks like: import sys import

[issue32151] -mvenv vs minor python version updates

2017-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: The virtualenv (both using venv and using the third party library virtualenv) still relies on most of the python installation outside of the virtualenv, in particular the stdlib extensions. Those are not guartanteed to be binary

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

2017-12-01 Thread Christian Heimes
Christian Heimes added the comment: It doesn't matter for certificates. I guess you also want to load the key from a memory buffer, don't you? That's going to be less secure. -- ___ Python tracker

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4576 ___ Python tracker ___ ___

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Dave Challis
Dave Challis added the comment: My mistake, it appears to be related to the OS it's running on rather than the version (I just happened to test with different versions on different OSes). On Mac OS X (with 3.6.2): >>> import datetime >>>

[issue32173] linecache.py add lazycache to __all__ and use dict.clear to clear the cache

2017-12-01 Thread Raymond Hettinger
New submission from Raymond Hettinger : These seems to be reasonable suggestions. Lisa, would you care to review the patch? -- assignee: -> lisroach nosy: +lisroach, rhettinger ___ Python tracker

[issue32180] bool() vs len() > 0 on lists

2017-12-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM that there isn't a real issue here and the discussions of proper timing technique and micro-optimizations are more suitable for StackOverflow. -- nosy: +rhettinger ___ Python

[issue32170] Contrary to documentation, ZipFile.extract does not extract timestamps or other metadata

2017-12-01 Thread SilentGhost
Change by SilentGhost : -- nosy: +alanmcintyre, serhiy.storchaka, twouters ___ Python tracker ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0ea395ae964c9cd0f499e2ef0d0030c971201220 by Victor Stinner in branch 'master': bpo-32030: Add Python/pathconfig.c (#4668) https://github.com/python/cpython/commit/0ea395ae964c9cd0f499e2ef0d0030c971201220 --

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4578 ___ Python tracker ___ ___

[issue32180] bool() vs len() > 0 on lists

2017-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm sure adding list.__bool__() will not affect the performance. The real source of the difference is explained on the StackOverflow link. PEP 8 contains a rule for testing the emptiness of a container. -- resolution:

[issue32173] linecache.py add lazycache to __all__ and use dict.clear to clear the cache

2017-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please explain your suggestion ganziqim? The patch looks like a collection of unrelated changes mostly changing the formatting of the code. Usually we don't do such changes. If there is a semantical change, it is

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset e23c06e2b03452c9aaf0dae52296c85e572f9bcd by Victor Stinner in branch 'master': bpo-32030: Fix config_get_program_name() on macOS (#4669) https://github.com/python/cpython/commit/e23c06e2b03452c9aaf0dae52296c85e572f9bcd

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9ac3d8882712c9675c3d2f9f84af6b5729575cde by Victor Stinner in branch 'master': bpo-32030: Fix Py_GetPath(): init program_name (#4665) https://github.com/python/cpython/commit/9ac3d8882712c9675c3d2f9f84af6b5729575cde

[issue25054] Capturing start of line '^'

2017-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anybody please make review at least of the documentation part? I want to merge this before 3.7.0a3 be released. Initially I was going to backport the part that relates findall(), finditer() and sub(). It changes the

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset ebac19dad6263141d5db0a2c923efe049dba99d2 by Victor Stinner in branch 'master': bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4577 ___ Python tracker ___ ___

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yuri please do -- ___ Python tracker ___ ___

[issue32196] Rewrite plistlib with functional style

2017-12-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR rewrites the plistlib module using a functional style. This speeds up loading and saving plist files at least by 10%. Saving plist files in XML format have sped up almost twice. $ ./python -m timeit -s

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ned.deily, ronaldoussoren ___ Python tracker ___

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Yury Selivanov
Yury Selivanov added the comment: > How will we guarantee that clients using the old `@coroutine`/`yield from` > idiom still work? They are fully supported now, but we can add a few tests to ensure we won't break it. -- ___

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In what version datetime.strftime with %Y did output leading zeros? -- nosy: +belopolsky, serhiy.storchaka ___ Python tracker

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4573 ___ Python tracker ___ ___

[issue32171] Inconsistent results for fractional power of -infinity

2017-12-01 Thread Pierre Denis
Pierre Denis added the comment: > So this justifies things like `sqrt(-0.0)` giving a zero result (rather than > being considered invalid) Well, I didn’t noticed that the wolf was already in the henhouse! This choice seems disputable for me because it is precisely a case

[issue30657] [security] CVE-2017-1000158: Unsafe arithmetic in PyString_DecodeEscape

2017-12-01 Thread Miro Hrončok
Change by Miro Hrončok : -- keywords: +patch pull_requests: +4574 stage: needs patch -> patch review ___ Python tracker ___

[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-12-01 Thread Brett Cannon
Brett Cannon added the comment: Import itself I don't believe calls os.path.realpath(), so this is probably just something pkgutil happens to do. -- nosy: +brett.cannon ___ Python tracker

[issue32177] spammers mine emails from bugs.python.org

2017-12-01 Thread Brett Cannon
Brett Cannon added the comment: We don't sell any information to anyone. If you would like to file a bug to have email addresses obfuscated more then the correct place to file that is http://psf.upfronthosting.co.za/roundup/meta . Obviously any help in updating the code

[issue32194] When creating list of dictionaries and updating datetime objects one by one, all values are set to last one of the list.

2017-12-01 Thread Joona Mörsky
New submission from Joona Mörsky : When creating list of dictionaries and updating datetime objects one by one, all values are set to last one of the list. Ubuntu Linux 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[issue32151] -mvenv vs minor python version updates

2017-12-01 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: Hmm, I’m quite sure I have experience that a virtual environment breaks after a micro version upgrade on macOS, getting an “image not found” or something similar. I’m not using the official released Python, but via Homebrew, so maybe this

[issue32194] When creating list of dictionaries and updating datetime objects one by one, all values are set to last one of the list.

2017-12-01 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: This is not a bug in Python. Refer to this page for the explanation: https://stackoverflow.com/questions/240178/list-of-lists-changes-reflected-across-sublists-unexpectedly Basically, [{}]*3 creates a list with three references to the

[issue32191] TypeError does not work when function with type hint

2017-12-01 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: fixed -> not a bug ___ Python tracker ___ ___

[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-12-01 Thread Henk-Jaap Wagenaar
Henk-Jaap Wagenaar added the comment: Ignoring testing code, there is minimal use of os.path.realpath in the stdlib (https://github.com/python/cpython/search?utf8=%E2%9C%93=%22os.path.realpath%22=): - Lib/platform.py: used before opening a file (works around a

[issue32152] Add pid to .cover filename in lib/trace.py

2017-12-01 Thread Nikhil Hegde
Nikhil Hegde added the comment: This is also necessary in a case where two tests (say, a and b) are running in parallel. Both tests access the same fileX.py The coverage for fileX.py will not be accurate to reflect the usage by tests a and b -- versions:

[issue32194] When creating list of dictionaries and updating datetime objects one by one, all values are set to last one of the list.

2017-12-01 Thread Gareth Rees
Gareth Rees added the comment: The behaviour of the * operator (and the associated gotcha) is documented under "Common sequence operations" [1]: Note that items in the sequence s are not copied; they are referenced multiple times. This often haunts new Python

[issue32182] Infinite recursion in email.message.as_string()

2017-12-01 Thread Silla Rizzoli
Silla Rizzoli added the comment: Ok, thanks! I'm writing a program to convert Outlook for Mac backup files (.olm) into plain mbox files as a way to teach myself Python (and at the same time regain control of my email), so I have tens of thousand of emails to test your

[issue32192] Provide importlib.util.lazy_import helper function

2017-12-01 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue32151] -mvenv vs minor python version updates

2017-12-01 Thread Ronald Oussoren
Change by Ronald Oussoren : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32182] Infinite recursion in email.message.as_string()

2017-12-01 Thread R. David Murray
R. David Murray added the comment: It is gh-3488 if you want to try it out. Feedback welcome. -- ___ Python tracker ___

[issue32151] -mvenv vs minor python version updates

2017-12-01 Thread Ric Anderson
Ric Anderson added the comment: well then, I guess y'all can close this ticket -- ___ Python tracker ___

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Dave Challis
New submission from Dave Challis : Tested in python 3.6.2: >>> import datetime >>> datetime.datetime.min.strftime('%Y') '1' Expected output: '0001' This means that strftime and strptime aren't necessarily symmetric, e.g.: >>>

[issue32192] Provide importlib.util.lazy_import helper function

2017-12-01 Thread Brett Cannon
Brett Cannon added the comment: Already planning this as a PyPI package (at least to start). See https://notebooks.azure.com/Brett/libraries/di2Btqj7zSI/html/Lazy%20importing.ipynb for the design. -- ___ Python tracker

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4575 ___ Python tracker ___ ___

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I am in favor of this. How will we guarantee that clients using the old `@coroutine`/`yield from` idiom still work? We need to have separate tests for that. -- ___ Python tracker

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset b64de46aae148cfab0980e0ad478da7aafc44900 by Victor Stinner in branch 'master': bpo-32030: Cleanup "path config" code (#4663) https://github.com/python/cpython/commit/b64de46aae148cfab0980e0ad478da7aafc44900 --

[issue32193] Convert asyncio to async/await

2017-12-01 Thread Yury Selivanov
Yury Selivanov added the comment: Andrew, would it be OK if I make a PR? -- ___ Python tracker ___

[issue32196] Rewrite plistlib with functional style

2017-12-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4579 stage: -> patch review ___ Python tracker ___

[issue32162] typing.Generic breaks __init_subclass__

2017-12-01 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Ned Deily
Ned Deily added the comment: As documented in the Python Library Reference: "The full set of format codes supported varies across platforms, because Python calls the platform C library’s strftime() function, and platform variations are common. To see the full set of format

[issue32176] Zero argument super is broken in 3.6 for methods with a hacked __class__ cell

2017-12-01 Thread Dan Snider
Dan Snider added the comment: So while CO_NOFREE is set in all versions with the example code, it appears only python 3.6 recognizes that flag and disallows the accessing of the __class__ cell. In this case the error message is bad because it implies that the

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Ned Deily
Ned Deily added the comment: > Isn't this a duplicate of issue 13305? Looks like it, thanks, though I think the analysis still applies. Closing as duplicate. -- resolution: not a bug -> duplicate stage: -> resolved status: open -> closed superseder: ->

[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-12-01 Thread Henk-Jaap Wagenaar
Change by Henk-Jaap Wagenaar : -- keywords: +patch pull_requests: +4580 stage: -> patch review ___ Python tracker ___

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Isn't this a duplicate of issue 13305? -- status: pending -> open ___ Python tracker

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2017-12-01 Thread Ned Deily
Ned Deily added the comment: (See also msg307413 in duplicate Issue32195 for more discussion.) -- nosy: +ned.deily ___ Python tracker

[issue32085] [Security] A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages!

2017-12-01 Thread Martin Panter
Martin Panter added the comment: Issue 32185 proposes to stop sending IP addresses in the TLS SNI protocol. Maybe this will help; it depends if it will catch IP address strings with with whitespace or if there are other ways to inject invalid hostnames. --

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4581 ___ Python tracker ___ ___