[issue29296] convert print() to METH_FASTCALL

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: Since the title of the issue is "convert print() to METH_FASTCALL", I consider that the issue is now done. As I wrote, as soon as AC will support **kwargs, we will be able to print() to use AC. Thanks Naoki for the change. -- dependencies: -Argument

[issue29327] SystemError or crash in sorted(iterable=

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: "The patch uses new feature of 3.6 -- supporting positional-only parameters in PyArg_ParseTupleAndKeywords() (see issue26282)." Oh, I didn't recall that it's a new feature. It's a nice feature by the way, thanks for implementing it :-) In that case, yeah it's

[issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode

2017-01-19 Thread JGoutin
JGoutin added the comment: A little encoding cache benchmark. Current Code: = import sys def _fscodec(): encoding = sys.getfilesystemencoding() errors = sys.getfilesystemencodeerrors() def fsencode(filename): filename = fspath(filename) # Does type-checking

[issue29331] Simplify argument parsing in sorted() and list.sort()

2017-01-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch simplifies argument parsing in sorted() and list.sort(). list.sort() now uses the support of keyword-only parameters in PyArg_ParseTupleAndKeywords(). Keyword arguments now are passed as is to list.sorted() in sorted(). --

[issue29296] convert print() to METH_FASTCALL

2017-01-19 Thread INADA Naoki
INADA Naoki added the comment: > Can we close the issue, or do you prefer to keep it open? I don't care. -- ___ Python tracker ___

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1827b64cfce8 by Serhiy Storchaka in branch '3.6': Issue #29327: Fixed a crash when pass the iterable keyword argument to sorted(). https://hg.python.org/cpython/rev/1827b64cfce8 New changeset f44f44b14dfc by Serhiy Storchaka in branch 'default':

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The title is spoiled when reply by email. I suppose [] has special meaning in email subject. -- title: SystemError or crash in sorted(iterable= -> SystemError or crash in sorted(iterable=[]) ___ Python tracker

[issue29327] SystemError or crash in sorted(iterable=

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Serhiy, this patch passes tests and looks fine. I think you can go ahead > with this patch. Right now I'm building 3.6 with applied patch before final testing and committing. My netbook is very slow. :( -- title: SystemError or crash in

[issue29328] struct module should support variable-length strings

2017-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I concur with Mark and Yuri that the feature request isn't compatible with the design and purpose of the struct module -- nosy: +rhettinger ___ Python tracker

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, this patch passes tests and looks fine. I think you can go ahead with this patch. -- assignee: -> serhiy.storchaka ___ Python tracker

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: SystemError or crash in sorted(iterable= -> SystemError or crash in sorted(iterable=[]) ___ Python tracker

[issue29327] SystemError or crash in sorted(iterable=

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > While Python 3.5 doesn't crash, I consider that it has also the bug. So I > added Python 3.5 in Versions. The patch uses new feature of 3.6 -- supporting positional-only parameters in PyArg_ParseTupleAndKeywords() (see issue26282). Since passing an

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

2017-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

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

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3452ff9e8f0a by Raymond Hettinger in branch '3.6': Issue #29281: Fill-in a missing versionchanged entry https://hg.python.org/cpython/rev/3452ff9e8f0a -- nosy: +python-dev ___ Python tracker

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2017-01-19 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue9253 argparse: optional subparsers Initially this bug/issue was a request to allow subparsers to be optional. But with the change in how required actions are handled, subparsers are now optional by default. As you learned from the SO

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

2017-01-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue29325] pysqlite: Evaluate removal of sqlite3_stmt_readonly

2017-01-19 Thread Ma Lin
Ma Lin added the comment: RHEL6's life-cycle is around 10 years [1], it will be alive until 2020. https://access.redhat.com/support/policy/updates/errata/ Let's wait issue28518, IMO, that issue will decide whether we can get around sqlite3_stmt_readonly(). --

[issue29325] pysqlite: Evaluate removal of sqlite3_stmt_readonly

2017-01-19 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Ma Lin. If you find this is also a problem in sqlite3 module, feel free to open another issue against sqlite3. :-) -- ___ Python tracker

[issue29325] pysqlite: Evaluate removal of sqlite3_stmt_readonly

2017-01-19 Thread Ma Lin
Ma Lin added the comment: sqlite3 module in CPython 3.6.0 also uses sqlite3_stmt_readonly(). see 284676cf2ac8. sqlite3_stmt_readonly() was used twice [1][2], but it seems that we can avoid using this function in both of them. [1]

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: A few random thoughts that may or may not be helpful: * We now have two seasoned developers and one new core developer that collectively are creating many non-trivial patches to core parts of Python at an unprecedented rate of change. The patches are

[issue29325] pysqlite: Evaluate removal of sqlite3_stmt_readonly

2017-01-19 Thread Xiang Zhang
Xiang Zhang added the comment: pysqlite is not part of Python stdlib so here is not the right place. :-( Maybe you could go to https://github.com/ghaering/pysqlite for help. -- nosy: +xiang.zhang resolution: -> third party stage: -> resolved status: open -> closed

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-19 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Ammar. :-) -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb76ea32a32f by Xiang Zhang in branch '3.5': Issue #29292: Update outdated doc of PyEval_EvalCodeEx. https://hg.python.org/cpython/rev/bb76ea32a32f New changeset bd121b7517ee by Xiang Zhang in branch '3.6': Issue #29292: Merge 3.5.

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

2017-01-19 Thread Ammar Askar
Ammar Askar added the comment: Attached patch adds a versionchanged block to specify that bytes and bytesarray can now be used and the types of encodings it supports (as taken from the whatsnew changes here https://hg.python.org/cpython/rev/e9e1bf9ec2ac#l2.7) -- keywords: +patch Added

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-19 Thread Ammar Askar
Ammar Askar added the comment: Updated patch to include a cross reference to keyword-only arguments since I think not everyone will know about this rather new feature. -- Added file: http://bugs.python.org/file46349/kwdefs_docs.diff4 ___ Python

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-19 Thread Ammar Askar
Ammar Askar added the comment: Updated patch for review comments -- Added file: http://bugs.python.org/file46348/kwdefs_docs.diff3 ___ Python tracker ___

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2017-01-19 Thread paul j3
paul j3 added the comment: Recent StackOverFlow question related to this issue - where the following positional is a subparsers. http://stackoverflow.com/questions/41742205/how-to-argparse-with-nargs-and-subcommands -- ___ Python tracker

[issue9625] argparse: Problem with defaults for variable nargs when using choices

2017-01-19 Thread paul j3
paul j3 added the comment: Recent StackOverFlow question related to this issue http://stackoverflow.com/questions/41750896/python-argparse-type-inconsistencies-when-combining-choices-nargs-and-def/41751730#41751730 -- ___ Python tracker

[issue29316] Keep typing.py provisional for the duration of the Python 3.6 release cycle

2017-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks everybody! We'll make typing.py provisional again for 3.6. @levkivskyi do you have the stomach to upload a patch here? -- title: Can we keep typing.py provisional for the duration of the Python 3.6 release cycle? -> Keep typing.py provisional

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

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: tp_fastcall-5.patch: Rebased patch. I already tried to push changes not directly related to tp_fastcall, so the new patch should be a *little bit* shorter. -- Added file: http://bugs.python.org/file46347/tp_fastcall-5.patch

[issue29323] Wrong documentation (Library) for unicode and str comparison

2017-01-19 Thread R. David Murray
R. David Murray added the comment: That's a good point, I think that is exactly the issue with that paragraph. -- ___ Python tracker ___

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

2017-01-19 Thread Ned Deily
Ned Deily added the comment: As far as I can tell, the only places that typing was declared as provisional were in PEP 484 and twice in the 3.5 What's New document (https://docs.python.org/3.5/whatsnew/3.5.html); it doesn't appear to have been mentioned in the library reference

[issue29330] __slots__ needs documentation

2017-01-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___

[issue29330] __slots__ needs documentation

2017-01-19 Thread Eryk Sun
Eryk Sun added the comment: Are you suggesting that the Helper class in Lib/pydoc.py should index [sub-]topics by special names such as "__slots__"? Currently you can see the __slots__ documentation via the topics "ATTRIBUTEMETHODS" and "SPECIALMETHODS". The list of topics can be printed via

[issue27596] Build failure with Xcode 8 beta on OSX 10.11

2017-01-19 Thread Maxime Belanger
Maxime Belanger added the comment: Glad to hear it! Thanks for the quick followup :). -- ___ Python tracker ___

[issue29328] struct module should support variable-length strings

2017-01-19 Thread Yury Selivanov
Yury Selivanov added the comment: Ethan, thanks for moving my reply on the list to here. Also +1 to what Mark said. -- nosy: +yselivanov ___ Python tracker

[issue27596] Build failure with Xcode 8 beta on OSX 10.11

2017-01-19 Thread Ned Deily
Ned Deily added the comment: Maxime, there have been a couple of attempts to address this problem. We believe it now finally fixed for all versions of macOS from 10.6 through 10.12 by the changes in Issue29057. Unfortunately, for 2.7,x the last set of fixes were after the release of 2.7.13

[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-19 Thread Ned Deily
Changes by Ned Deily : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2017-01-19 Thread paul j3
Changes by paul j3 : -- priority: normal -> high ___ Python tracker ___ ___

[issue9625] argparse: Problem with defaults for variable nargs when using choices

2017-01-19 Thread paul j3
Changes by paul j3 : -- priority: normal -> high ___ Python tracker ___ ___

[issue29330] __slots__ needs documentation

2017-01-19 Thread saumitra paul
saumitra paul added the comment: Python 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> help(__slots__) Traceback (most recent call last): File "", line

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: Raymond: "Please be careful with all of these AC changes. They need to have tests. They need to not change APIs. They need to not introduce bugs." The bug was not introduced by an Argument Clinic change. I agree that switching to AC must not change the

[issue29330] __slots__ needs documentation

2017-01-19 Thread Martin Panter
Martin Panter added the comment: Have you seen ? There is also . -- assignee: -> docs@python components: +Documentation nosy: +docs@python, martin.panter

[issue27596] Build failure with Xcode 8 beta on OSX 10.11

2017-01-19 Thread Maxime Belanger
Maxime Belanger added the comment: We're hitting this issue with Python 2.7 (which we deploy on Mac OS X 10.6-10.12). We've worked around it by manually patching `pyconfig.h` to un-define `HAVE_GETENTROPY` before `make`ing. Is a patch is in the works to support weak-linking this symbol (and

[issue29323] Wrong documentation (Library) for unicode and str comparison

2017-01-19 Thread Martin Panter
Martin Panter added the comment: If you read the whole paragraph carefully, I don't think it is too misleading. "In particular, tuples and lists . . ." suggests the author was just trying to say that a tuple never compares equal to a list. Maybe we just need to make that more obvious?

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: While Python 3.5 doesn't crash, I consider that it has also the bug. So I added Python 3.5 in Versions. sorted.diff LGTM. And thank you for the unit test! -- versions: +Python 3.5 ___ Python tracker

[issue29330] __slots__ needs documentation

2017-01-19 Thread saumitra paul
New submission from saumitra paul: As you said..assiging it to you :) -- messages: 285850 nosy: rhettinger, saumitra1978 priority: normal severity: normal status: open title: __slots__ needs documentation versions: Python 2.7 ___ Python tracker

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: Oh, this issue is very subtle. Since the list.sorted() class method became a builtin sorted() method (Python 2.4.0, change c06b570adf12 by Raymond Hettinger), the sorted() function accepts an iterable as a keyword argument, whereas list.sort() doesn't.

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please be careful with all of these AC changes. They need to have tests. They need to not change APIs. They need to not introduce bugs. The whole effort seems to be being pushed forward in a cavalier and aggressive manner. In this case, there was an

[issue29296] convert print() to METH_FASTCALL

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: > When the fastcall protocol be changed, this would require changing more > handwritten code. I don't plan to modify the fastcall protocol. I'm not sure that it's really possible to modify it anymore. It would probably be simpler to add a new

[issue29328] struct module should support variable-length strings

2017-01-19 Thread Ethan Furman
Ethan Furman added the comment: >From Yury Selivanov: --- This is a neat idea, but this will only work for parsing framed binary protocols. For example, if you protocol prefixes all packets with a length field, you can write an efficient read buffer and use your proposal to

[issue29311] Argument Clinic: convert dict methods

2017-01-19 Thread Martin Panter
Martin Panter added the comment: D.get(key[, default]) -> D[key] if key in D, else default. There is no big problem with that. D is defined at the start. The only thing I would have suggested is avoid using square brackets to mean two things in the one expression. Since it is no longer the

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Serhiy. I'm going to hold off committing this for 24 hours or so, because I want to follow the buildbots when I do (and I don't have time for that right now). I wouldn't be at all surprised to see platform-specific test failures. --

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then LGTM unconditionally. -- ___ Python tracker ___ ___ Python-bugs-list

[issue13285] signal module ignores external signal changes

2017-01-19 Thread R. David Murray
R. David Murray added the comment: IMO the signal handler context manager would be useful (I have existing code where I wrote one that didn't quite work right :). I suggest you propose this on python-ideas. -- nosy: +r.david.murray ___ Python

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, the dev guide says 80 characters. (https://docs.python.org/devguide/documenting.html) -- ___ Python tracker ___

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: > lines in What's New are too long. Thanks. Fixed (I think). I'm not sure what the limit is, but the lines are now all <= 79 characters long. -- Added file: http://bugs.python.org/file46346/math_fma3.patch ___

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM except that lines in What's New are too long. -- assignee: -> mark.dickinson stage: patch review -> commit review ___ Python tracker

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg285838 ___ Python tracker ___

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Have you missed the patch? -- ___ Python tracker ___ ___ Python-bugs-list

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python stage: -> needs patch versions: +Python 2.7 ___ Python tracker

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops; looks like I failed to attach the updated patch. Here it is. -- Added file: http://bugs.python.org/file46345/math_fma2.patch ___ Python tracker

[issue29282] Fused multiply-add: proposal to add math.fma()

2017-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: Serhiy, Victor: thanks for the reviews. Here's a new patch. Differences w.r.t. the old one: - Converted to argument clinic. - Updated docstring to talk about special cases. - More tests, as suggested by Serhiy. - whatsnew entry and ..versionadded in docs.

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-19 Thread Eryk Sun
Eryk Sun added the comment: Python 3 uses __index__ for bin(), oct(), and hex(), but Python 2 only uses __index__ for bin() and otherwise uses __oct__ and __hex__. Antoine overlooked this when updating the 2.7 docs for hex() in issue 16665. -- nosy: +eryksun

[issue29328] struct module should support variable-length strings

2017-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: IMO, as one of the previous maintainers of the struct module, this feature request isn't compatible with the current design and purpose of the struct module. I agree that there's an important problem to solve (and one I've had to solve many times for various

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Tal Einat
Tal Einat added the comment: Serhiy, no apology is required. On the contrary, thank you for the taking the time to review this and commit, I don't have time available for this these days. -- ___ Python tracker

[issue29328] struct module should support variable-length strings

2017-01-19 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-19 Thread Pekka Klärck
New submission from Pekka Klärck: Documentation of `hex()` on Python 2 says that custom objects need to implement `__index__` to support it. Based on my tests that doesn't work but `__hex__` is needed instead. Docs are at https://docs.python.org/2/library/functions.html?highlight=hex#hex and

[issue13285] signal module ignores external signal changes

2017-01-19 Thread Thomas Kluyver
Thomas Kluyver added the comment: I'd like to make the case for a fix in the code again. Our use case is, I believe, the same as Vilya's. We want to temporarily set a signal handler from Python and then restore the previous handler. This is fairly straightforward for Python handler functions,

[issue29328] struct module should support variable-length strings

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you provide some examples of using these format specifiers? I suppose that due to limitations of the struct module the way in which they can be implemented would be not particularly useful for you. -- nosy: +serhiy.storchaka

[issue29327] SystemError or crash in sorted(iterable=[])

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes the bug. -- keywords: +patch nosy: +haypo stage: -> patch review title: SystemError in sorted(iterable=[]) -> SystemError or crash in sorted(iterable=[]) Added file: http://bugs.python.org/file46344/sorted.diff

[issue29328] struct module should support variable-length strings

2017-01-19 Thread Elizabeth Myers
New submission from Elizabeth Myers: There was some discussion on python-ideas about this, and I figured it would be more productive to bring it here since to me this appears to be a glaring omission. The struct module has no capability to support variable-length strings; this includes

[issue29327] SystemError in sorted(iterable=[])

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In debug build Python is crashed. >>> sorted(iterable=[]) python: Objects/abstract.c:2317: _PyObject_FastCallDict: Assertion `nargs >= 0' failed. Aborted (core dumped) -- type: behavior -> crash ___ Python

[issue29327] SystemError in sorted(iterable=[])

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems this regression was introduced in issue27809. -- ___ Python tracker ___

[issue2771] Test issue

2017-01-19 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +19 ___ Python tracker ___ ___ Python-bugs-list

[issue28837] 2to3 does not wrap zip correctly

2017-01-19 Thread Stuart Berg
Changes by Stuart Berg : Added file: http://bugs.python.org/file46343/fix-28837.patch ___ Python tracker ___

[issue28837] 2to3 does not wrap zip correctly

2017-01-19 Thread Stuart Berg
Changes by Stuart Berg : Removed file: http://bugs.python.org/file46342/fix-28837.patch ___ Python tracker ___

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2017-01-19 Thread Steve Dower
Steve Dower added the comment: I'd say it definitely qualifies as a bug fix, even in 3.5 (which repros), assuming we don't break any existing APIs in the process. -- versions: +Python 3.5 ___ Python tracker

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

2017-01-19 Thread Brett Cannon
Brett Cannon added the comment: Keeping it provisional sounds reasonable to me, especially if it helps land protocol support. -- nosy: +brett.cannon ___ Python tracker

[issue28837] 2to3 does not wrap zip correctly

2017-01-19 Thread Stuart Berg
Changes by Stuart Berg : Removed file: http://bugs.python.org/file46341/fix-28837.patch ___ Python tracker ___

[issue28837] 2to3 does not wrap zip correctly

2017-01-19 Thread Stuart Berg
Stuart Berg added the comment: Sorry for re-uploading the patch; I made some pep8 fixes. -- Added file: http://bugs.python.org/file46342/fix-28837.patch ___ Python tracker

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2017-01-19 Thread Paul Moore
Paul Moore added the comment: Nice! Thanks for finding this. I don't suppose there's any chance this would qualify as a bugfix for 3.6.1? I've been holding off on working on https://github.com/pfmoore/pylaunch until 3.6 because 3.5 doesn't handle being in a subdirectory very well. It'd be a

[issue29311] Argument Clinic: convert dict methods

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There was a context in old docstrings removed in new docstrings. It is not always possible just to copy docstrings in Argument Clinic. Sometimes rewriting docstrings is the hardest part of converting to Argument Clinic. I suggest either restore the context

[issue28837] 2to3 does not wrap zip correctly

2017-01-19 Thread Stuart Berg
Changes by Stuart Berg : Added file: http://bugs.python.org/file46341/fix-28837.patch ___ Python tracker ___

[issue29289] Convert OrderedDict methods to Argument Clinic

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset c144bf6c0ff7 by Serhiy Storchaka in branch 'default': Issue #29289: Argument Clinic generates reasonable name for the parameter "default". https://hg.python.org/cpython/rev/c144bf6c0ff7 -- ___ Python

[issue28837] 2to3 does not wrap zip correctly

2017-01-19 Thread Stuart Berg
Changes by Stuart Berg : Removed file: http://bugs.python.org/file46339/fix-28837.patch ___ Python tracker ___

[issue29311] Argument Clinic: convert dict methods

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: > There are same problems with docstrings as in OrderedDict. The name "D" is > not defined. I copied the old docstring to AC. Python 3.6 doc: --- get(...) D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None. --- D was already implicitly "self".

[issue29327] SystemError in sorted(iterable=[])

2017-01-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In Python 3.6: >>> sorted(iterable=[]) Traceback (most recent call last): File "", line 1, in SystemError: Objects/tupleobject.c:81: bad argument to internal function In Python 3.5 and 2.7: >>> sorted(iterable=[]) Traceback (most recent call last):

[issue29311] Argument Clinic: convert dict methods

2017-01-19 Thread STINNER Victor
STINNER Victor added the comment: > Argument Clinic generates reasonable name for the parameter "default". > -default as failobj: object = None > +default: object = None Thanks, that's a better name :-) FYI I wanted to limit changes when converting to AC, the change is already big

[issue29323] Wrong documentation (Library) for unicode and str comparison

2017-01-19 Thread R. David Murray
R. David Murray added the comment: As per your other issue, though, the real issue is that the two objects must be *comparable*, not that they be of the same type, and the language should probably be updated to reflect that. -- ___ Python tracker

[issue29323] Wrong documentation (Library) for unicode and str comparison

2017-01-19 Thread R. David Murray
R. David Murray added the comment: Unicode and string *are* of the same type: basestring. This is a specific example of the liskov substitution principle, so I don't think it should be called out explicitly in this section. -- nosy: +r.david.murray

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2017-01-19 Thread Steve Dower
Steve Dower added the comment: Found it in Modules/main.c in RunMainFromImporter(): /* argv0 is usable as an import source, so put it in sys.path[0] and import __main__ */ sys_path = PySys_GetObject("path"); if (sys_path == NULL) { PyErr_SetString(PyExc_RuntimeError,

[issue29311] Argument Clinic: convert dict methods

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are same problems with docstrings as in OrderedDict. The name "D" is not defined. -- nosy: +serhiy.storchaka ___ Python tracker

[issue29311] Argument Clinic: convert dict methods

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset fe1d83fe29d6 by Serhiy Storchaka in branch 'default': Issue #29311: Argument Clinic generates reasonable name for the parameter "default". https://hg.python.org/cpython/rev/fe1d83fe29d6 -- ___ Python

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2017-01-19 Thread Steve Dower
Steve Dower added the comment: I just tried it and it makes no difference. Omitting the "._pth" file seems to fix it, but apart from issue29326 (benign) sys.path is fine. Still digging, but don't worry about testing on other machines. -- ___

[issue13886] readline-related test_builtin failure

2017-01-19 Thread Xavier de Gaye
Xavier de Gaye added the comment: With input-readline.v3.patch, test_builtin runs with success on Android api 21. With pep538_coerce_legacy_c_locale_v4.diff that implements PEP 538 in issue 28180, and with input-readline.v3.patch modified to have 'readline_encoding =

[issue29326] Blank lines in ._pth file are not ignored

2017-01-19 Thread Steve Dower
New submission from Steve Dower: If a python._pth file includes a blank line, it gets treated as '\n' which is then appended to the directory and used as an entry in sys.path. Empty lines should be ignored completely. -- components: Windows messages: 285809 nosy: paul.moore,

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry for committing patches for you Tal, but they were hanging so long time. -- ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset e3db9bccff3f by Serhiy Storchaka in branch 'default': Issue #20186: Converted builtins enumerate() and reversed() to Argument Clinic. https://hg.python.org/cpython/rev/e3db9bccff3f -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue20186.enumobject.patch LGTM too. -- ___ Python tracker ___ ___

  1   2   >