[issue27234] tuple - single value with comma is assigned as type tuple

2016-06-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Yes, it is intended. Commas create tuples, not parentheses. (With the exception of the empty tuple.) The parens are just for grouping and precedence. `1,` is a tuple, regardless of whether you use parens around it or not. -- nosy: +steven.daprano reso

[issue21130] equivalent functools.partial instances should compare equal

2016-06-05 Thread shakur shams Mullick
shakur shams Mullick added the comment: Emanuel Barry if you want to take it over, I will stop and will not modify my patch further. Otherwise please let me know. -- ___ Python tracker

[issue27234] tuple - single value with comma is assigned as type tuple

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Yes, this is intentional. It is documented in https://docs.python.org/3/reference/expressions.html#expression-lists: "The trailing comma is required only to create a single tuple" -- nosy: +Jelle Zijlstra ___ Pytho

[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Ned Deily
Ned Deily added the comment: Since this is an addition to the changes made for PEP 488 (Issue23731), nosying Brett -- nosy: +brett.cannon, ned.deily ___ Python tracker ___ _

[issue27234] tuple - single value with comma is assigned as type tuple

2016-06-05 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez: A single value terminated by a comma is assigned to be a tuple, even when missing parenthesis. a=(1) => a=1OK/defined as a=(1,) => a=(1,) OK a=1, => a=(1,) ??? Is the latter intended? -- In [4]: a=1, In [5]: print a (1,) In

[issue27232] os.fspath() should not use repr() on error

2016-06-05 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Removed file: http://bugs.python.org/file43239/fspath-exception.patch ___ Python tracker ___ ___ Python-bugs-list

[issue27232] os.fspath() should not use repr() on error

2016-06-05 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file43240/fspath-exception.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue27233] Missing documentation for PyOS_FSPath

2016-06-05 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: It should be added to the C API documentation. I plan on getting to this today. -- assignee: Jelle Zijlstra components: Documentation messages: 267433 nosy: Jelle Zijlstra, ethan.furman priority: normal severity: normal status: open title: Missing docu

[issue27232] os.fspath() should not use repr() on error

2016-06-05 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: The current implementation of os.fspath() outputs something like this if you call os.fspath(0): expected str, bytes or os.PathLike object, not This patch changes the output to: expected str, bytes or os.PathLike object, not int -- components: Libr

