[issue29469] AST-level Constant folding

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

[issue29469] AST-level Constant folding

2017-12-15 Thread INADA Naoki
INADA Naoki 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. I tried it in GH-4879. -- ___ Python tracker

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-15 Thread INADA Naoki
INADA Naoki added the comment: Should we backport it to 3.6? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

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

[issue22091] __debug__ in compile(optimize=1)

2017-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4775 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-15 Thread INADA Naoki
INADA Naoki added the comment: Document of socket.type says: The socket type. https://docs.python.org/3/library/socket.html#socket.socket.type OK, so, are SOCK_CLOEXEC and SOCK_NONBLOCK socket type? These two constants, if defined, can be combined with the socket types and allow you t

[issue32240] Add the const qualifier for PyObject* array arguments

2017-12-15 Thread Stefan Behnel
Stefan Behnel added the comment: Seems ok from Cython side. Could be a bit difficult to make an actual use of this, but at least it shouldn't break anything. And it's a reasonable constraint to enforce. -- ___ Python tracker

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

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 297fd876aad8ef443d8992618de22c46dbda258b by Victor Stinner (Ville Skyttä) in branch 'master': bpo-28393: Update encoding lookup docs wrt bpo-27938 (#4871) https://github.com/python/cpython/commit/297fd876aad8ef443d8992618de22c46dbda258b ---

[issue32311] Implement asyncio.create_task() shortcut

2017-12-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for careful review! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue28393] Update encoding lookup docs wrt #27938

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 297fd876aad8ef443d8992618de22c46dbda258b by Victor Stinner (Ville Skyttä) in branch 'master': bpo-28393: Update encoding lookup docs wrt bpo-27938 (#4871) https://github.com/python/cpython/commit/297fd876aad8ef443d8992618de22c46dbda258b ---

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-15 Thread Christian Heimes
Christian Heimes added the comment: Python's handling of socket has multiple issues, see #28134 for more fun. At the moment the values of type, family and protocol are unreliable at best and dangerously wrong at worst. The attributes are only correct if and only if the socket has not been cre

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

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

[issue28393] Update encoding lookup docs wrt #27938

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

[issue22091] __debug__ in compile(optimize=1)

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3325a6780c81f1ea51190370b5454879c4862a37 by Serhiy Storchaka in branch 'master': bpo-27169: The __debug__ constant is now optimized out at compile time. (#4880) https://github.com/python/cpython/commit/3325a6780c81f1ea51190370b5454879c4862a37

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3325a6780c81f1ea51190370b5454879c4862a37 by Serhiy Storchaka in branch 'master': bpo-27169: The __debug__ constant is now optimized out at compile time. (#4880) https://github.com/python/cpython/commit/3325a6780c81f1ea51190370b5454879c4862a37

[issue22091] __debug__ in compile(optimize=1)

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it worth to backport this change? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22091] __debug__ in compile(optimize=1)

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: > Is it worth to backport this change? It's an optimization, usually the answer is no. The change is short and can be seen as a bugfix, so it's up to you, it's ok to backport to 3.6, and maybe even 2.7, if it's not too hard to write the backport. --

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

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

[issue22091] __debug__ in compile(optimize=1)

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

[issue32240] Add the const qualifier for PyObject* array arguments

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a5552f023e1d8cbafee1e51d316cc581deb2295f by Serhiy Storchaka in branch 'master': bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. (#4746) https://github.com/python/cpython/commit/a5552f023e1d8cbafee1e51d316cc581

[issue32240] Add the const qualifier for PyObject* array arguments

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

[issue22091] __debug__ in compile(optimize=1)

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b82da9ebb20053637e731fd40589e1e52f9f8f6e by Serhiy Storchaka in branch '3.6': [3.6] bpo-27169: The __debug__ constant is now optimized out at compile time. (GH-4880) (#4882) https://github.com/python/cpython/commit/b82da9ebb20053637e731fd40589

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b82da9ebb20053637e731fd40589e1e52f9f8f6e by Serhiy Storchaka in branch '3.6': [3.6] bpo-27169: The __debug__ constant is now optimized out at compile time. (GH-4880) (#4882) https://github.com/python/cpython/commit/b82da9ebb20053637e731fd40589

[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: -Build-out an AST optimizer, moving some functionality out of the peephole optimizer resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker

[issue22091] __debug__ in compile(optimize=1)

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The backport to 3.6 is straightforward, but backporting to 2.7 would require larger changes. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

[issue32222] pygettext doesn't extract docstrings for functions with type annotated params

2017-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.5 ___ Python tracker ___ _

[issue21074] Too aggressive constant folding

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2e3f5701858d1fc04caedefdd9a8ea43810270d2 by Serhiy Storchaka in branch 'master': bpo-30416: Protect the optimizer during constant folding. (#4860) https://github.com/python/cpython/commit/2e3f5701858d1fc04caedefdd9a8ea43810270d2 -- _

[issue30416] constant folding opens compiler to quadratic time hashing

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2e3f5701858d1fc04caedefdd9a8ea43810270d2 by Serhiy Storchaka in branch 'master': bpo-30416: Protect the optimizer during constant folding. (#4860) https://github.com/python/cpython/commit/2e3f5701858d1fc04caedefdd9a8ea43810270d2 -- _

[issue21074] Too aggressive constant folding

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b580f4f2bf49fd3b11f2a046911993560c02492a by Serhiy Storchaka in branch '3.6': [3.6] bpo-30416: Protect the optimizer during constant folding. (#4865) https://github.com/python/cpython/commit/b580f4f2bf49fd3b11f2a046911993560c02492a --

[issue30416] constant folding opens compiler to quadratic time hashing

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b580f4f2bf49fd3b11f2a046911993560c02492a by Serhiy Storchaka in branch '3.6': [3.6] bpo-30416: Protect the optimizer during constant folding. (#4865) https://github.com/python/cpython/commit/b580f4f2bf49fd3b11f2a046911993560c02492a --

[issue32265] Correctly classify builtin static and class methods

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

[issue32265] Correctly classify builtin static and class methods

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3327a2ddf1eaf8cc678f0219ba9edf7d632d1b20 by Serhiy Storchaka in branch 'master': bpo-32265: Classify class and static methods of builtin types. (#4776) https://github.com/python/cpython/commit/3327a2ddf1eaf8cc678f0219ba9edf7d632d1b20

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

2017-12-15 Thread STINNER Victor
STINNER Victor 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? The question is if the following example must work wit

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

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 77bf6da7258b4a312e224860ea50ac010aa17c1e by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-28393: Update encoding lookup docs wrt bpo-27938 (GH-4871) (#4881) https://github.com/python/cpython/commit/77bf6da7258b4a312e224860ea50ac010aa

[issue28393] Update encoding lookup docs wrt #27938

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 77bf6da7258b4a312e224860ea50ac010aa17c1e by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-28393: Update encoding lookup docs wrt bpo-27938 (GH-4871) (#4881) https://github.com/python/cpython/commit/77bf6da7258b4a312e224860ea50ac010aa

[issue28393] Update encoding lookup docs wrt #27938

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: Thank you Ville Skyttä for your contribution! I merged your PR and backported it to Python 3.6. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: Dummy question. If lchmod() is not supported by the libc, would it be possible to reimplement it using readlink()? -- ___ Python tracker ___

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

2017-12-15 Thread R. David Murray
R. David Murray added the comment: I do wonder where you are using the string version of messages :) I actually thought I'd already done this (errors=replace), but obviously not. I don't have time now to work on a patch for this, and the patch in the other issue hasn't be updated to reflect

[issue32333] test_smtplib: dangling threads on x86 Gentoo Non-Debug with X 3.x

2017-12-15 Thread STINNER Victor
New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/99/builds/363 0:00:16 load avg: 2.60 [ 12/412/1] test_smtplib failed (env changed) testFailingHELO (test.test_smtplib.BadHELOServerTests) ... ok (...) testLineTooLong (test.test_smtplib.TooLongLineTests) ... ok -

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

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4883 shows how magic methods for PEP 560 can be implemented without introducing new slots. -- ___ Python tracker ___ ___

[issue32334] test_configparser left @test_2876_tmp temporary file on x86 Windows7 3.x

2017-12-15 Thread STINNER Victor
New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/58/builds/332 running: test_multiprocessing_spawn (901 sec), test_concurrent_futures (151 sec) 0:47:16 [250/413/1] test_multiprocessing_spawn crashed (Exit code 1) -- running: test_concurrent_futures (154 sec) Timeou

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

2017-12-15 Thread Yury Selivanov
Yury Selivanov added the comment: Serhiy, I've tested METH_STATIC approach and it works just fine. Thanks for pointing that out! I agree that adding slots for something that's already possible is an overkill, so let's close this issue. -- resolution: -> rejected stage: patch review

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

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

[issue32294] test_semaphore_tracker() of test_multiprocessing_spawn fails with -W error

2017-12-15 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4781 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32124] Document functions safe to be called before Py_Initialize()

2017-12-15 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: I really have no clue on the root bug, and the bug only occurred once, so I choose to close it. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue31971] idle_test: failures on x86 Windows7 3.x

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: Terry: you proposed a fix, do you still want to write it? The buildbot didn't fail again since I reported the failure. -- ___ Python tracker

[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: The AMD64 Windows10 3.x buildbot: is green again, I close the issue. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker __

[issue31964] [3.4][3.5] pyexpat: compilaton of libexpat fails with: ISO C90 forbids mixed declarations and code

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: The bug has been fixed by commit 8b11e8de7aedacfbbcc8c780f3c4097396f1d1a3 in Python 3.4 -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker __

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

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 642d67b4f25262889b43f91ad2a96ca0e37fd5a2 by Victor Stinner in branch 'master': bpo-32329: Add versionchanged to -R option doc (#4884) https://github.com/python/cpython/commit/642d67b4f25262889b43f91ad2a96ca0e37fd5a2 --

[issue32294] test_semaphore_tracker() of test_multiprocessing_spawn fails with -W error

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9402c8367bf6ada1b84f620ad957750c33adbaf9 by Victor Stinner in branch 'master': bpo-32294: Fix multiprocessing test_semaphore_tracker() (#4885) https://github.com/python/cpython/commit/9402c8367bf6ada1b84f620ad957750c33adbaf9 -- ___

[issue32294] test_semaphore_tracker() of test_multiprocessing_spawn fails with -W error

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

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-15 Thread Anthony Sottile
Anthony Sottile added the comment: if I'm reading the manpage correctly: `readlink` tells the filename that the symlink points to. lchmod is concerned with setting the `stat` on the link itself (which only some platforms actually support) -- ___ P

[issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: Another different failure on "bolen-dmg-3.x". I don't understand the "RuntimeError: command failed: make" error :-( http://buildbot.python.org/all/#/builders/69/builds/69 (...) gcc-4.0 -c -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -

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

2017-12-15 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: > if I'm reading the manpage correctly: `readlink` tells the filename that the > symlink points to. lchmod is concerned with setting the `stat` on the link > itself (which only some platforms actually support) Oops, my bad. Ignore my comment :-) --

[issue32333] test_smtplib: dangling threads on x86 Gentoo Non-Debug with X 3.x

2017-12-15 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue31265] Remove doubly-linked list from C OrderedDict

2017-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32294] test_semaphore_tracker() of test_multiprocessing_spawn fails with -W error

2017-12-15 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-15 Thread Yury Selivanov
Yury Selivanov added the comment: > You can easily work around your problem by replacing "sock.type == > SOCK_STREAM" with "sock.type & SOCK_STREAM == SOCK_STREAM". Heh :) No, that would be a buggy code. Try this on your Linux box: (socket.SOCK_SEQPACKET & socket.SOCK_STREAM) == socket.S

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-15 Thread Yury Selivanov
Yury Selivanov added the comment: On GH (https://github.com/python/cpython/pull/4877), Antoine wrote: > I agree with Victor: > it can't go into 3.6 > making the change in 3.7 is contentious > Can there be an other way to solve the issue? Can we for example keep > socket.type as it is and add

[issue32331] apply SOCK_TYPE_MASK to socket.type on Linux

2017-12-15 Thread Christian Heimes
Christian Heimes added the comment: Should socket.true_type use getsockopt(fd, ...) to get the actual type? While we are talking about socket types, please have a look at #28134 . -- ___ Python tracker _

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

2017-12-15 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

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

2017-12-15 Thread Neil Schemenauer
Neil Schemenauer added the comment: In the process of trying to write a test for this, I now realize that PR 4847 is not really a fix. If the underlying file gets closed during an earlier gc.collect() and not during shutdown, the extra flushing step is not going to help. So, using atexit is

[issue32335] Failed Python build on Fedora 27

2017-12-15 Thread Amit Ghadge
New submission from Amit Ghadge : Hi, I'm try to build Python from source on Fedora 27 but it shows below message and build was failed, gcc -pthread -Xlinker -export-dynamic -o python Programs/python.o libpython3.7dm.a -lpthread -ldl -lutil -lm gcc -pthread -Xlinker -export-dynamic -o

[issue32335] Failed Python build on Fedora 27

2017-12-15 Thread Amit Ghadge
Amit Ghadge added the comment: After the some investigation, 1f06a680de465be0c24a78ea3b610053955daa99 PR was OK, a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 build failed but ./python run 88c60c9668f0aa732693517a60b851cc1dfce0cb build failed and same error comes after click ./python -- __

[issue32335] Failed Python build on Fedora 27

2017-12-15 Thread Amit Ghadge
Amit Ghadge added the comment: My current git log is, Author: Victor Stinner Date: Fri Dec 15 16:29:24 2017 +0100 bpo-32294: Fix multiprocessing test_semaphore_tracker() (#4885) -- ___ Python tracker

[issue32336] Save OrderedDict import in argparse

2017-12-15 Thread Raymond Hettinger
New submission from Raymond Hettinger : Since regular dicts are now ordered by default, the OrderedDict import is no longer necessary. Removing it will give a small boost to start-up time. -- assignee: bethard components: Library (Lib) messages: 308416 nosy: bethard, rhettinger priorit

[issue32336] Save OrderedDict import in argparse

2017-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +4783 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue32337] Dict order is now guaranteed, so add tests for it

2017-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger components: Tests nosy: rhettinger priority: normal severity: normal stage: needs patch status: open title: Dict order is now guaranteed, so add tests for it versions: Python 3.7 ___ Python tracker

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

2017-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not well known with GC, but if it be possible to call destructors in the reversed chronological order, this could help with this issue. -- ___ Python tracker _

[issue32338] Save OrderedDict import in re

2017-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Since regular dicts are now ordered by default, the OrderedDict import is no longer necessary. -- components: Library (Lib), Regular Expressions messages: 308418 nosy: ezio.melotti, mrabarnett, rhettinger, serhiy.storchaka priority: normal severity

[issue32338] Save OrderedDict import in re

2017-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4784 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

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

2017-12-15 Thread Neil Schemenauer
Neil Schemenauer added the comment: Using reversed chronological order would work in 99% of the cases probably but then you would have that rare case where it didn't work. So, I'm not too keen on that approach. I think this is a classic problem with finalization and GC, probably should do s

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2017-12-15 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +4785 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

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

2017-12-15 Thread Nitish
Change by Nitish : -- nosy: +nitishch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue32339] Make the dict type used in csv.DictReader configurable

2017-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Since 3.6 csv.DictReader emits OrderedDicts instead of regular dicts. Since regular dicts are ordered in 3.7, this is an overkill. It would be nice to add a configuration option for a return type. This is an easy issue. -- components: Library (Li

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

2017-12-15 Thread Mark Sapiro
Mark Sapiro added the comment: > I do wonder where you are using the string version of messages :) Probably some places where we could use bytes, but one of the problem areas is where we save the content of a message held for moderation. -- ___ Pyt

[issue31971] idle_test: failures on x86 Windows7 3.x

2017-12-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: I want to add the try-except here and in the few other places where a method is temporarily masked. One failure causing another strikes me a test code bug. I would like to hold off on adding 'hover', as it now seems to have been an idiosyncratic and tempor

[issue32340] ValueError: time data 'N/A' does not match format '%Y%m%d'

2017-12-15 Thread ikram
New submission from ikram : Traceback (most recent call last): File "H:\Whatsapp_Xtract_V2.2_2012-11-17\whatsapp_xtract.py", line 2453, in main(sys.argv[1:]) File "H:\Whatsapp_Xtract_V2.2_2012-11-17\whatsapp_xtract.py", line 1921, in main linkimage = findfile ("IMG", y.media_size,

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

2017-12-15 Thread Nikolaus Rath
Nikolaus Rath added the comment: Given the apparent difficulties getting this right, how about not attempting to implicitly flush buffers in the finalizer at all? This means scripts relying on this will break, but in contrast to the current behavior they will break consistently so it's easy t

[issue32341] itertools "generators"?

2017-12-15 Thread Stefan Pochmann
New submission from Stefan Pochmann : The itertools page https://docs.python.org/3.6/library/itertools.html says "Combinatoric generators:" above the table with product(), permutations(), etc. But as far as I understand, they're not generators and they don't produce generator iterators. I thin

[issue32341] itertools "generators"?

2017-12-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: The term is used in the generic sense rather than the sense of an actual type. That said, I don't mind changing "Combinatoric generators" to "Combinatoric iterators" for 3.6 and 3.7. Otherwise, this isn't worth the backport effort. -- assignee:

[issue32341] itertools "generators"?

2017-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +4786 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue29240] PEP 540: Add a new UTF-8 mode

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

[issue30416] constant folding opens compiler to quadratic time hashing

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

[issue21074] Too aggressive constant folding

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

[issue32341] itertools "generators"?

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

[issue32341] itertools "generators"?

2017-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32340] ValueError: time data 'N/A' does not match format '%Y%m%d'

2017-12-15 Thread R. David Murray
R. David Murray added the comment: This is not a bug in python. If it is your code contact the pyhon-list mailing for help. If you got whatsapp_xtract from somewhere else, contact that community with your questions. -- nosy: +r.david.murray resolution: -> third party stage: -> res

[issue32337] Dict order is now guaranteed, so add tests and doc for it

2017-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- title: Dict order is now guaranteed, so add tests for it -> Dict order is now guaranteed, so add tests and doc for it ___ Python tracker ___ __

[issue32342] safe_power(): CID 1426161: Integer handling issues (DIVIDE_BY_ZERO)

2017-12-15 Thread STINNER Victor
New submission from STINNER Victor : Coverity found an issue in the commit 2e3f5701858d1fc04caedefdd9a8ea43810270d2 (bpo-30416). New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1426161: Integer handling issues (DIVIDE_BY_ZERO) /Python/ast_opt.c: 219 in safe_power()

[issue32342] safe_power(): CID 1426161: Integer handling issues (DIVIDE_BY_ZERO)

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: PyLong_AsSize_t(w) cannot be zero thanks to Py_SIZE(w) > 0. I classified the issue as a false positive. Sorry for the noise. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

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

2017-12-15 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue29240] PEP 540: Add a new UTF-8 mode

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset d2b02310acbfe6c978a8ad3cd3ac8b3f12927442 by Victor Stinner in branch 'master': bpo-29240: Don't define decode_locale() on macOS (#4895) https://github.com/python/cpython/commit/d2b02310acbfe6c978a8ad3cd3ac8b3f12927442 -- __

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

2017-12-15 Thread Brett Cannon
Brett Cannon added the comment: I vote that it has to work and it should be prepended. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue32331] Add socket.truetype property

2017-12-15 Thread Yury Selivanov
Change by Yury Selivanov : -- title: apply SOCK_TYPE_MASK to socket.type on Linux -> Add socket.truetype property ___ Python tracker ___ ___

[issue32331] Add socket.truetype property

2017-12-15 Thread Yury Selivanov
Yury Selivanov added the comment: Update: I've rewritten the PR from scratch. 1. SOCK_TYPE_MASK isn't exported on Linux. Therefore we will not export socket.SOCK_TYPE_MASK too. 2. I've added the new socket.truetype property. 3. When a socket is created without an FD, e.g. "socket.socket(fa

[issue28134] socket.socket(fileno=fd) does not work as documented

2017-12-15 Thread Yury Selivanov
Yury Selivanov added the comment: Let's quickly iterate over what's possible first: * It's possible to check the type of the FD using "getsockopt(SOL_SOCKET, SO_TYPE)" on all platforms. * It's possible to check family/proto of the FD using "getsockopt(SOL_SOCKET, SO_DOMAIN/SO_PROTOCOL)" on L

[issue32339] Make the dict type used in csv.DictReader configurable

2017-12-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: For csv.DictReader and collections.namedtuple._asdict, it might be cleaner to just deprecate the OrderedDict in favor of returning regular dict. I suspect that in these contexts, no one really wants an actual OrderedDict. -- nosy: +rhettinger ___

  1   2   >