[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

2017-09-17 Thread Nick Coghlan
Nick Coghlan added the comment: As far the implementation goes, since the `__dir__` overload support in the `dir()` builtin ignores instance dictionaries, this could be implemented in module.__dir__ (or object.__dir__) rather than directly in the builtin. Alternatively, it could use a

[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

2017-09-17 Thread Nick Coghlan
Nick Coghlan added the comment: While I agree changing the default would be risky from a compatibility perspective, I do think it would be helpful to offer a straightforward way to filter out transitive imports and other non-public implementation details from the result of `dir(module)`, and

[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Guido on python-ideas: I ave to agree with the other committers who already spoke up. Me: I use dir to see the complete list now presently presented. The presence or absence of __file__ indicates coded on Python or not. IDLE module completion start with

[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

2017-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think change this would be risky and could break code that uses dir() to actually know what is in a module. IIRC, this was discussed when __all__ was introduced. I believe it was decided that __all__ would affect from-imports and help() but not dir().

[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

2017-09-17 Thread Cody Piersall
New submission from Cody Piersall: If a some_module defines __all__, dir(some_module) should only return what is in __all__. This is already a mechanism that Python provides to specify module-level APIs. Currently, dir(some_module) returns some_module.__dict__.keys(). The concern with this

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 84c89ef4e5086e71e3d9ee65cd3620bf8174c9ac by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': [3.6] bpo-30928: Update idlelib/NEWS.txt to 2017 Sep 17. (GH-3635) (#3637)

[issue31501] Operator precedence description for arithmetic operators

2017-09-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31501] Operator precedence description for arithmetic operators

2017-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 9b47af65375fab9318e88ccb061394a36c8c6c33 by Raymond Hettinger (svelankar) in branch 'master': bpo-31501: Operator precedence description for arithmetic operators (#3633)

[issue31501] Operator precedence description for arithmetic operators

2017-09-17 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3630 ___ Python tracker ___

[issue31501] Operator precedence description for arithmetic operators

2017-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a reasonable proposal. -- nosy: +rhettinger versions: +Python 3.6 ___ Python tracker ___

[issue31502] IDLE: Config dialog again deletes custom themes and keysets.

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 6b4d8ba0971355027b8981a45a0a62ac1ef9a456 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634) (#3636)

[issue31287] IDLE configdialog tests: don't modify tkinter.messagebox.

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 6b4d8ba0971355027b8981a45a0a62ac1ef9a456 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634) (#3636)

[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-17 Thread Martin Panter
Martin Panter added the comment: >>> f"{number:#0x}" # using integer format specifier It’s not clear what your purpose was adding the above line, but the zero flag (0) does nothing because there is no “width” field. I think it could be misleading, because it is actually the “#x” codes that

[issue31287] IDLE configdialog tests: don't modify tkinter.messagebox.

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0efc7c67a2f8a184e93f9a491305c81ef2e24250 by Terry Jan Reedy in branch 'master': bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (#3634) https://github.com/python/cpython/commit/0efc7c67a2f8a184e93f9a491305c81ef2e24250

[issue31502] IDLE: Config dialog again deletes custom themes and keysets.

2017-09-17 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3627 ___ Python tracker ___

[issue31287] IDLE configdialog tests: don't modify tkinter.messagebox.

2017-09-17 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3628 ___ Python tracker ___

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-09-17 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3629 stage: needs patch -> patch review ___ Python tracker ___

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 55679e0ec76ee3b30ca609948f47bb02a8e0a078 by Terry Jan Reedy in branch 'master': bpo-30928: Update idlelib/NEWS.txt to 2017 Sep 17. (#3635) https://github.com/python/cpython/commit/55679e0ec76ee3b30ca609948f47bb02a8e0a078 --

[issue31502] IDLE: Config dialog again deletes custom themes and keysets.

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0efc7c67a2f8a184e93f9a491305c81ef2e24250 by Terry Jan Reedy in branch 'master': bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (#3634) https://github.com/python/cpython/commit/0efc7c67a2f8a184e93f9a491305c81ef2e24250

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: This should prepare IDLE for 3.6.3 and 3.7.0a1 cutoff tomorrow morning. -- stage: patch review -> needs patch ___ Python tracker

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-09-17 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +3626 stage: needs patch -> patch review ___ Python tracker ___

[issue31287] IDLE configdialog tests: don't modify tkinter.messagebox.

2017-09-17 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +3625 ___ Python tracker ___ ___

[issue31502] IDLE: Config dialog again deletes custom themes and keysets.

2017-09-17 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- keywords: +patch pull_requests: +3624 stage: needs patch -> patch review ___ Python tracker ___

[issue31502] IDLE: Config dialog again deletes custom themes and keysets.

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am not adding a new item because the regression has not been released. -- ___ Python tracker ___

[issue31501] Operator precedence description for arithmetic operators

2017-09-17 Thread svelankar
Changes by svelankar : -- keywords: +patch pull_requests: +3623 stage: -> patch review ___ Python tracker ___

[issue31502] IDLE: Config dialog again deletes custom themes and keysets.

2017-09-17 Thread Terry J. Reedy
New submission from Terry J. Reedy: The askyesno messagebox wrappers, added in #31287, returned None, which is interpreted as 'No', instead of the user entry. With 'Yes' not seen, nothing was saved. The manual tests, once the problem was understood, is to save a new theme/keyset and click

[issue31501] Operator precedence description for arithmetic operators

2017-09-17 Thread svelankar
New submission from svelankar: Description for the operator precedence should read "Multiplication, matrix multiplication division, remainder" instead of "Multiplication, matrix multiplication, division, floor division, remainder. Section 6.16. Operator precedence I feel this would help a

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2017-09-17 Thread Ewoud Kohl van Wijngaarden
Ewoud Kohl van Wijngaarden added the comment: Today I ran into this as well. In the case of IPv6 it's simple to decide what should be returned but on the IPv4Network I disagree. My expectation would be the domain where I would make the reverse needed. That means for 127.0.0.0/13 it should be

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2017-09-17 Thread Ewoud Kohl van Wijngaarden
Changes by Ewoud Kohl van Wijngaarden : -- keywords: +patch pull_requests: +3621 stage: -> patch review ___ Python tracker

[issue31443] Possibly out of date C extension documentation

2017-09-17 Thread Stefan Krah
Stefan Krah added the comment: Christian, do you remember which compiler was the reason for the commit cbf3b5cb76906fba15dbf59a1e83c540a447b907 ? + /* Due to cross platform compiler issues the slots must be filled +* here. It's required for portability to Windows without

[issue27541] Repr of collection's subclasses

2017-09-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg302377 ___ Python tracker ___

[issue27541] Repr of collection's subclasses

2017-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for changing the cases Serhiy found. Also, I agree with Serhiy that there should not be a change for the built-in types that have a literal notation (it has been this was forever, hasn't caused any real issues, and changing it now will likely break

[issue31498] Default values for zero in time.strftime()

2017-09-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> brett.cannon nosy: +brett.cannon ___ Python tracker ___

[issue31443] Possibly out of date C extension documentation

2017-09-17 Thread Stefan Krah
Stefan Krah added the comment: FWIW, I've been using https://github.com/python/cpython/blob/master/Modules/_decimal/_decimal.c#L689 the static initialization on problematic platforms like Windows and AIX for years, without any problems. I'm sure this is valid C, and people here agree:

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-17 Thread Stefan Behnel
Stefan Behnel added the comment: Minimal reproducer seems to be this: -- import xml.etree.ElementTree as etree def test(): parser = etree.XMLParser() try: parser.close() except etree.ParseError as exc: e = exc # must keep local reference! test() --

[issue31499] ElementTree crash with new expat

2017-09-17 Thread Stefan Behnel
Stefan Behnel added the comment: Sorry, wrong line number. Was using an installed Py3.7, not a fresh build. However, my crashing installed version is from September 1st, *before* the expat update, which was apparently on September 5th. With a clean debug build, I get a reproducible crash

[issue31497] Add _PyType_Name()

2017-09-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31499] ElementTree crash with new expat

2017-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can't reproduce a crash. Could you please provide a Python script? -- ___ Python tracker ___

[issue31496] IDLE: test_configdialog failed

2017-09-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: https://bugs.python.org/file47143/success.txt ___ Python tracker ___

[issue31496] IDLE: test_configdialog failed

2017-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: About the 'invalid command name' message: PR 3622 was not yet merged on your machine. Inserting hs.see(start) just before hs.bbox(start) fixes the issue. I have added some debug prints. Here are outputs, with and without a fix. -- Added file:

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: My new laptop has a HiDPI display (3840x2160). IDLE (as well as other Tk applications) looks ugly on it. The font of menu and dialogs is tiny. The font used in editor and shell looks normal size. I use Linux with X Window. It seems to me this issue

[issue31499] ElementTree crash with new expat

2017-09-17 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___

[issue31497] Add _PyType_Name()

2017-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4ab46d794961491ed185c195d53da7ee6a16e646 by Serhiy Storchaka in branch 'master': bpo-31497: Add private helper _PyType_Name(). (#3630) https://github.com/python/cpython/commit/4ab46d794961491ed185c195d53da7ee6a16e646 --

[issue31475] Bug in argparse - not supporting utf8

2017-09-17 Thread INADA Naoki
INADA Naoki added the comment: You reported stack trace on Github pull request. But discussion should be made here, not in pull request. As far as reading traceback, your problem is solved already in Python 3.6, by PEP 528. -- nosy: +inada.naoki

[issue31496] IDLE: test_configdialog failed

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Are you running on Linux or Mac? What tk version? About the 'invalid command name' message: PR3622, patching idlelib.codecontext, merged to master 13 hours ago, fixed this for me on Windows. (It added CodeContext.__del__.) Did it fail on your machine or

[issue27541] Repr of collection's subclasses

2017-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for changing the cases Serhiy found. Also, I agree with Serhiy that there should be a change for the built-in types that have a literal notation (it has been this was forever, hasn't caused any real issues, and changing it now will likely break code).

[issue31497] Add _PyType_Name()

2017-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 This would clean-up the code a bit. -- nosy: +rhettinger ___ Python tracker ___

[issue31499] ElementTree crash with new expat

2017-09-17 Thread Stefan Behnel
New submission from Stefan Behnel: I'm seeing crashes in the latest Py3.7 when I run this test (taken from lxml's compatibility test suite): etree = xml.etree.ElementTree def test_feed_parser_error_position(self): ParseError = etree.ParseError parser = XMLParser()

[issue27541] Repr of collection's subclasses

2017-09-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Add _PyType_Name() versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue31498] Default values for zero in time.strftime()

2017-09-17 Thread Denis Osipov
New submission from Denis Osipov: Now default values for zero in time.strftime returns string with day of week value 1: >>> time.strftime("%Y %m %d %H %M %S %w %j", (2000,)+(0,)*8) '2000 01 01 00 00 00 1 001' while 2000-01-01 is Saturday (=6th day of week). Now each illegal value (day of

[issue27541] Repr of collection's subclasses

2017-09-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch pull_requests: +3620 stage: -> patch review ___ Python tracker ___

[issue31497] Add _PyType_Name()

2017-09-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch pull_requests: +3619 ___ Python tracker ___

[issue31497] Add _PyType_Name()

2017-09-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed PR adds a helper function _PyType_Name() which returns the last component of tp_name after dot. This allows to avoid duplication of the code. I'm going to use this helper in more places in future for getting rid of hardcoded type names

[issue31381] Unable to read the project file "pythoncore.vcxproj".

2017-09-17 Thread Denis Osipov
Denis Osipov added the comment: Fixed in PR 3397 (I guess). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-17 Thread Xiang Zhang
Xiang Zhang added the comment: I run the patch against a toy NLP application, cutting words from Shui Hu Zhuan provided by Serhiy. The result is not bad, 6% faster. And I also count the hit rate, 90% hit cell 0, 4.5 hit cell 1, 5.5% miss. I also increase the cache size to 1024 * 2. Although

[issue31482] random.seed() doesn't work with bytes and version=1

2017-09-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31482] random.seed() doesn't work with bytes and version=1

2017-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 132a7d7cdbc7cb89fa1c1f4e8192241c3d68f549 by Raymond Hettinger in branch 'master': bpo-31482: Missing bytes support for random.seed() version 1 (#3614) https://github.com/python/cpython/commit/132a7d7cdbc7cb89fa1c1f4e8192241c3d68f549

[issue31482] random.seed() doesn't work with bytes and version=1

2017-09-17 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3618 ___ Python tracker ___

[issue31496] IDLE: test_configdialog failed

2017-09-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test -uall test_idle Run tests sequentially 0:00:00 load avg: 1.19 [1/1] test_idle invalid command name "140662890299080timer_event" while executing "140662890299080timer_event" ("after" script) test test_idle failed -- Traceback (most

[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-17 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 4f6bae9677c0e5398e64c503fd3c19cae94567da by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-31487: Update F-strings doc example (GH-3627) (GH-3628) https://github.com/python/cpython/commit/4f6bae9677c0e5398e64c503fd3c19cae94567da

[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-17 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3617 ___ Python tracker ___

[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-17 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 63c591c0b0b57870a606e8edc59afe6264e7504d by Mariatta in branch 'master': bpo-31487: Update F-strings doc example (GH-3627) https://github.com/python/cpython/commit/63c591c0b0b57870a606e8edc59afe6264e7504d --

[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-17 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +3616 ___ Python tracker ___ ___

[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-17 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31346] Prefer PROTOCOL_TLS_CLIENT/SERVER

2017-09-17 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue27391] server_hostname should only be required when checking host names

2017-09-17 Thread Jim Fulton
Jim Fulton added the comment: OMG, >1year. :) This was always a minor issue. I still think the current asyncio behavior is dumb, but whatever. FWIW, I tripped on this when adding SSL support to ZEO, which is a client-server *database* protocol used by ZODB, having nothing to do with the

[issue31443] Possibly out of date C extension documentation

2017-09-17 Thread Stefan Krah
Stefan Krah added the comment: PyType_GenericNew() should be in libpython, so indeed the example in the docs seems a bit odd to me. -- nosy: +skrah ___ Python tracker

[issue31443] Possibly out of date C extension documentation

2017-09-17 Thread Romuald Brunet
Romuald Brunet added the comment: I'm not sure this is relevant, but I've just made a simple test on Windows (7) with my C extension using { … .tp_new = PyType_GenericNew } and the compiler did not complain (also the code worked as expected) -- ___

[issue31351] ensurepip discards pip's return code which leads to broken venvs

2017-09-17 Thread Igor Filatov
Changes by Igor Filatov : -- keywords: +patch pull_requests: +3615 stage: -> patch review ___ Python tracker ___

[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-09-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 2.7, Python 3.6 ___ Python tracker ___

[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 30b61b51e05d2d43e8e2e783b0a9df738535423b by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (#3615)

[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > The cache of size 2 x 256 slots can increase memory consumption by 50 KiB > > in worst case, 2 x 1024 -- by 200 KiB. > How much is this compared to the total usage? For Python interpreter VmSize: 31784 kB, VmRSS: 7900 kB. The cache doesn't affect

[issue31440] wrong default module search path in help message

2017-09-17 Thread Xiang Zhang
Xiang Zhang added the comment: Not sure about Windows. _get_path() looks to me is used for user site-packages. getsitepackages() doesn't do the same and seems matching the current message, also the OS2 branch in py2. Let's consult Windows guys. -- nosy: +eryksun, gauravbackback,

[issue31440] wrong default module search path in help message

2017-09-17 Thread Gaurav Singh
Changes by Gaurav Singh : -- keywords: +patch pull_requests: +3614 stage: needs patch -> patch review ___ Python tracker ___

[issue31493] IDLE cond context: fix code update and font update timers

2017-09-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset b417332bf44af93c8acda4b7197181d4b62c16a4 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31493: Fix code context update and font update timers. (GH-3622) (#3623)