[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Ned Deily
Ned Deily added the comment: The culprit appears to be the changes introduced for Issue22359 (c36b9ef8ff39 and friends). -- nosy: +martin.panter, ned.deily, xdegaye ___ Python tracker _

[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Ned Deily
Changes by Ned Deily : -- nosy: +doko ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue27230] Calculation involving mpmath gives wrong result with Python 3.6 and correct result with 2.7

2016-06-05 Thread Ned Deily
Ned Deily added the comment: Mpmath is a separate project, not in the Python Standard Library. I suggest you pursue the issue on its issue tracker, providing more information about exactly what results you see with what components (e.g. which OS platform and version, which versions of mpmath,

[issue27186] add os.fspath()

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I moved my patch for the path_t converter to issue26027, which already covers posixmodule.c. I'm creating issue27231 to track adding os.fspath() support to posixpath.py. With that, I think this issue is done. -- resolution: -> fixed status: open -> cl

[issue27231] Support the fspath protocol in the posixpath module

2016-06-05 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: Various functions in posixpath.py need to accept os.PathLike objects. I will submit a patch. -- assignee: Jelle Zijlstra components: Library (Lib) messages: 267428 nosy: Jelle Zijlstra, ethan.furman priority: normal severity: normal status: open title

[issue26027] Support Path objects in the posix module

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The patch is obsolete because PEP 519 ended up going with a different approach. I submitted a new patch for the path_t converter in issue27186. That patch probably fits better here, so I'm resubmitting it. -- nosy: +Jelle Zijlstra Added file: http://bu

[issue27230] Calculation involving mpmath gives wrong result with Python 3.6 and correct result with 2.7

2016-06-05 Thread Andrew Lyasoff
New submission from Andrew Lyasoff: A particular numerical expression involving mpmath produces the wrong result when evaluated with Python 3.5 and produces the correct result when evaluated with Python 2.7. The expression involves the commonly used erf (error) function. -- components:

[issue17288] cannot jump from a return after setting f_lineno

2016-06-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue11822] Improve disassembly to show embedded code objects

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like Stéphane's idea about placing the output for nested code object at the same level after the output for the main code object. -- nosy: +serhiy.storchaka ___ Python tracker

[issue27179] subprocess uses wrong encoding on Windows

2016-06-05 Thread Eryk Sun
Eryk Sun added the comment: > so if we default to UTF-8 it will be even worse than > defaulting to ANSI because there aren't many programs > on Windows which would use UTF-8 I didn't say subprocess should default to UTF-8. What I wish is for Python to default to using UTF-8 for its own pipe a

[issue27219] turtle.fillcolor doesn't accept a tuple of floats

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New patch -- Added file: http://bugs.python.org/file43236/issue27219-cr.patch ___ Python tracker ___ ___

[issue21130] equivalent functools.partial instances should compare equal

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a question: should partial(func) be equal to func? -- ___ Python tracker ___ ___ Python-b

[issue21130] equivalent functools.partial instances should compare equal

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I support Jelle's comments and have added other comments. -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-05 Thread aixtools
aixtools added the comment: On 04-Jun-16 16:24, Martin Panter wrote: > Martin Panter added the comment: > > Okay here are some more thoughts about your latest patch: > > ## Automatic RTLD_MEMBER ## > > I was still uneasy about the automatic setting of RTLD_MEMBER. But I looked > for how others h

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This bug was fixed in issue26881 with similar patch. Sorry, I didn't know about this issue. Your patches look good. In any case thank you for your effort. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> close

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch no longer applied cleanly. Mark, can you please update your patch? -- ___ Python tracker ___ ___

[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Alex Willmer
New submission from Alex Willmer: While trying a cross compile of Python 3.6 I encountered the following alex@martha:~/src/cpython default☿ hg summary parent: 101753:31ad7885e2e5 Issue #27225: Fixed a reference leak in type_new when setting __new__ fails. branch: default commit: (clean) update

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset d91b951e676f by Martin Panter in branch '3.5': Issue #27164: Allow decompressing raw Deflate streams with predefined zdict https://hg.python.org/cpython/rev/d91b951e676f New changeset 470954641f3b by Martin Panter in branch 'default': Issue #27164:

[issue26855] android: add platform.android_ver()

2016-06-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: Agreed, and it is not part of the versioning scheme either. -- ___ Python tracker ___ ___ Python-bug

[issue26862] android: SYS_getdents64 does not need to be defined on android API 21

2016-06-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: The patch is simpler since android/api-level.h is now included in pyport.h by changeset 09af54099973. -- Added file: http://bugs.python.org/file43234/posixmodule_3.patch ___ Python tracker

[issue26855] android: add platform.android_ver()

2016-06-05 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I guess ro.kernel.qemu is not generic enough to be an item in android_ver(). In tests you can simply use _android_getprop() -- ___ Python tracker __

[issue27228] just for clearing: os.path.normpath("file://a") returns "file:/a"

2016-06-05 Thread Georg Brandl
Georg Brandl added the comment: `os.path` does not handle URIs of any type, so this behavior is correct as Steven says. -- nosy: +georg.brandl resolution: -> not a bug status: open -> closed ___ Python tracker __

[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you provide a patch Arno-Can? According to the comment in the configure script of GNU coreutils, the only POSIX platforms known for coreutils developers that have two distinct roots / and // are Cygwin, z/OS and dead Apollo DomainOS. Yet few exotic pla

[issue26939] android: test_functools hangs on armv7

2016-06-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: The problem can be fixed by changing the switch interval to a higher value when the test is run on an Android emulator. Issue 26855 can provide a way to know when this is the case through the value of the ro.kernel.qemu property. -- dependencies: +andr

[issue26855] android: add platform.android_ver()

2016-06-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: The ro.kernel.qemu property is set to 1 on an Android emulator and 0 otherwise. I think it should be added to the list. On some threading tests where the switch interval is set to one microsecond, it is necessary to set the switch interval to a higher value w

[issue27228] just for clearing: os.path.normpath("file://a") returns "file:/a"

2016-06-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: "file://a" is a valid relative file path, for a directory called "file:" and a file called "a", so normpath should return "file:/a". -- nosy: +steven.daprano ___ Python tracker _

[issue27228] just for clearing: os.path.normpath("file://a") returns "file:/a"

2016-06-05 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez: I am currently finishing a file system library and use 'os.path.normpath' for canonical input into match-operations. So already found Issue26329 - IEEE-1003.1-Chap 4.2 and written a comment. But I guess this issue should be handled seperately. Now hav

[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2016-06-05 Thread Martin Panter
Martin Panter added the comment: Here is an updated patch with the remaining fixes for other servers. I considered changing the behaviour of shutil.copyfileobj() to handle partial writes better. But I decided against it, because: (a) nobody has complained yet, and (b) it could potentially brea

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-05 Thread Xiang Zhang
Xiang Zhang added the comment: It looks good. I don't think that is a matter since usually I will do a search before change. But of course extracting them to a subroutine helps. -- ___ Python tracker _

[issue27227] argparse fails to parse [] when using choices and nargs='*'

2016-06-05 Thread Evan
New submission from Evan: When using nargs='*' with choices, it is impossible to specify 0 args: from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('foo', choices=['foo'], nargs='*') args = parser.parse_args([]) # <-- fails, error message below assert args.foo ==

[issue25548] Show the address in the repr for class objects

2016-06-05 Thread Nofar Schnider
Nofar Schnider added the comment: Kushal, you've beat me to it. Great work! -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I would suggest using --optimize=1,2 / -O1,2 for this purpose. Documentation in this part of Lib/distutils/command/build_py.py and Lib/distutils/command/install_lib.py should also be updated: ('optimize=', 'O', "also compi

[issue27225] Potential refleak in type_new when setting __new__ fails

2016-06-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue27225] Potential refleak in type_new when setting __new__ fails

2016-06-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33b53734805b by Serhiy Storchaka in branch '3.5': Issue #27225: Fixed a reference leak in type_new when setting __new__ fails. https://hg.python.org/cpython/rev/33b53734805b New changeset 31ad7885e2e5 by Serhiy Storchaka in branch 'default': Issue #

[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: I propose to add at least a statement like e.g. "In conformance to IEEE Std 1003.1™, 2013 Edition; 4.12 Pathname Resolution". Because I had the same thought of a bug at first view, this because I did not find any hint in e.g. docs for 2.7.11. The reaso

[issue27225] Potential refleak in type_new when setting __new__ fails

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka components: +Interpreter Core nosy: +serhiy.storchaka stage: -> commit review type: -> resource usage versions: +Python 2.7, Python 3.5 ___ Python tracker

[issue21916] Create unit tests for turtle textonly

2016-06-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c1befa401ca by Serhiy Storchaka in branch '3.5': Issue #21916: Added more tests for the turtle module. https://hg.python.org/cpython/rev/5c1befa401ca New changeset 41fa38ea46ba by Serhiy Storchaka in branch '2.7': Issue #21916: Added more tests for

[issue21916] Create unit tests for turtle textonly

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patches Jelle. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Updated patch attached. I don't feel strongly about whether this should be in Python, but it seems potentially useful at least as a tool to learn more about how re is implemented. If I have time I may write a tool using __pattern_code__ and the sre_constants

[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. I still not think this is a good idea. -- ___ Python tracker ___ ___

[issue27219] turtle.fillcolor doesn't accept a tuple of floats

2016-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _color_triple_to_hexstring() is implementation detail. It would be better to test it indirectly using public method (like fillcolor()). Added other comments on Rietveld. -- nosy: +serhiy.storchaka stage: -> patch review

[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2016-06-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset a57703119f40 by Martin Panter in branch '3.5': Issue #24291: Avoid WSGIRequestHandler doing partial writes https://hg.python.org/cpython/rev/a57703119f40 New changeset d8f021944e0b by Martin Panter in branch 'default': Issue #24291: Merge wsgi parti

<    1   2