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

2017-11-30 Thread Kyeongpil
Kyeongpil added the comment: Oh, I confused the syntax of type hint. Sorry -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

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

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can't reproduce the performance difference. -- nosy: +serhiy.storchaka versions: +Python 3.7 ___ Python tracker

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

2017-11-30 Thread Kyeongpil
New submission from Kyeongpil : TypeError does not work when I input float variable into function that I give type hint. example code is like this: def a(b: int) -> int: return b+1 a(1.1) and the result is 1.1. However, I think it should throw TypeError Exception

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2017-11-30 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2017-11-30 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset bf2b65e413ca5ec705c7e2f463d0d75e947588a4 by xdegaye in branch 'master': bpo-28668: test.support.requires_multiprocessing_queue is removed (GH-4560)

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

2017-11-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ncoghlan ___ Python tracker ___ ___

[issue32189] SyntaxError for yield expressions inside comprehensions & genexps

2017-11-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core keywords: +patch nosy: +serhiy.storchaka pull_requests: +4572 stage: needs patch -> patch review ___ Python tracker

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8bcd41040a5f1f9b48a86d0e21f196e4b1f90e4b by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-32186: Release the GIL during lseek and fstat (GH-4652) (#4661)

[issue25612] nested try..excepts don't work correctly for generators

2017-11-30 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___

[issue25683] __context__ for yields inside except clause

2017-11-30 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___

[issue32145] Wrong ExitStack Callback recipe

2017-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: Hmm, I think that may actually qualify as a bug in the `pop_all()` implementation: https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack.pop_all states that it returns an ExitStack instance, not an instance of the current

[issue27172] Undeprecate inspect.getfullargspec()

2017-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: Independently of what we eventually decide to do for 4.0, there are some changes we could make at the documentation level to more clearly indicate "Even though this isn't deprecated, you still shouldn't use it for new code":

[issue32190] Separate out legacy introspection APIs in the inspect docs

2017-11-30 Thread Nick Coghlan
New submission from Nick Coghlan : (Follow up to https://bugs.python.org/issue27172) The deprecation notice on inspect.getfullargspec has been removed, since we want folks porting from Python 2 to rely on it as part of the porting process, rather than feeling they need to

[issue10544] yield expression inside generator expression does nothing

2017-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: With Serhiy's patch merged, I'm marking this as resolved. Thanks all! https://bugs.python.org/issue32189 is the follow-up issue to turn the warning into an unconditional SyntaxError in 3.8. -- resolution: -> fixed stage: patch

[issue32189] SyntaxError for yield expressions inside comprehensions & genexps

2017-11-30 Thread Nick Coghlan
New submission from Nick Coghlan : This is the Python 3.8 follow-up to turn the DeprecationWarning from https://bugs.python.org/issue10544 into an unconditional SyntaxError. -- messages: 307360 nosy: ncoghlan priority: normal severity: normal stage: needs patch

[issue10544] yield expression inside generator expression does nothing

2017-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 73a7e9b10b2ec9636e3c6396cf7b3695f8ed1856 by Nick Coghlan (Serhiy Storchaka) in branch 'master': bpo-10544: Deprecate "yield" in comprehensions and generator expressions. (GH-4579)

[issue32151] -mvenv vs minor python version updates

2017-11-30 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: Not sure if it’s the same thing, but I want to plug in that this can happen when you do a micro upgrade (e.g. 3.5.1 → 3.5.2) as well. This is because micro updates sometimes bump versions of dependencies (e.g. OpenSSL, Tk), and that

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

2017-11-30 Thread Nathaniel Smith
Nathaniel Smith added the comment: My impression was that progress on PEP 543 is temporarily stalled and not going to be finished for 3.7. Is that wrong? There's going to need to be a significant amount of shimming to implement the PEP 543 interfaces on top of ssl no matter

[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2017-11-30 Thread stevezh
stevezh added the comment: It maybe the semaphore tracker process doesn't unlink the semaphore as soon as possible when child process exit when the system is slow. Increase test case's time in the child and before assertRaises will help. -- nosy: +stevezh

[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: x86 Tiger 3.x: http://buildbot.python.org/all/#/builders/30/builds/260 == FAIL: test_semaphore_tracker (test.test_multiprocessing_forkserver.TestSemaphoreTracker)

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4571 ___ Python tracker ___

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6a89481680b921e7b317c29877bdda9a6031e5ad by Victor Stinner (Nir Soffer) in branch 'master': bpo-32186: Release the GIL during lseek and fstat (#4652)

[issue32188] ImpImporter.find_modules removes symlinks in paths

2017-11-30 Thread Henk-Jaap Wagenaar
New submission from Henk-Jaap Wagenaar : ImpImporter.find_modules calls os.path.real on the path used: https://github.com/python/cpython/blob/be6b74c0795b709c7a04e2187a7e32d08f5155f6/Lib/pkgutil.py#L181 This means if there is a submodule (foo.bar) which first

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

2017-11-30 Thread Dan Snider
Dan Snider added the comment: The hacked cell object using this method appears to be changed to NULL when accessed by frame.f_localsplus. I don't know C well enough to find out what's happening because nothing looks different to me in PyFrame_FastToLocalsWithError.

[issue32132] Android5

2017-11-30 Thread Berker Peksag
Change by Berker Peksag : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32145] Wrong ExitStack Callback recipe

2017-11-30 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +ncoghlan type: crash -> behavior ___ Python tracker ___

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: Ok, the bug is now fixed in Python 2.7, 3.6 and master (future 3.7). On 3.6 and master, the fix comes with an unit test. Thanks Steve Dower for the bug report, sorry for the long delay, I completely forgot this old bug! Marcin

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset e10c9de9d74fd4c26b32e6719d96f04a5be6987d by Victor Stinner in branch '3.6': bpo-20891: Fix PyGILState_Ensure() (#4650) (#4655) https://github.com/python/cpython/commit/e10c9de9d74fd4c26b32e6719d96f04a5be6987d

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset be6b74c0795b709c7a04e2187a7e32d08f5155f6 by Victor Stinner in branch '2.7': bpo-20891: Fix PyGILState_Ensure() (#4650) (#4657) https://github.com/python/cpython/commit/be6b74c0795b709c7a04e2187a7e32d08f5155f6

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: "LGTM. Do you want to write this a pull request?" Michael? You didn't answer to my question. -- ___ Python tracker

[issue32072] Issues with binary plists

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8cd31082fba88cf0064590fd3d55b6c1c964f11c by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32072: Fix issues with binary plists. (GH-4455) (#4654)

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: We already release the GIL when calling lseek() in fileio.c, in the portable_lseek() function. So it makes sense to also do it in _io_FileIO_readall_impl() in the same file. os.lseek() also releases the GIL. I found another

[issue32072] Issues with binary plists

2017-11-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4570 ___ Python tracker ___ ___

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4569 ___ Python tracker ___ ___

[issue32072] Issues with binary plists

2017-11-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4568 ___ Python tracker ___ ___

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4567 ___ Python tracker ___ ___

[issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c91bf742e542dceaf71042a44b5a04fb08bdda70 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (GH-4080) (#4653)

[issue32072] Issues with binary plists

2017-11-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +larry ___ Python tracker ___ ___

[issue32072] Issues with binary plists

2017-11-30 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4566 ___ Python tracker ___

[issue32072] Issues with binary plists

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a897aeeef647259a938a36cb5eb6680c86021c6a by Serhiy Storchaka in branch 'master': bpo-32072: Fix issues with binary plists. (#4455) https://github.com/python/cpython/commit/a897aeeef647259a938a36cb5eb6680c86021c6a

[issue32184] pdb/ipdb is not usable on Linux (which works on Windows) from a single multiprocessing.Process when the main process is stuck at process.join()

2017-11-30 Thread nartes
nartes added the comment: https://gist.github.com/efe828a7bbac97e02a7d83d2a2d78540 import io import os import sys import multiprocessing class B(multiprocessing.Process): @classmethod def _my_thread(self, a, b): print("Class method as a separate

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset b4d1e1f7c1af6ae33f0e371576c8bcafedb099db by Victor Stinner in branch 'master': bpo-20891: Fix PyGILState_Ensure() (#4650) https://github.com/python/cpython/commit/b4d1e1f7c1af6ae33f0e371576c8bcafedb099db --

[issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle

2017-11-30 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4565 ___ Python tracker ___

[issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 986375ebde0dd5ff2b7349e445a06bd28a3a8ee2 by Serhiy Storchaka in branch 'master': bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (#4080)

[issue32187] tab completion fails in pdb/ipdb/ipython for python3.7

2017-11-30 Thread nartes
nartes added the comment: installing parse 0.1.1 solves the issue -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue32187] tab completion fails in pdb/ipdb/ipython for python3.8

2017-11-30 Thread nartes
New submission from nartes : Python 3.7.0a2+ (heads/master:bc8ac6b00e, Nov 30 2017, 22:14:00) Type 'copyright', 'credits' or 'license' for more information IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help. In [1]: import multiException in thread

[issue32187] tab completion fails in pdb/ipdb/ipython for python3.7

2017-11-30 Thread nartes
Change by nartes : -- title: tab completion fails in pdb/ipdb/ipython for python3.8 -> tab completion fails in pdb/ipdb/ipython for python3.7 ___ Python tracker

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

2017-11-30 Thread Silla Rizzoli
New submission from Silla Rizzoli : Sometimes RFC-correct email headers do not get folded correctly; the example code below results in an infinite recursion exception. import sys import mailbox from email.message import EmailMessage from email.headerregistry import

[issue32171] Inconsistent results for fractional power of -infinity

2017-11-30 Thread Tim Peters
Tim Peters added the comment: Mark, indeed, in the email from Vincent Lefevre you linked to, his entire argument was: (a) we already specified what happens when the base is a zero; so, (b) for each of the six pow(a_zero, y) cases we specified, derive a matching rule for an

[issue27172] Undeprecate inspect.getfullargspec()

2017-11-30 Thread Brett Cannon
Brett Cannon added the comment: I'm not saying we remove getfullargspec() **right now**, just that we don't keep it around long-term as it simply can't evolve to keep up with how rich our parameter support is today and might become in the future. And that's why, for me, the

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
Change by Nir Soffer : -- keywords: +patch pull_requests: +4563 stage: -> patch review ___ Python tracker ___

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
Change by Nir Soffer : -- pull_requests: +4564 ___ Python tracker ___ ___ Python-bugs-list

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
Nir Soffer added the comment: Forgot to mention - reproducible with python 2.7. Similar issues exists in python 3, but I did not try to reproduce since we are using python 2.7. I posted patches for both 2.7 and master: - https://github.com/python/cpython/pull/4651 -

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
New submission from Nir Soffer : Using io.FileIO can hang all threads when accessing an inaccessible NFS server. To reproduce this, you need to open the file like this: fd = os.open(filename, ...) fio = io.FileIO(fd, "r+", closefd=True) Inside fileio_init, there is a

[issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP

2017-11-30 Thread Christian Heimes
Christian Heimes added the comment: Thanks! 3.4 and 3.5 are out of scope. They only receive security fixes. For 3.7 https://github.com/python/cpython/compare/master...tiran:openssl_check_hostname will take care of the issue 2.7 and 3.6 are a bit tricky. There is no

[issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP

2017-11-30 Thread Matt Davis
New submission from Matt Davis : The current implementation of SSLContext.wrap_socket blindly sends whatever is passed in server_hostname in the SNI extension, assuming it's a DNS hostname. RFC6066 describes the SNI TLS extension, and specifically states that 'Literal IPv4

[issue32184] pdb/ipdb is not usable on Linux (which works on Windows) from a single multiprocessing.Process when the main process is stuck at process.join()

2017-11-30 Thread nartes
New submission from nartes : https://asciinema.org/a/Sl7BTmS4krLdrLb9c4YeMgAG1 -- components: Interpreter Core, Library (Lib) files: parallel_sandbox.py messages: 307332 nosy: nartes priority: normal severity: normal status: open title: pdb/ipdb is not usable

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: I have to check if Python 2.7 is impacted as well. -- versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: > Is this fix released? I can't find it in the changelog… Oops, I lost track of this issue, but it wasn't fixed, no. I just proposed my old fix as a pull requets: PR 4650. > (I faced this bug on 3.5.2, released a couple of months

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4562 stage: -> patch review ___ Python tracker ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset bc8ac6b00efcb3c601224b73f64071281f434bcd by Victor Stinner in branch 'master': bpo-32030: Fix _Py_InitializeEx_Private() (#4649) https://github.com/python/cpython/commit/bc8ac6b00efcb3c601224b73f64071281f434bcd

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4561 ___ Python tracker ___ ___

[issue27931] Email parse IndexError <""@wiarcom.com>

2017-11-30 Thread Константин Волков
Константин Волков added the comment: ping -- ___ Python tracker ___ ___

[issue25394] CoroWrapper breaks gen.throw

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: Sadly, Python 3.5 doesn't accept bugfixes anymore (only security fixes), so I close this issue. Happy to read that a bug was fixed in Python 3.6 ;-) FYI the fix was copied from the GitHub asyncio project to CPython in the commit

[issue32151] -mvenv vs minor python version updates

2017-11-30 Thread Ric Anderson
Ric Anderson added the comment: Okay, are virtual env's expected to not be compatible as well? E.g., I built a venv under 3.5; venv copied in the 3.5 python executable, but not the needed library; should not -mvenv also copy libpython3.5 into the virutal setup or at

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

2017-11-30 Thread R. David Murray
R. David Murray added the comment: This is almost certainly either a duplicate or will be fixed by a PR I have pending, that I don't have time to look for right now, that rewrites the folder. I'll try to get to merging that PR soonish, but it might not happen before

[issue32144] email.policy.SMTP and SMTPUTF8 doesn't honor linesep's value

2017-11-30 Thread R. David Murray
R. David Murray added the comment: A note would be too heavy handed. And get_content is a different function from get_payload, so there is no change in behavior, there is a new API with a more consistent behavior. Basically, Python programs in general use \n line

[issue25394] CoroWrapper breaks gen.throw

2017-11-30 Thread Mike Nerone
Mike Nerone added the comment: This was fixed in Python 3.6. See https://github.com/python/asyncio/issues/429 -- nosy: +Manganeez ___ Python tracker

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

2017-11-30 Thread Martin Richard
Martin Richard added the comment: FWIW, PyOpenSSL allows to load certificates and keys from a memory buffer and much more. It's also fairly easy to switch from ssl to PyOpenSSL. It's probably a viable alternative in many cases. --

[issue32183] Coverity: CID 1423264: Insecure data handling (TAINTED_SCALAR)

2017-11-30 Thread Christian Heimes
Change by Christian Heimes : -- assignee: -> christian.heimes stage: -> needs patch ___ Python tracker ___

[issue32183] Coverity: CID 1423264: Insecure data handling (TAINTED_SCALAR)

2017-11-30 Thread STINNER Victor
New submission from STINNER Victor : I got a new report from Coverity: CID 1423264: Insecure data handling (TAINTED_SCALAR) ** CID 1423265: Insecure data handling (TAINTED_SCALAR) /Modules/main.c: 1393 in pymain_get_env_var_dup()

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

2017-11-30 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: OP here, lurking. The need to load server certificates from memory is quite real. Some seven years ago I wrote custom code to handle that for CCPs python branch, and contributed patches to that effect. It's always dismaying to see

[issue32142] heapq.heappop - documentation misleading or doesn't work

2017-11-30 Thread R. David Murray
R. David Murray added the comment: I would suggested following the statement "To create a heap, use a list initialized to [], or you can transform a populated list into a heap via function heapify()." with "Any mutation of the list thereafter must maintain the heap

[issue31851] test_subprocess hangs randomly on Windows with Python 3.x

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: Bug occurred on AMD64 Windows8.1 Refleaks 3.6: http://buildbot.python.org/all/#/builders/64/builds/52 ... running: test_subprocess (134462 sec) running: test_subprocess (134492 sec) running: test_subprocess (134522 sec) running:

[issue27606] Android cross-built for armv5te with clang and '-mthumb' crashes with SIGSEGV or SIGILL

2017-11-30 Thread Xavier de Gaye
Xavier de Gaye added the comment: ARMV5TE is deprecated in NDK r16 and will be removed in r17. See https://developer.android.com/ndk/guides/abis.html Closing as won't fix. -- resolution: -> wont fix stage: -> resolved status: open -> closed

[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Thanks for the fix Victor! -- ___ Python tracker ___

[issue32175] Add hash auto-randomization

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: It was decided to leave the hash randomization disabled by default for backward compatibility. It's a deliberate choice. I don't think that we need to go further for Python 2.7. I never considered this denial of service attach as

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

2017-11-30 Thread Дилян Палаузов
Дилян Палаузов added the comment: Is the speedup a matter of adding "__bool__" to list_methods in object/listobject.c? In any case, I am not in the internals of cpython, so that I am not going to provide a patch. With PyObject_Bool I meant PyObject_IsTrue.

[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: "And this issue occurs not only ppc64le but also x86_64. (...) I think that this issue does not depend on arch." Thanks for the confirmation. This is what I understood from the Red Hat report, but also the kernel bugfix.

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

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know what should mean PyObject_Bool(), but in C code you should use PyObject_IsTrue() for getting the boolean value of the object. -- ___ Python tracker

[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 92a2c07b71aefc01f84ba4b0eda8e2a45c1a6b65 by Victor Stinner (Miss Islington (bot)) in branch '3.6': Skip test_socket.test_sha256() on linux < 4.5 (GH-4643) (#4645)

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

2017-11-30 Thread Дилян Палаузов
Дилян Палаузов added the comment: Under these circumstances https://wiki.python.org/moin/PythonSpeed/PerformanceTips shall be updated to state that "len('a list') > 0" is slower than "True if 'a list' else False" --

[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread Fomalhaut Weisszwerg
Fomalhaut Weisszwerg added the comment: STINNER Victor Thank you for your info. And this issue occurs not only ppc64le but also x86_64. `uname -a` on my CentOS returns following: Linux localhost.localdomain 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017

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

2017-11-30 Thread Дилян Палаузов
Дилян Палаузов added the comment: To my understanding this optimization (bool([]) faster than len([])) cannot be made until PyObject_Bool is introduced, similar to PyObject_Repr and PyObject_Length. Am I not going to provide a patch. -- status: pending ->

[issue32181] runaway Tasks with Task.cancel() ignored.

2017-11-30 Thread Oleg K
New submission from Oleg K : (tested in VM and in real linux) there is an issue with Task, in some cases task will ignore cancellation and will keep running for a while. there is some explanation needed regarding the python_task_cancel.py example. 1)there is a async

[issue32166] Drop python 3.4 code from asyncio.coroutines and asyncio.unix_events

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: > Thank you Andrew! This have made the code cleaner. Yeah! I really love to see old these old crappy legacy stuff to go away. The asyncio code behave shorter, simpler and with less "#ifdef" ;-) I understand that the Python language

[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4560 ___ Python tracker ___

[issue31705] test_sha256 from test_socket fails on ppc64le arch

2017-11-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 86afc1f2a7fb3afe00779c6426bc141bc795d9a3 by Victor Stinner in branch 'master': Skip test_socket.test_sha256() on linux < 4.5 (#4643) https://github.com/python/cpython/commit/86afc1f2a7fb3afe00779c6426bc141bc795d9a3

[issue27172] Undeprecate inspect.getfullargspec()

2017-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: I'll also note that one possible alternative would be to accept Ryan's original proposal, which was to make "skip_bound_arg=False" part of the public API for `inspect.Signature.from_callable`. Keeping `getfullargspec` around (but

[issue27172] Undeprecate inspect.getfullargspec()

2017-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: If there was a documented deprecation that said "Use instead", I'd be OK with that. The part I wasn't OK with is multiple projects each copying & pasting their own variant of the getfullargspec code and accessing private inspect module

[issue32166] Drop python 3.4 code from asyncio.coroutines and asyncio.unix_events

2017-11-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: You are welcome! Thanks for review -- ___ Python tracker ___

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

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The cause of len() been faster than bool() is the same as why repr() is faster than str(). [1] len() and repr() are functions that just call corresponding slots, while bool() and str() are constructors. In most cases you

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

2017-11-30 Thread Christian Heimes
Christian Heimes added the comment: I'm working on a PEP that builds on top of PEP 543 and addresses some issues like IDNA #28414, OpenSSL/LibreSSL compatibility, hostname verification, verification chain, and TLS 1.3. As part of the PEP implementation, I'll add a

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

2017-11-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Christian, what is the status of PEP 543? Is someone actively working on it? Should we hope for a resolution (i.e. an implementation accepted in the stdlib) in the near future? I'm worried about such purity arguments. It reminds me of when

[issue32166] Drop python 3.4 code from asyncio.coroutines and asyncio.unix_events

2017-11-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Andrew! This have made the code cleaner. -- ___ Python tracker ___

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

2017-11-30 Thread Christian Heimes
Christian Heimes added the comment: I'm -1 on the patch. Any new feature and API shall follow https://www.python.org/dev/peps/pep-0543/. I have some code that adds a proper Certificate class that wraps OpenSSL's X509* type. --

[issue32175] Add hash auto-randomization

2017-11-30 Thread Christian Heimes
Christian Heimes added the comment: Raymond, dicts are your area of expertise. I'm -0 on the patch. The check is going to slow down dicts and it's really easy to enable randomization with an env var or command line argument. -- assignee: -> rhettinger nosy:

[issue32166] Drop python 3.4 code from asyncio.coroutines and asyncio.unix_events

2017-11-30 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

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

2017-11-30 Thread Дилян Палаузов
New submission from Дилян Палаузов : Please make bool() on lists at least as fast as len() > 0 on lists is. The trivial approach would be to define __bool__ on lists, that do something like "True if self else False". python3 Python 3.6.3+

[issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError

2017-11-30 Thread Massimiliano Torromeo
Massimiliano Torromeo added the comment: Disregard my last message, I posted it in the wrong bug report by mistake. Sorry about the noise -- ___ Python tracker

  1   2   >