[issue32319] re fullmatch error with non greedy modifier

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, this is not how fullmatch() works. Otherwise there wouldn't be need to add it into the stdlib. You could just check end() of the result. fullmatch() acts like match() with added \Z. But if the pattern contains multiple alternates you need to add \Z at t

[issue28813] Remove unneeded folded consts after peephole

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Moving constant folding to the AST level (issue29469) have made this patch outdated. In any case thank you for your patch Adrian. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed superseder: -> AST-level Constant

[issue26549] co_stacksize is calculated from unoptimized code

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems moving constant folding to the AST level (issue29469) have solved this issue. >>> def foo(): ... a = (1,2,3,4,5,6,7,8,9,10) ... >>> foo.__code__.co_stacksize 1 -- resolution: -> out of date stage: -> resolved status: open -> closed supe

[issue32320] Add default value support to collections.namedtuple()

2017-12-14 Thread Raymond Hettinger
New submission from Raymond Hettinger : Add default argument support and _fields_defaults attribute modeled after typing.NamedTuple. -- components: Library (Lib) messages: 308282 nosy: rhettinger priority: normal severity: normal stage: patch review status: open title: Add default value

[issue32320] Add default value support to collections.namedtuple()

2017-12-14 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +4748 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue29469] AST-level Constant folding

2017-12-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM, the constant-tracking macros for peephole.c can also be removed, essentially reverting back to the simpler cumlc-style code in Py2.5. -- nosy: +rhettinger ___ Python tracker

[issue30416] constant folding opens compiler to quadratic time hashing

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4749 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue21074] Too aggressive constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4750 stage: needs patch -> patch review ___ Python tracker ___ ___ P

[issue32302] test_distutils: test_get_exe_bytes() failure on AppVeyor

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9e7c136ad8bc8e8eec50c2a8ae5ff02752f695a2 by Victor Stinner in branch 'master': bpo-32302: Fix distutils bdist_wininst for CRT v142 (#4851) https://github.com/python/cpython/commit/9e7c136ad8bc8e8eec50c2a8ae5ff02752f695a2 -- ___

[issue32302] test_distutils: test_get_exe_bytes() failure on AppVeyor

2017-12-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4751 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32225] Implement PEP 562: module __getattr__ and __dir__

