[issue32332] Implement slots support for magic methods added in PEP 560

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This isn't so easy. You can't just access new slot, because this is binary incompatible. You should add new type flag, say Py_TPFLAGS_HAVE_CLASS, set it for all classes with tp_as_class, and guard access to tp_as_class with

[issue32264] move pygetopt.h into internal/

2017-12-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset e425bd75177ffb7f098bdb0618b4a5ba3211fe52 by Benjamin Peterson in branch 'master': move pygetopt.h to internal (closes bpo-32264) (#4830) https://github.com/python/cpython/commit/e425bd75177ffb7f098bdb0618b4a5ba3211fe52

[issue32311] Implement asyncio.create_task() shortcut

2017-12-14 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you, Andrew! -- ___ Python tracker ___ ___

[issue32332] Implement slots support for magic methods added in PEP 560

2017-12-14 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4772 stage: -> patch review ___ Python tracker ___

[issue32332] Implement slots support for magic methods added in PEP 560

2017-12-14 Thread Yury Selivanov
New submission from Yury Selivanov : I propose to add type slots for magic methods introduced by PEP 560. In the brief discussion on the mailing list Guido OK'd the idea: https://mail.python.org/pipermail/python-dev/2017-December/151262.html I'll submit a PR that

[issue32311] Implement asyncio.create_task() shortcut

2017-12-14 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue32311] Implement asyncio.create_task() shortcut

2017-12-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset f74ef458ab1f502e4e60bd1502ac1dc0d2cb3847 by Andrew Svetlov in branch 'master': bpo-32311: Implement asyncio.create_task() shortcut (#4848)

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-14 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4771 stage: -> patch review ___ Python tracker ___

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-14 Thread Yury Selivanov
New submission from Yury Selivanov : On Linux, socket type is both a socket type and a bit mask (of SOCK_CLOEXEC and SOCK_NONBLOCK). Therefore, anyone who write code like 'if sock.type == SOCK_STREAM' writes non-portable code, that occasionally breaks on Linux. This

[issue32330] Email parser creates a message object that can't be flattened

2017-12-14 Thread Mark Sapiro
Mark Sapiro added the comment: Yes. I think errors=replace is a good solution. In Mailman, we have our own mailman.email.message.Message class which is a subclass of email.message.Message and what we do to work around this and issue27321 is override as_string() with:

[issue32330] Email parser creates a message object that can't be flattened

2017-12-14 Thread R. David Murray
R. David Murray added the comment: What would you like to see happen in that situation? Should we use errors=replace like we do for headers? (That seems reasonable to me.) Note that it can be re-serialized as binary. --

[issue32327] Make asyncio methods documented as coroutines - coroutines.

2017-12-14 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32327] Make asyncio methods documented as coroutines - coroutines.

