[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for keeping this provisional. The code is still maturing and needs to be iterated while we gain experience with it. -- nosy: +rhettinger ___ Python tracker

[issue29312] Use FASTCALL in dict.update()

2017-01-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I like the other AC changes to dict in 29311, but this one seems like it shouldn't be done. There is too much twisting around existing code to force it to use AC and the benefit will be almost nothing. dict.update() is mainly used with a list of tuples

[issue29293] Missing parameter "n" on multiprocessing.Condition.notify()

2017-01-18 Thread Josh Rosenberg
Josh Rosenberg added the comment: Looks like, despite what the multiprocessing.Condition docs say (claiming it's an alias for threading.Condition), at least in Python 3.5, it's a completely separate animal from multiprocessing.synchronize, and the notify method on it doesn't take any

[issue29312] Use FASTCALL in dict.update()

2017-01-18 Thread INADA Naoki
INADA Naoki added the comment: Using FASTCALL for methods accepting **kwargs can't skip creating dict in most cases. Because they accepts dict. Even worth, when calling it like `d.update(**config)` (yes, it's abuse of **, but it can be happen in some C methods), FASTCALL may unpack the passed

[issue29311] Argument Clinic: convert dict methods

2017-01-18 Thread INADA Naoki
INADA Naoki added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +ned.deily ___ Python tracker ___ ___

[issue29317] test_copyxattr_symlinks fails

2017-01-18 Thread mark
New submission from mark: == ERROR: test_copyxattr_symlinks (test.test_shutil.TestShutil) -- Traceback (most recent call last): File

[issue29281] json.loads documentation missing "versionchanged" statement

2017-01-18 Thread R. David Murray
R. David Murray added the comment: Yes, this should be documented with a versionchanged. The removal was for python3 so we didn't need a versionchanged there; it was just a difference from python2, and the python3 docs were "restarted" with (almost) no back references to python2. --

[issue29281] json.loads documentation missing "versionchanged" statement

2017-01-18 Thread Ammar Askar
Ammar Askar added the comment: To anyone more experienced with python documentation, is behavior like this actually supposed to be documented? For some more historical context, the support for bytes in the json module was removed in this issue: https://bugs.python.org/issue4136 and then

[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: There are also minor things like NoReturn, typing_inspect helpers(?) etc. The main good point I see for keeping typing provisional is we could iterate fast and come up with more "settled" and robust API in time for 3.7. --

[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Łukasz Langa
Łukasz Langa added the comment: There are three specific areas I can identify that are missing from the typing module at the moment: * support for structural typing (protocols) * support for typing heterogenous dictionaries (dictionary "schema") * support for typing arbitrary callables

[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I don't have any strong opinion on this. If others don't object then I am perfectly fine with keeping typing provisional for 3.6. -- nosy: +levkivskyi ___ Python tracker

[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Guido van Rossum
New submission from Guido van Rossum: The 3.6 what's new (https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-typing) claims typing.py is no longer provisional, but I don't think it's quite ready yet. There are a number of things that I'd like to merge into typing.py over the duration of

[issue29198] AsyncGenerator is missing from typing

2017-01-18 Thread Guido van Rossum
Guido van Rossum added the comment: So the changes to typing.py have been committed. Can someone commit the right doc patches? -- ___ Python tracker ___

[issue24960] Can't use lib2to3 with embeddable zip file.

2017-01-18 Thread Sébastien Taylor
Sébastien Taylor added the comment: Are there existing tools for bundling the python35.zip (and adding additional packages)? I personally ran into this issue by using pip to add additional modules to my embeddable python but if there's a better way to migrate from devel to embeddable python

[issue29315] \b requires raw strings or to be escaped. Update docs with that hint?

2017-01-18 Thread R. David Murray
R. David Murray added the comment: One should always use raw strings for regex expressions, and this is already documented in the introduction to the regex module. Further, in 3.5 using \ in front of characters that aren't special produces a warning, which should reduce the frequency of this

[issue29198] AsyncGenerator is missing from typing

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87e8139420ed by Guido van Rossum in branch '3.5': Issue #29198: add AsyncGenerator (Jelle Zijlstra) https://hg.python.org/cpython/rev/87e8139420ed New changeset 5b771c662c00 by Guido van Rossum in branch '3.6': Issue #29198: add AsyncGenerator

[issue24960] Can't use lib2to3 with embeddable zip file.

2017-01-18 Thread Paul Moore
Paul Moore added the comment: I'm not sure I see why you'd want to run lib2to3 with the embedded distribution anyway. Surely you'd do any 2to3 conversion in a normal development installation, and then simply bundle the resulting converted scripts with your application and the embedded

[issue24960] Can't use lib2to3 with embeddable zip file.

2017-01-18 Thread Sébastien Taylor
Changes by Sébastien Taylor : -- nosy: +Sébastien Taylor ___ Python tracker ___

[issue29274] Change “tests cases” → “test cases”

2017-01-18 Thread Martin Panter
Martin Panter added the comment: Thanks for the feedback -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29315] \b requires raw strings or to be escaped. Update docs with that hint?

2017-01-18 Thread Mike Lissner
New submission from Mike Lissner: I just ran into a funny corner case I imagine others are aware of. When you write "\b" in Python, it is a single character: "\x08". So if you try to write a regex like: words = '\b(.*)\b' That won't work. But using a raw string will: words = r'\b(.*)\b' As

[issue29314] asyncio.async deprecation warning is missing stacklevel=2

2017-01-18 Thread R. David Murray
Changes by R. David Murray : -- components: +asyncio nosy: +gvanrossum, yselivanov stage: -> needs patch type: -> behavior ___ Python tracker

[issue29314] asyncio.async deprecation warning is missing stacklevel=2

2017-01-18 Thread R. David Murray
New submission from R. David Murray: Title pretty much says it all. The warning isn't very helpful currently, since it just reports the line in tasks.py where the deprecation warning is generated. -- messages: 285750 nosy: r.david.murray priority: normal severity: normal status: open

[issue29313] msi by bdist_msi will fail execute install-scripts if space in present in python path

2017-01-18 Thread eszense
New submission from eszense: If python.exe path contains space, msi generated with bdist_msi command with --install-script=abc.py will fail with msg: C:\\Program Files\\Python35\\python.exe: can't open file 'C:\\Program': [Error 2] No such file or directory Patch attached for your

[issue29309] Interpreter hang when interrupting a loop.run_in_executor() future

2017-01-18 Thread Romain Sébille
Romain Sébille added the comment: Ok, thanks for the explanation! One thing still bother me, run_in_executor() allow us to launch blocking operations but without blocking the main thread, so there is a high chance that we wait inside one of the pool's worker. Does this mean run_in_executor()

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-18 Thread Ammar Askar
Changes by Ammar Askar : Added file: http://bugs.python.org/file46332/kwdefs_docs.diff2 ___ Python tracker ___

[issue29312] Use FASTCALL in dict.update()

2017-01-18 Thread STINNER Victor
STINNER Victor added the comment: See also issue #20291: "Argument Clinic should understand *args and **kwargs parameters". -- ___ Python tracker ___

[issue29311] Argument Clinic: convert dict methods

2017-01-18 Thread STINNER Victor
STINNER Victor added the comment: dict.patch converts two methods to Argument Clinic: * get() * setdefault() pop() requires the issue #29299, its signature must not show any default value for the second parameter. dict.update() is special, so I created a dedicated issue: issue #29312.

[issue29312] Use FASTCALL in dict.update()

2017-01-18 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Argument Clinic nosy: +larry ___ Python tracker ___

[issue29312] Use FASTCALL in dict.update()

2017-01-18 Thread STINNER Victor
STINNER Victor added the comment: My patch doesn't use _PyStack_AsDict() since this function currently fails with an assertion error if a key is not exactly a string (PyUnicode_CheckExact). dict_update_common() already checks if all keys are string. --

[issue29312] Use FASTCALL in dict.update()

2017-01-18 Thread STINNER Victor
New submission from STINNER Victor: Follow-up of the issue #29311 "Argument Clinic: convert dict methods". The dict.update() method hs a special prototype: def update(arg=None **kw): ... I don't think that Argument Clinic supports it right now, so I propose to first optimize dict_update()

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-18 Thread Ammar Askar
Ammar Askar added the comment: You're completely right, the kwdefs is referring to default arguments for keyword-only-arguments from this PEP: https://www.python.org/dev/peps/pep-3102/ Where as that line is probably referring to "defs", the defaults for normal parameters. I'll upload an

[issue29311] Argument Clinic: convert dict methods

2017-01-18 Thread STINNER Victor
New submission from STINNER Victor: The dict type has multiple methods which use METH_VARARGS or METH_VARARGS|METH_KEYWORDS calling convention, whereras there is no a new faster METH_FASTCALL calling convention which avoids temporary tuple/dict to pass arguments. -- components:

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 127401469628 by Victor Stinner in branch 'default': Update and enhance python-gdb.py https://hg.python.org/cpython/rev/127401469628 -- ___ Python tracker

[issue29310] Document typing.NamedTuple default argument syntax

2017-01-18 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___

[issue29310] Document typing.NamedTuple default argument syntax

2017-01-18 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29310] Document typing.NamedTuple default argument syntax

2017-01-18 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: Document https://github.com/python/typing/pull/338 I should have a patch in the next few days; creating this issue to remind myself. -- assignee: Jelle Zijlstra components: Documentation messages: 285740 nosy: Jelle Zijlstra priority: normal

[issue28556] typing.py upgrades

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 59829d7b7838 by Guido van Rossum in branch '3.5': Issue #28556: allow default values in class form of NamedTuple -- Jelle Zijlstra https://hg.python.org/cpython/rev/59829d7b7838 New changeset 2159f36ccd6b by Guido van Rossum in branch '3.6': Issue

[issue1294959] Problems with /usr/lib64 builds.

2017-01-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jan 18, 2017, at 03:57 PM, Matthias Klose wrote: >I don't think we need a PEP for this Correct. Generally we don't need PEPs for build system changes. -- ___ Python tracker

[issue1294959] Problems with /usr/lib64 builds.

2017-01-18 Thread Matthias Klose
Matthias Klose added the comment: I don't think we need a PEP for this, however I would like to name the new macro libsubdir, or sublibdir, to make it clear it's just the libdir component. Or make the value absolute, like it already is for libdir ... --

[issue28997] test_readline.test_nonascii fails on Android

2017-01-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I think we should wait for the resolution of PEP 538 and of issue 28684 s/issue 28684/issue 28180/ -- ___ Python tracker

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: pep538_coerce_legacy_c_locale_v3.diff fixes issue 28997 on Android (api 21 and 24). This issue is raised because there is an inconsistency between Python on Android that considers the locale encoding to be always UTF-8 and GNU Readline that does not accept

[issue29309] Interpreter hang when interrupting a loop.run_in_executor() future

2017-01-18 Thread STINNER Victor
STINNER Victor added the comment: Sending SIGTERM (CTRL+c, KeyboardInterrupt) while Python is waiting in threading.Thread.join() is not supported. You have a thread running time.sleep(1). On Linux, this function calls the select() syscall. So you have the main thread waiting for the thread

[issue29307] ModuleNotFoundError when using literal string interpolation with invalid format specifier

2017-01-18 Thread Jeroen Van Goey
Jeroen Van Goey added the comment: Thanks Barry for your extensive explanation! -- ___ Python tracker ___ ___

[issue29309] Interpreter hang when interrupting a loop.run_in_executor() future

2017-01-18 Thread Romain Sébille
New submission from Romain Sébille: Hi, I stumble on this today and can't find any reasons or previous issue as to why this happen so I thought of submitting the issue here. I attached a script (run_in_executor.py) to reproduce the problem, the original problem arise when waiting to read on

[issue29308] venv should match virtualenv VIRTUAL_ENV_DISABLE_PROMPT config

2017-01-18 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread STINNER Victor
STINNER Victor added the comment: See also issue #29306: "Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions". -- ___ Python tracker

[issue29307] ModuleNotFoundError when using literal string interpolation with invalid format specifier

2017-01-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jan 18, 2017, at 10:56 AM, Jeroen Van Goey wrote: >sudo add-apt-repository ppa:jonathonf/python-3.6 >sudo apt-get update >sudo apt-get install python3.6 > >I made a string, using the new literal string interpolation, but I supplied >an invalid format

[issue29308] venv should match virtualenv VIRTUAL_ENV_DISABLE_PROMPT config

2017-01-18 Thread Jack Bennett
New submission from Jack Bennett: virtualenv has https://virtualenv.pypa.io/en/latest/reference/#envvar-VIRTUAL_ENV_DISABLE_PROMPT to block activate from trying to overwrite the prompt function. Users of venv can't do that, 3.6 added prompt but even None defaults to the current folder name.

[issue28997] test_readline.test_nonascii fails on Android

2017-01-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: PEP 538 [1] coerces the C locale to UTF-8 by setting the locale environment variables (LC_ALL, LANG). The PEP has an implementation at issue 28180 as pep538_coerce_legacy_c_locale_v3.diff, and the patch fixes test_nonascii when run on the Android emulators

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-01-18 Thread STINNER Victor
STINNER Victor added the comment: Naoki: "On the other hand, PyCFunction may calls method of extension module, and it can cause recursive call. So I think PyCFunction_*Call* methods calling function pointer it has (e.g. _PyCFunction_FastCallKeywords) should call Py_EnterRecursiveCall()." In

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset a241817424e5 by Victor Stinner in branch 'default': Fix _PyMethodDef_RawFastCallDict() argument parsing https://hg.python.org/cpython/rev/a241817424e5 New changeset a8d35309dcc0 by Victor Stinner in branch 'default': PyCFunction_Call() now calls

[issue29307] ModuleNotFoundError when using literal string interpolation with invalid format specifier

2017-01-18 Thread R. David Murray
R. David Murray added the comment: Yes, this appears to be the vendor's failure reporting infrastructure that is failing. Why they'd want a report for every traceback at the interactive prompt is beyond me, but that appears to be what they are trying to do. -- nosy: +r.david.murray

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3865d0c1844 by Victor Stinner in branch 'default': Fix Python 2.6 support in python-gdb.py https://hg.python.org/cpython/rev/a3865d0c1844 -- ___ Python tracker

[issue29274] Change “tests cases” → “test cases”

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2fe00653d07 by Martin Panter in branch '3.5': Issue #29274: tests cases → test cases https://hg.python.org/cpython/rev/f2fe00653d07 New changeset 145da99b3df2 by Martin Panter in branch '3.6': Issue 29274: Merge doc fixes from 3.5

[issue29305] encoding to ascii in http/client.py

2017-01-18 Thread Martin Panter
Martin Panter added the comment: In general, HTTP URLs are supposed to be ASCII only. Newer protocols (e.g. RTSP which is based on HTTP) specifically allow UTF-8 encoding. But it would be wrong for Python’s HTTP library to assume UTF-8 is wanted everywhere. Especially in a domain name (e.g.

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2017-01-18 Thread Martin Panter
Martin Panter added the comment: Issue 9679: Focusses on encoding just the DNS name Issue 20559: Maybe a duplicate, or opportunity for better documentation or error message as a bug fix? Andreas’s patch just proposes a new function called quote_uri(). It would need documentation. We already

[issue11992] sys.settrace doesn't disable tracing if a local trace function returns None

2017-01-18 Thread Armin Rigo
Armin Rigo added the comment: Confirmed. More interestingly, nowadays (at least in 3.5) test_pdb.py depends on this bug. If we really clear f->f_trace when the trace function returns None, then test_pdb_until_command_for_generator() fails. This is because pdb.py incorrectly thinks there is

[issue29307] ModuleNotFoundError when using literal string interpolation with invalid format specifier

2017-01-18 Thread Xiang Zhang
Xiang Zhang added the comment: It seems to be vendor's issue not CPython itself. This same issue also happens in Ubuntu 16.10's Python 3.6. Raise any exception can cause this: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) [GCC 6.2.0 20161005] on linux Type "help", "copyright", "credits" or

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2017-01-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: The problem is the only good way to fix this I see now is patching two lines in functools and abc using the public ``typing_inspect`` API proposed in http://bugs.python.org/issue29262 (I added it as a dependency). The latter could take some time, so that I

[issue20559] urllib/http fail to sanitize a non-ascii url

2017-01-18 Thread Martin Panter
Martin Panter added the comment: See also Issue 3991 with proposals for handling non-ASCII as new features. -- nosy: +martin.panter ___ Python tracker

[issue29307] ModuleNotFoundError when using literal string interpolation with invalid format specifier

2017-01-18 Thread Jeroen Van Goey
New submission from Jeroen Van Goey: I installed Python 3.6 from J Fernyhough's PPA by doing sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt-get update sudo apt-get install python3.6 I made a string, using the new literal string interpolation, but I supplied an invalid format

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b7a5bdd05ed by Victor Stinner in branch 'default': _PyObject_FastCallKeywords() now checks the result https://hg.python.org/cpython/rev/1b7a5bdd05ed -- ___ Python tracker

[issue27830] Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b7a5bdd05ed by Victor Stinner in branch 'default': _PyObject_FastCallKeywords() now checks the result https://hg.python.org/cpython/rev/1b7a5bdd05ed -- ___ Python tracker

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-01-18 Thread INADA Naoki
INADA Naoki added the comment: I think basic idea is "wrap unknown function call at least once, and preferably only once". _PyEval_EvalFrameDefault() calls Py_EnterRecursiveCall(""). So wrapping PyFunction_(Fast)Call* with Py_EnterRecursiveCall() seems redundant. On the other hand,

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0b219348ec9e by Victor Stinner in branch 'default': Optimize methoddescr_call(): avoid temporary PyCFunction https://hg.python.org/cpython/rev/0b219348ec9e -- ___ Python tracker

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0b219348ec9e by Victor Stinner in branch 'default': Optimize methoddescr_call(): avoid temporary PyCFunction https://hg.python.org/cpython/rev/0b219348ec9e -- nosy: +python-dev ___ Python tracker

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 261b108b9468 by Victor Stinner in branch 'default': Remove unused func parameter of _PyStack_UnpackDict() https://hg.python.org/cpython/rev/261b108b9468 -- ___ Python tracker

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-01-18 Thread STINNER Victor
New submission from STINNER Victor: I added the following new functions to Python 3.6: * _PyObject_FastCallDict() * _PyObject_FastCallKeywords() * _PyFunction_FastCallDict() * _PyFunction_FastCallKeywords() * _PyCFunction_FastCallDict() * _PyCFunction_FastCallKeywords() I'm not sure that these

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-01-18 Thread INADA Naoki
INADA Naoki added the comment: I commented at the pull request. -- ___ Python tracker ___ ___

[issue29305] encoding to ascii in client.py

2017-01-18 Thread Babe Hardy
New submission from Babe Hardy: used urlopen('...{}'.format(v)).read() with v being a string when v is of a non-ascii format: >>UnicodeEncodeError: 'ascii' codec can't encode characters<< in line 984 of putrequest after changing >>self._output(request.encode('ascii'))<< into

[issue9216] FIPS support for hashlib

2017-01-18 Thread Yolanda
Yolanda added the comment: @rbtcollins, even if we go with a FIPS aware module, we'd still need to detect if md5 was used for security purposes. If we build a system that detects FIPS enablement, call md5 say ... for generating a password, and then the python fips_md5 call is masking it, we'd