2017-12-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 5364b5cd7571f2dfa75acd37b388c14ac33fef73 by Ivan Levkivskyi in branch 'master': bpo-32225: Implementation of PEP 562 (#4731) https://github.com/python/cpython/commit/5364b5cd7571f2dfa75acd37b388c14ac33fef73 --

[issue32302] test_distutils: test_get_exe_bytes() failure on AppVeyor

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 645fa19f15cddeec8d882a9e1420173e7516f0e4 by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-32302: Fix distutils bdist_wininst for CRT v142 (GH-4851) (#4861) https://github.com/python/cpython/commit/645fa19f15cddeec8d882a9e1420173e7516

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

2017-12-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 53f7a7c2814fbfd8a29200926601a32fa48bacb3 by Andrew Svetlov (Mike) in branch 'master': bpo-32297: Few misspellings found in Python source code comments. (#4803) https://github.com/python/cpython/commit/53f7a7c2814fbfd8a29200926601a32fa48bacb3 --

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 374c6e178a7599aae46c857b17c6c8bc19dfe4c2 by Victor Stinner in branch 'master': bpo-32030: Add _PyMainInterpreterConfig.warnoptions (#4855) https://github.com/python/cpython/commit/374c6e178a7599aae46c857b17c6c8bc19dfe4c2 -- ___

[issue32302] test_distutils: test_get_exe_bytes() failure on AppVeyor

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: It seems like AppVeyor is fixed, thanks Steve for the help! Later, it would be nice to write a more generic fix than hardcoding two minor versions. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed __

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

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

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

2017-12-14 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +4752 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29469] AST-level Constant folding

2017-12-14 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +4753 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue32225] Implement PEP 562: module __getattr__ and __dir__

2017-12-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Travis build on master successful, so I am closing this issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

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

2017-12-14 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +4754 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

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

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This adds an overhead to every indexing. $ ./python -m perf timeit --compare-to=./python0 -s 'a = [1]' --duplicate=1 'a[0]' python0: . 15.3 ns +- 0.5 ns python: . 16.1 ns +- 0.3 ns Mean +- std dev: [python0] 15.3

[issue32143] os.statvfs lacks f_fsid

2017-12-14 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: I think Giuseppe's patch is good, but there's a Windows failure on AppVeyor, so I'm a little wary. It doesn't look related, but I haven't looked at Python on Windows since... 2001, maybe? -- ___ 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: With "bad assumption" I mean that currently the code assumes that all unknown systems has big enough default thread stack size. This would not be a "bad assumption" if POSIX (or any other standard) would specify a requirement on the default stack size. To my u

[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 ran a test of pthread_attr_getstacksize() on various systems. Here is what they return: Linux/glibc: 8388608 MacOS: 524288 FreeBSD 11.1: 0 (ulimit -s gives 524288) NetBSD 7.1: 4194304 OpenBSD 6.2: 524288 I could not see any #ifdef for __O

[issue1346238] A constant folding optimization pass for the AST

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Have been implemented in issue29469. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> AST-level Constant folding ___ Python tracker

[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 ___ _

[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 -- __

[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 optional, and it is unconditional

[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

[issue30416] constant folding opens compiler to quadratic time hashing

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4755 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue21074] Too aggressive constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4756 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[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) https://github.com/python/cpython/commit/28453feaa8d88bbcbf6d834b1d5ca396d17265f2 --

[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 (like inefficient stack si

[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 --

[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 ___ ___

[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, PyObject_GC_New() unlike

[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 __

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4757 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[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 THREAD_STACK_SIZE #define THREAD_STACK

[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

[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 not. -- compo

[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 --- a/Python/thread_pthread.h +++ b/Python/thread_p

[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 ___ ___ Python-bugs-li

[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 :) -- ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4760 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[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 ___ ___

[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 isolated mode. Example: --- vstin

[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 additional path to importlib to im

[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 never reached that po

[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"). -- ___

[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 understand that changing Key

[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. -- ___ Python tracke

[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", (getter)Noddy_getlast, (setter)N

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[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 ___ __

[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) https://github.com/python/cpython/commit/233ef249cc5c18d796fb58174

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

2017-12-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4761 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[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

[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 repr(dict(os.environ)) if you want to see a content

[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]. --

[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 ___ __

[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) https://github.com/python/cpython/commit/d1cb1067a82b

[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 ___ _

[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. -- ___ Python tracker

[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 have RFC references? -

[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) https://github.com/python/cpython/commit/15a8728415e765f57e37f431f09e5c5821a04063

[issue29469] AST-level Constant folding

2017-12-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[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 ___

[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 ___

[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 arguable that the root cau

[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 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 suddenly the finalizat

[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 still have not tested it

[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 ___ ___

[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., default) case to be to sho

[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. -- ___ P

[issue28393] Update encoding lookup docs wrt #27938

2017-12-14 Thread Ville Skyttä
Change by Ville Skyttä : -- pull_requests: +4762 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[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 -- ___ Py

[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 ___ ___

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

2017-12-14 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[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 need to become proper cor

[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 ___ ___ Python-bugs-li

[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 very well if they are

[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 ___ ___ Python-bugs-list ma

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[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) https://github.com/python/cpython/commit/2b5fd1e9ca9318673989e6ccac2c8acadc3809cd -- __

[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 -- _

[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"))' 4596069200710135518 vstinner@

[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 ___ ___ Python-bugs-li

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4767 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[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 _

[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 ___ Python tracker

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4768 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[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 this kind of problems?

[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 similar when I tried to add a fast loop > proposed by Serhiy. It

[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 -- ___

  1   2   >