2017-12-14 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 19a44f63c738388ef3c8515348b4ffc061dfd627 by Yury Selivanov in branch 'master': bpo-32327: Convert asyncio functions documented as coroutines to coroutines. (#4872)

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 41264f1cd4d6066b2797ff07cae465c1e06ff3b2 by Victor Stinner in branch 'master': bpo-32030: Add _PyMainInterpreterConfig.executable (#4876) https://github.com/python/cpython/commit/41264f1cd4d6066b2797ff07cae465c1e06ff3b2

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: Never mind. I see it's in bytes. I missed that the first time. But, if it wasn't in bytes, would that be an OK solution? Or is it bad to override those methods in that class? -- ___ Python

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4770 ___ Python tracker ___ ___

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: I'm missing something here, so please forgive me for asking, but why is it bad to add: def keys(self): return self._data.keys() def values(self): return self._data.values() def items(self): return

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset da273412c4374de07a500e7f23f89a6bb7527398 by Victor Stinner in branch 'master': bpo-32030: Add _PyCoreConfig_Copy() (#4874) https://github.com/python/cpython/commit/da273412c4374de07a500e7f23f89a6bb7527398 --

[issue32329] PYTHONHASHSEED=0 python3 -R should enable hash randomization

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: "PYTHONHASHSEED=0 python3 -R" now enables hash randomization on master (Python 3.7), I also fixed the sys.flags.hash_randomization value when using PYTHONHASHSEED=0. I chose to not modify the behaviour of the -R option in Python

[issue32329] PYTHONHASHSEED=0 python3 -R should enable hash randomization

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 22097aaa77b4f0473552fe840358d77e5b9a253f by Victor Stinner in branch '3.6': bpo-32329: Fix sys.flags.hash_randomization (#4875) https://github.com/python/cpython/commit/22097aaa77b4f0473552fe840358d77e5b9a253f

[issue32330] Email parser creates a message object that can't be flattened

2017-12-14 Thread Mark Sapiro
New submission from Mark Sapiro : This is related to https://bugs.python.org/issue27321 but a different exception is thrown for a different reason. This is caused by a defective spam message. I don't actually have the offending message from the wild, but the attached

[issue32326] Update Build projects to version 10.0.16299.0 of the Windows 10 SDK.

2017-12-14 Thread Steve Dower
Steve Dower added the comment: It has been resolved in master, so we just need to backport PCbuild/python.props to get it in earlier branches. -- ___ Python tracker

[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: It is very to get stable benchmarks with timings shorter than 1 ms, and even harder for timings shorter than 1 us. I wrote documentation to implement how to get more stable results:

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: > I created an environment under 3.3.1 in which this error was still occurring, > but within that same environment, it is not occurring for 3.7. I believe > this can be closed. Python 3.7 now uses the UTF-8 encoding when the

[issue32329] PYTHONHASHSEED=0 python3 -R should enable hash randomization

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4769 ___ Python tracker ___ ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 358e5e17a51ba00742bfaee4557a94c3c4179c22 by Victor Stinner in branch 'master': bpo-32329: Fix -R option for hash randomization (#4873) https://github.com/python/cpython/commit/358e5e17a51ba00742bfaee4557a94c3c4179c22

[issue32329] PYTHONHASHSEED=0 python3 -R should enable hash randomization

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 358e5e17a51ba00742bfaee4557a94c3c4179c22 by Victor Stinner in branch 'master': bpo-32329: Fix -R option for hash randomization (#4873) https://github.com/python/cpython/commit/358e5e17a51ba00742bfaee4557a94c3c4179c22

[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-14 Thread Guido van Rossum
Guido van Rossum added the comment: I think the best thing to do is not to panic! Also maybe PGO could help? On Dec 14, 2017 15:43, "Ivan Levkivskyi" wrote: > > Ivan Levkivskyi added the comment: > > Interesting. I have noticed

[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Interesting. I have noticed similar when I tried to add a fast loop proposed by Serhiy. It should save at least one pointer comparison for base class, but sometimes it actually led to slow-downs (although very small). How can one fight

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4768 ___ Python tracker ___ ___

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2017-12-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: I created an environment under 3.3.1 in which this error was still occurring, but within that same environment, it is not occurring for 3.7. I believe this can be closed. -- nosy: +csabella ___

[issue32143] os.statvfs lacks f_fsid

2017-12-14 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: This has landed on master and will be part of Python 3.7. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4767 ___ Python tracker ___ ___

[issue32329] PYTHONHASHSEED=0 python3 -R should enable hash randomization

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4766 stage: -> patch review ___ Python tracker ___

[issue32329] PYTHONHASHSEED=0 python3 -R should enable hash randomization

2017-12-14 Thread STINNER Victor
New submission from STINNER Victor : Python pretends that hash randomization is always enabled, but it's not: $ PYTHONHASHSEED=0 python3 -c 'import sys; print(sys.flags.hash_randomization)' 1 vstinner@apu$ PYTHONHASHSEED=0 python3 -c 'import sys; print(hash("abc"))'

[issue32143] os.statvfs lacks f_fsid

2017-12-14 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: New changeset 96a5e50a5de3683b2afd6d680c7ecc4b525986f6 by Fred Drake (Giuseppe Scrivano) in branch 'master': bpo-32143: add f_fsid to os.statvfs() (#4571) https://github.com/python/cpython/commit/96a5e50a5de3683b2afd6d680c7ecc4b525986f6

[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 2b5fd1e9ca9318673989e6ccac2c8acadc3809cd by Ivan Levkivskyi in branch 'master': bpo-32226: Implementation of PEP 560 (core components) (#4732)

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-14 Thread Armin Rigo
Change by Armin Rigo : -- nosy: -arigo ___ Python tracker ___ ___

[issue32328] ttk.Treeview: _tkinter.TclError: list element in quotes followed by "; " instead of space

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker ___

[issue32328] ttk.Treeview: _tkinter.TclError: list element in quotes followed by "; " instead of space

2017-12-14 Thread Joshua Kinard
New submission from Joshua Kinard : I think I've found another bug with Tkinter's string handling in Python 2.7.14, before it passes off to the TCL interpreter when inserting items into a ttk.Treeview widget. Specifically, it doesn't handle strings containing semi-colons

[issue32327] Make asyncio methods documented as coroutines - coroutines.

2017-12-14 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4765 stage: -> patch review ___ Python tracker ___

[issue32327] Make asyncio methods documented as coroutines - coroutines.

2017-12-14 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: +asvetlov ___ Python tracker ___ ___

[issue32327] Make asyncio methods documented as coroutines - coroutines.

2017-12-14 Thread Yury Selivanov
New submission from Yury Selivanov : There's a handful of event loop methods that are currently documented as coroutines, but in reality they return asyncio.Future: * loop.sock_sendall, * loop.sock_accept, * loop.sock_recv, and * loop.run_in_executor. These methods

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread Aaron Meurer
Aaron Meurer added the comment: Can't third party code write their own proxies? Why do we have to do that? -- ___ Python tracker

[issue28393] Update encoding lookup docs wrt #27938

2017-12-14 Thread Ville Skyttä
Ville Skyttä added the comment: I'm getting a 500 internatl server error trying to update https://bugs.python.org/review/28393/, so noting here that the latest review issue has been addressed in https://github.com/python/cpython/pull/4871 --

[issue27938] PyUnicode_AsEncodedString, PyUnicode_Decode: add fast-path for "us-ascii" encoding

2017-12-14 Thread Ville Skyttä
Change by Ville Skyttä : -- pull_requests: +4763 ___ Python tracker ___ ___

[issue28393] Update encoding lookup docs wrt #27938

2017-12-14 Thread Ville Skyttä
Change by Ville Skyttä : -- pull_requests: +4762 ___ Python tracker ___ ___

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With option 4 we need to add a custom wrapper not only for Shelf's KeysView, but for KeysView of all similar proxy classes, including classes in third-party code not available for us. This is impossible. --

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread Aaron Meurer
Aaron Meurer added the comment: Serhiy, isn't option 4? 4. Make KeysView.__repr__ show list(self). Add a custom wrapper for Shelf's KeysView so that it doesn't do this. This seems to be what Victor is suggesting. It makes the most sense to me for the common (i.e.,

[issue32326] Update Build projects to version 10.0.16299.0 of the Windows 10 SDK.

2017-12-14 Thread Decorater
Change by Decorater : -- components: +Build, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue32326] Update Build projects to version 10.0.16299.0 of the Windows 10 SDK.

2017-12-14 Thread Decorater
New submission from Decorater : It seems that When I uninstalled an older version of the Windows 10 SDK to make more disk space to update Visual Studio that now python 3.6 will not compile. I am not sure if Python 3.7 on master currently has this issue or not though I

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: The reason Python 2 did well here is simply that Python 2 had a single Python object (the file object) for each actual file. Python 3 has several of them (the raw IO object, the buffered IO object, possibly the text IO wrapper), and so

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-14 Thread Brett Cannon
Brett Cannon added the comment: Since the directory is where the code that is being executed exists don't you have to implicitly trust that directory is secure? Otherwise how can you even trust the code you're choosing to execute? -- nosy: +christian.heimes

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-14 Thread Neil Schemenauer
Neil Schemenauer added the comment: Attached is a script that triggers the non-flushing behaviour for me. I don't think it is reliable since it depends on the order that FileIO AND BufferedWriter are finalized when the gc finds them in a reference cycle. BTW, it is

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
Марк Коренберг added the comment: Also this: http://potaroo.net/ietf/idref/draft-kitamura-ipv6-zoneid-free/ So, I'm confused. Will investigate. -- ___ Python tracker

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
Марк Коренберг added the comment: https://url.spec.whatwg.org/#host-representation -> Support for is intentionally omitted. https://tools.ietf.org/html/rfc6874 -- ___ Python tracker

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 15a8728415e765f57e37f431f09e5c5821a04063 by Serhiy Storchaka in branch 'master': bpo-29469: Optimize literal lists and sets iterating on the AST level. (#4866)

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread R. David Murray
R. David Murray added the comment: In quick search the only RFC reference to this I found was https://tools.ietf.org/id/draft-sweet-uri-zoneid-01.html, which doesn't match what you are requesting (not that urlsplit's current behavior matches that either). Do you

[issue32311] Implement asyncio.create_task() shortcut

2017-12-14 Thread Yury Selivanov
New submission from Yury Selivanov : There's a lengthy discussion of this proposal over here: https://github.com/python/asyncio/issues/477 Guido there likes the idea of adding asyncio.create_task(), so let's add it. -- ___

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d1cb1067a82b11280204e36b695e786a5a3ca221 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (GH-4797) (#4869)

[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this is a cause. The difference may be dependent on the compiler and platform. -- nosy: +vstinner ___ Python tracker

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4866 also fixes the bug in optimizing chained 'i' and 'not in'. For example `1 in [1, 2] == [1, 2]` results in False (should be True) because it is changed to `1 in (1, 2) == [1, 2]`, and (1, 2) != [1, 2]. --

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Options: 1. Use the subclass of KeyView with overridden __repr__ for os.environ.keys(). This will add a code for pretty rare use case. 2. Remove os.environ.__repr__. You can use repr(os.environ.copy()) or

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I was going to request a test, but the fix is obvious and writing a test for this case can be not easy. Thank you Anthony for your report and patch. -- ___ Python tracker

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4761 ___ Python tracker ___

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 233ef249cc5c18d796fb581747179c5e062b4083 by Serhiy Storchaka (Anthony Sottile) in branch 'master': bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (#4797)

[issue32325] C API should use 'const char *' instead of 'char *'

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This already was done in issue28761. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-14 Thread Марк Коренберг
Марк Коренберг added the comment: Please look at my PR -- ___ Python tracker ___ ___

[issue32325] C API should use 'const char *' instead of 'char *'

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue32325] C API should use 'const char *' instead of 'char *'

2017-12-14 Thread Stephen Kelly
New submission from Stephen Kelly : When using C++ to extend python, one may use PyGetSetDef for example: static PyGetSetDef Noddy_getseters[] = { {"first", (getter)Noddy_getfirst, (setter)Noddy_setfirst, "first name", NULL}, {"last",

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: Cheryl: "Thanks! Yes, I can work this. It may take a few days for me to get to it." It seems like we have a disagreement on how to fix this issue. We should first agree on the best solution. --

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: Currently, repr(Shelf.keys()) doesn't dump the content of the shelf: >>> import pickle, shelve >>> s=shelve.Shelf({b'key': pickle.dumps('value')}) >>> k=s.keys() >>> k KeysView() >>> list(k) ['key'] >>> list(s.values()) ['value'] I

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: See also https://github.com/python/cpython/pull/4868 : I propose a change to factorize the code, but the side effect is that sys.path is now modified before "import readline" (when using the -i option, like "python3 -i directory").

[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-14 Thread Guido van Rossum
Guido van Rossum added the comment: > This adds an overhead to every indexing. I'm not doubting your results, but I'm curious how that happened. The extra code in PyObject_GetItem is right before the point where it would otherwise raise TypeError -- I presume you benchmark

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: "python3 directory" and "python3 testzip.zip" are implemented by calling runpy._run_module_as_main("__main__", set_argv0). Currently, sys.path is modified before calling _run_module_as_main(). Would it be possible to pass an

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-14 Thread STINNER Victor
New submission from STINNER Victor : Christian Heimes, author of the -I option (isolated mode), asked me to open an issue to check if the following behaviour is correct (safe in term of security). "python3 directory" inserts "directory" at sys.path[0], even in

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: Victor, Thanks! Yes, I can work this. It may take a few days for me to get to it. -- ___ Python tracker

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4760 ___ Python tracker ___ ___

[issue32314] Implement asyncio.run()

2017-12-14 Thread Yury Selivanov
Yury Selivanov added the comment: > Wow, I really love your new function. Thanks Yury! asyncio examples in the > doc look much better now! This year I'll stay for the sprints at PyCon, and will focus on improving the docs further. I needed asyncio.run for that :)

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
Change by Марк Коренберг : -- keywords: +patch pull_requests: +4758 stage: -> patch review ___ Python tracker ___

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread Natanael Copa
Natanael Copa added the comment: Exactly same as previous patch, but refactored to only have a single pthread_attr_destroy() call instead of 3. diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index b7463c0ca6..1006a168fa 100644 ---

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread Марк Коренберг
New submission from Марк Коренберг : qwe = urlsplit('http://[FE80::822a:a8ff:fe49:470c%Тест]:1234/keys') qwe.hostname will be 'fe80::822a:a8ff:fe49:470c%тест' Which is wrong. correct value is 'fe80::822a:a8ff:fe49:470c%Тест' so, IP-address is lowercased and zone id does

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread R. David Murray
R. David Murray added the comment: I think we need people who do a lot of work at the C level to evaluate this, so I've added a couple to the nosy list :) -- nosy: +serhiy.storchaka, vstinner ___ Python tracker

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread Natanael Copa
Natanael Copa added the comment: I suggest a runtime check like this: diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index b7463c0ca6..e9d0f638c9 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -34,6 +34,8 @@ #undef

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4757 ___ Python tracker ___ ___

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: closed -> open ___ Python tracker ___

[issue32314] Implement asyncio.run()

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: Wow, I really love your new function. Thanks Yury! asyncio examples in the doc look much better now! -- nosy: +vstinner ___ Python tracker

[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2017-12-14 Thread Rostislav Kondratenko
New submission from Rostislav Kondratenko : If one creates a type with both Py_TPFLAGS_HAVE_GC and Py_TPFLAGS_HEAPTYPE set and implemented, one has to create instances with PyObject_GC_New() per current docs: https://docs.python.org/3.7/c-api/gcsupport.html . However,

[issue32314] Implement asyncio.run()

2017-12-14 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32314] Implement asyncio.run()

2017-12-14 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 02a0a19206da6902c3855a1fa09e60b208474cfa by Yury Selivanov in branch 'master': bpo-32314: Implement asyncio.run() (#4852) https://github.com/python/cpython/commit/02a0a19206da6902c3855a1fa09e60b208474cfa --

[issue29469] AST-level Constant folding

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: Thank you very much Naoki for taking time to implement this obvious "optimization", rewriting the peephole optimizer at the AST level, rather than modifying bytecode which is more complex to get it right and had annoying side effect

[issue32297] Few misspellings found in Python source code comments.

2017-12-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 28453feaa8d88bbcbf6d834b1d5ca396d17265f2 by Andrew Svetlov in branch '3.6': [3.6] bpo-32297: Fix misspellings in Python source code comments (GH-4803) (#4864)

[issue21074] Too aggressive constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4756 ___ Python tracker ___ ___

[issue30416] constant folding opens compiler to quadratic time hashing

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4755 ___ Python tracker ___ ___

[issue26549] co_stacksize is calculated from unoptimized code

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: > Seems moving constant folding to the AST level (issue29469) have solved this > issue. Wow, it's cool to see this bug finally fixed! -- ___ Python tracker

[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2017-12-14 Thread Steven D'Aprano
New submission from Steven D'Aprano : The functools module imports reduce from _functools, using a guard in case it is not present: try: from _functools import reduce except ImportError: pass However, the documentation says nothing about reduce being

[issue29469] AST-level Constant folding

2017-12-14 Thread INADA Naoki
INADA Naoki added the comment: New changeset eadad1b97f64619bfd246b9d3b60d25f456e0592 by INADA Naoki in branch 'master': bpo-29469: Remove unnecessary peephole optimizer (GH-4863) https://github.com/python/cpython/commit/eadad1b97f64619bfd246b9d3b60d25f456e0592

[issue27695] Long constant calculations stall compilation

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Too aggressive constant folding ___ Python tracker

  1   2   >