[issue25794] __setattr__ does not always overload operators

2017-05-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1769 ___ Python tracker ___ ___

[issue25794] __setattr__ does not always overload operators

2017-05-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1768 ___ Python tracker ___ ___

[issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__)

2017-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: I think this should be closed. For backwards compatibility, the defaultdict default_factory function must remain as it is. There is lots of code that uses something like `int` or `list` as the factory, and if the missing key was to be passed, the code would

[issue25794] __setattr__ does not always overload operators

2017-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d896985bb2de49046f9b6879e906d1e4db255e23 by Serhiy Storchaka in branch 'master': bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (#1652) https://github.com/python/cpython/commit/d896985bb2de49046f9b6879e906d1e4db255e23

[issue23667] IDLE to provide option for making trailing whitespace visible

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Louie: It appears that old PRs might merge as they are but any change, including an update merge, requires that you close and re-open. When you re-open, please add "was pr". It would be easier for me if you redid all the IDLE PRs in a batch or two.

[issue30290] IDLE: add tests for help_about.py

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Follow-up issues. A. Move code and tests into help.py and test_help.py. B. Improve content: 1) #25224; 2) remove or update credits; 3) reconsider each item. C. Improve appearance: 1) ttk widgets; 2) Redo entire look. --

[issue30406] async and await should be keywords in 3.7

2017-05-19 Thread STINNER Victor
STINNER Victor added the comment: It's time to remove Yury's hacks from the parser and get a sane syntax ;-) I agree to make async and await real keywords! -- ___ Python tracker

[issue30409] locale.getpreferredencoding doesn't return result

2017-05-19 Thread STINNER Victor
STINNER Victor added the comment: > In fact, it seems like I introduced a regression in bpo-6393, commit > 94a3694c3dda97e3bcb51264bf47d948c5424d84. I backported this commit, but I didn't notice the bug in the code... In fact, this commit was followed by the commit

[issue30409] locale.getpreferredencoding doesn't return result

2017-05-19 Thread STINNER Victor
STINNER Victor added the comment: In fact, it seems like I introduced a regression in bpo-6393, commit 94a3694c3dda97e3bcb51264bf47d948c5424d84. -- ___ Python tracker

[issue30409] locale.getpreferredencoding doesn't return result

2017-05-19 Thread STINNER Victor
STINNER Victor added the comment: Oh, I'm sorry, I read too fast. I didn't notice the pull request. It seems like a real bug in Python 2.7. -- resolution: third party -> status: closed -> open ___ Python tracker

[issue30409] locale.getpreferredencoding doesn't return result

2017-05-19 Thread STINNER Victor
STINNER Victor added the comment: File "/usr/lib/python2.7/site-packages/pip/utils/encoding.py", line 31, in auto_decode return data.decode(locale.getpreferredencoding(False)) TypeError: decode() argument 1 must be string, not None I'm sorry, but this issue looks like a bug in pip, not in

[issue30290] IDLE: add tests for help_about.py

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: 4a. Change uglyMidcap widget names and CamelCase function names to pep8_conformant names. Simplify: byline, email, docs, pyver, tkver, idlever, py_license, py_copyright, py_credits, readme, idle_news, idle_credits. 4b. Change CamelCase function names to

[issue30406] async and await should be keywords in 3.7

2017-05-19 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, I signed off on this when I approved that PEP. On May 19, 2017 20:10, "Raymond Hettinger" wrote: > > Raymond Hettinger added the comment: > > +1 These words are here to stay. > > That said, Guido needs to explicitly sign-off on

[issue30405] build.bat: register binaries for py launcher

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From a couple of tests, the local python.bat should be satisfactory for most >of my current uses. Being part of a #30362 listing would be nice, but I don't >often change my set of build binaries. -- ___ Python

[issue30409] locale.getpreferredencoding doesn't return result

2017-05-19 Thread Sean McCully
New submission from Sean McCully: Exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 312, in run

[issue30406] async and await should be keywords in 3.7

2017-05-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 These words are here to stay. That said, Guido needs to explicitly sign-off on any new language keywords. -- assignee: -> gvanrossum nosy: +gvanrossum, rhettinger ___ Python tracker

[issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__)

2017-05-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Take a look at the __missing__(key) method for the regular dict API to see if it meets your needs. It is in the ``d[key]`` section at https://docs.python.org/3/library/stdtypes.html#dict >>> class UpperDict(dict): def __missing__(self, key):

[issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__)

2017-05-19 Thread Nam
New submission from Nam: currently default_factory does not accept any parameter. This made the default value generated by it constant among keys. If default_factory takes in key as the parameter, it should be able to generate default values based on key, which provide more flexibility to the

[issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1

2017-05-19 Thread Xiang Zhang
Xiang Zhang added the comment: See the doc: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.hosts. For hosts() method, network address and broadcast address are excluded from the result. So it's right IPv4Address('192.168.0.0') and IPv4Address('192.168.1.255') are not

[issue30000] Inconsistency in the zlib module

2017-05-19 Thread Xiang Zhang
Xiang Zhang added the comment: Since Martin and Gregory support it, Ellison if you'd like you could make a PR for it. But code change alone is not enough. You need also adding corresponding tests and docs. -- ___ Python tracker

[issue30405] build.bat: register binaries for py launcher

2017-05-19 Thread Eryk Sun
Eryk Sun added the comment: The launcher could be extended to support additional suffixes in the version string. Currently -32 is supported after the minor version number (e.g. 3.6-32), and (per a recent update) the latest version of the launcher will also support -64, with and without

[issue29854] Segfault when readline history is more then 2 * history size

2017-05-19 Thread Martin Panter
Martin Panter added the comment: I suspect the test won’t be effective with Editline (either fail, or silently pass without testing the bug). From memory Editline uses an ~/.editrc file, not INPUTRC, with different syntax and configuration. -- ___

[issue17188] Document 'from None' in raise statement doc.

2017-05-19 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1765, 1766 ___ Python tracker ___ ___

[issue17188] Document 'from None' in raise statement doc.

2017-05-19 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1765 ___ Python tracker ___ ___

[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-05-19 Thread Martin Panter
Martin Panter added the comment: What is the advantage of compiling calls to both Long and LongLong converters? Isn’t it simpler to blindly call PyLong_FromUnsignedLongLong or similar? -- nosy: +martin.panter ___ Python tracker

[issue23674] super() documentation isn't very clear

2017-05-19 Thread Cheryl Sabella
Cheryl Sabella added the comment: I don't know if it's appropriate to add this to this ticket, but on the Data Model doc page, section 3.3.2.2 for Invoking Descriptors describes Super Binding. A separate discussion with Nick in PR 1561 highlighted that section as a possible candidate for

[issue28845] Clean up known issues for AIX

2017-05-19 Thread Eric N. Vander Weele
Changes by Eric N. Vander Weele : -- pull_requests: +1764 ___ Python tracker ___ ___

[issue30405] PCbuild.bat: register binaries for py launcher

2017-05-19 Thread Zachary Ware
Zachary Ware added the comment: Terry: Is python.bat sufficient for your uses? It's created by PCbuild/python.vcxproj, and always points to whatever interpreter you built last. If it's not enough, maybe it could be extended to invoke any already-built interpreter? --

[issue23667] IDLE to provide option for making trailing whitespace visible

2017-05-19 Thread Cheryl Sabella
Cheryl Sabella added the comment: Terry, Should IDLE library modules get docstrings or is that something you'd rather not have? Putting the question here because ColorDelegator in colorizer.py doesn't have any docstrings. I wanted to read some of the IDLE code and I can try to add missing

[issue30403] Running extension modules using -m switch

2017-05-19 Thread Petr Viktorin
Petr Viktorin added the comment: It's part of a larger effort to bring the capabilities of extension modules up to par with Python ones. For example, it's one less surprise you'd get when you Cythonize a module. And it's not only for stdlib modules – it's for any extension module. I'd be

[issue30405] PCbuild.bat: register binaries for py launcher

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume there is already a dead registry entry problem if someone simply deletes the pythonxy directory. (I know, very bad idea.) On the other hand, deleting a git repository directory *is* the thing to do. While listing entries and paths, py could check

[issue29854] Segfault when readline history is more then 2 * history size

2017-05-19 Thread Nir Soffer
Nir Soffer added the comment: I think the issue can be solved in readline or in the code using it, but I don't have more time to dig into this, and I think that python should not crash in this case. I don't have an environment to test Apple editline, so I cannot test this issue. The PR

[issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1

2017-05-19 Thread kelly hirai
kelly hirai added the comment: tested with 1.0.18 with same results. -- ___ Python tracker ___ ___

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-05-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: Make stdout and stderr truly unbuffered when run with the -u option -> Make stdout and stderr truly unbuffered when using -u option ___ Python tracker

[issue30403] Running extension modules using -m switch

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: What is the use case? It only make sense to run any stdlib module with -m, and without -i, if it has a command line interface (and an if __name__ clause). Otherwise, the module is created and then deleted when python exits. > py -m math > C-coded modules

[issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1

2017-05-19 Thread kelly hirai
New submission from kelly hirai: for x in ipaddress.IPv4Network(u"192.168.0.0/23").hosts(): print x contains 192.168.1.0 but does not contain 192.168.1.255 ipaddress version 1.0.14 -- messages: 293978 nosy: kghongaku priority: normal severity: normal status: open title: ipaddress

[issue30406] async and await should be keywords in 3.7

2017-05-19 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +1763 ___ Python tracker ___ ___

[issue30399] Get rid of trailing comma in the repr() of BaseException

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think the trailing comma is slightly worse than redundant, as someone who has forgotten the trailing comma rule for calls can mistakenly read it as making the arg a tuple. So +1 on removing it. -- nosy: +terry.reedy

[issue30406] async and await should be keywords in 3.7

2017-05-19 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: According to PEP 492, async and await should be full keywords in Python 3.7, but this hasn't been implemented yet. I have a patch ready that I'll submit as a PR soon. -- components: Interpreter Core messages: 293976 nosy: Jelle Zijlstra,

[issue30388] ndbm can't iterate through values on OS X

2017-05-19 Thread Forest Gregg
Forest Gregg added the comment: Very sorry for the ambiguity. The bug appears for both python 3.5 and python 3.6.1 on OS X. I have not tried other versions of python on OS X. -- ___ Python tracker

[issue30388] ndbm can't iterate through values on OS X

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Do you mean that on OSX, you code works with 3.6.1 and fails with 3.5.3? -- components: +macOS nosy: +ned.deily, ronaldoussoren, terry.reedy ___ Python tracker

[issue30377] Unnecessary complexity in tokenize.py: comments and newlines

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is pycon week, so staff person is busy with that. -- nosy: +terry.reedy title: Unnecessary complexity in tokenize.py around handling of comments and newlines -> Unnecessary complexity in tokenize.py: comments and newlines

[issue30376] Curses documentation refers to incorrect type

2017-05-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: needs patch -> patch review ___ Python tracker ___

[issue30376] Curses documentation refers to incorrect type

2017-05-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> needs patch type: -> behavior versions: -Python 3.3, Python 3.4 ___ Python tracker ___

[issue30372] Status of __builtins__ is not totally clear

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Moving "CPython implementation detail: " up a paragraph should be trivial. Resolving the conflict between " __builtins__ can be set to a user-created dictionary to create a weak form of restricted execution." and "Users should not touch __builtins__;" seems

[issue30405] PCbuild.bat: register binaries for py launcher

2017-05-19 Thread Paul Moore
Paul Moore added the comment: Hmm, thinking a bit further, are you just suggesting registering the build as -3.7? What if I were to build the 3.6 branch? Would that overwrite my "real" 3.6 registry entries? As things stand, the launcher can only register two copies of Python for any given

[issue30405] PCbuild.bat: register binaries for py launcher

2017-05-19 Thread Paul Moore
Paul Moore added the comment: I'd be wary of leaving out of date registry entries around. Maybe make it a separate script (or part of build.bat but requiring a command line flag to request it)? Alternatively (or as well) we could have a cleanup command that removes registry entries for

[issue30362] Launcher add list and list with paths options

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: py already has the -number option space. To avoid conflict, use -0 (zero). I think only one option is needed -- print 'x.y path' for each binary it can find and run. 'x.y' should be the exact option needed to start the particular binary. This enhancement

[issue30405] PCbuild.bat: register binaries for py launcher

2017-05-19 Thread Terry J. Reedy
New submission from Terry J. Reedy: While working on patches for python, typing path\repository\PCbuild\win32\python-d.exe is an error-prone pain. I would really like to be able to run locally built binaries with py.Could pcbuild/build.bat register binaries that it successfully builds?

[issue30361] Docs example: converting mixed types to floating point

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Agreed. Also, I think one example is enough. A good sprint fix. -- keywords: +easy nosy: +terry.reedy ___ Python tracker

[issue30360] getpass.getpass() does not accept stdin from an Expect script

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I strongly suspect that this should be closed as 'not a bug', but I know too little about expect to be sure. If there is a python, as opposed to expect or os bug, then it should be possible to demonstrate the problem with python. If you leave this open,

[issue30359] Annotating a function as returning an (async) context manager?

2017-05-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: A standard convention for annotating a function as returning an (async) context manager? -> Annotating a function as returning an (async) context manager? ___ Python tracker

[issue30355] Unicode symbols crash lib2to3.parse

2017-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. Δ is not a 2.x identifier (variable name) or anything else (like 'binary operator') and it would be wrong for lib2to3.pgen2.parse.classify to classify it is such, or as anything else. So I am closing this. Benjamin can reopen if we are mistaken.

[issue30359] A standard convention for annotating a function as returning an (async) context manager?

2017-05-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Or you can use typing.ContextManager[ret_type] if you like generics (typing.AsyncContextManager will be also added soon). Also this recent discussion seems relevant https://github.com/python/peps/pull/242 and the corresponding thread on python-dev:

[issue30399] Get rid of trailing comma in the repr() of BaseException

2017-05-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Get rid of trailing comma if the repr() of BaseException -> Get rid of trailing comma in the repr() of BaseException ___ Python tracker

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2017-05-19 Thread Pranav Deshpande
Pranav Deshpande added the comment: I am afraid I didn't make myself clear. I am a beginner when it comes to open source contribution and have decided to take up this issue. I did some basic research about the issue and found this file: cpython/Lib/test/support/script_helper.py The function

[issue30000] Inconsistency in the zlib module

2017-05-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think adding these parameters to the zlib.compress() function is a fine addition for 3.7. They are more convenient for those (few) who do need them. I'd go ahead and turn it into a cpython PR. -- nosy: +gregory.p.smith

[issue30404] Make stdout and stderr truly unbuffered when run with the -u option

2017-05-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1762 ___ Python tracker ___ ___

[issue28647] python --help: -u is misdocumented as binary mode

2017-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue30404 makes stdout and stderr truly unbuffered when run with -u. -- ___ Python tracker ___

[issue30404] Make stdout and stderr truly unbuffered when run with the -u option

2017-05-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In Python 2 when run the interpreter with the -u option the stdout and stderr streams are unbuffered. In Python 3 they become just line-buffered. This is because initially there was no way to create unbuffered text streams. But since Python 3.3

[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-05-19 Thread Xavier de Gaye
Xavier de Gaye added the comment: PR 1666 added. With Unified Headers introduced in android-ndk-r14, the size of off_t for 32 bits Android devices is 8 instead of 4 and the cross-compilation of Python on Android does not fail in this case, see msg293956. --

[issue30385] Segfault on OSX with 3.6.1

2017-05-19 Thread Ned Deily
Ned Deily added the comment: Unfortunately, his is a long standing problem when using Python applications that fork on macOS and that end up calling certain system frameworks that under the covers use the system libdispatch which is not fork safe. In this case, it is most likely due to a

[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-05-19 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- pull_requests: +1761 ___ Python tracker ___ ___

[issue29611] TextIOWrapper's write_through option behave differently between C and pure Python implementation.

2017-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue15571. -- resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> Python version of TextIOWrapper ignores "write_through" arg ___ Python tracker

[issue30386] Add a build infrastructure for Android

2017-05-19 Thread Xavier de Gaye
Xavier de Gaye added the comment: Commited 'bpo-30386: Support the new NDK Unified Headers'. This does fix the missing declarations in the NDK headers and android-api-24.patch is not needed now. It also fixes the missing declaration of sethostname() at API 24 that caused the import of the

[issue30385] Segfault on OSX with 3.6.1

2017-05-19 Thread Daniel Birnstiel
Daniel Birnstiel added the comment: I am currently (occasionally) running into the same problem, using Python 3.6.0 on OSX 10.12.3. I cannot reproduce this segmentation fault reliably, it happens after running for a while in production. This appears to be similar to issue 13829. python

[issue30403] Running extension modules using -m switch

2017-05-19 Thread Petr Viktorin
Changes by Petr Viktorin : -- nosy: +encukou, ncoghlan ___ Python tracker ___ ___

[issue30403] Running extension modules using -m switch

2017-05-19 Thread Marcel Plch
New submission from Marcel Plch: Currently the -m switch does not work with extension modules: $ python3 -m math /usr/bin/python3: No code object available for math In order to enable extension modules to behave like Python source modules, the -m switch should be supported.

[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-05-19 Thread Erik Bray
Changes by Erik Bray : -- pull_requests: +1760 ___ Python tracker ___ ___

[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-19 Thread Andrew Jaffe
Andrew Jaffe added the comment: This seems to be a bug in the `osascript` application in the latest macOS 10.12.5: $ osascript < open location "http://python.org; > EOF 0:33: execution error: "http://python.org; doesn’t understand the “open location” message. (-1708) --

[issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines

2017-05-19 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: Still no CLA, I checked my username on the pdf, and it's correct, hope someone looks at it soon :) -- ___ Python tracker

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-19 Thread STINNER Victor
STINNER Victor added the comment: I abandonned PR 1426 which proposed to blacklist bogus macOS versions, and instead I proposed a new PR to simply reenable previsouly skipped tests (because of the bug which is now fixed). https://github.com/python/cpython/pull/1664 I'm unable to test my own

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-19 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1759 ___ Python tracker ___ ___