[issue19040] Problems with overriding Enum.__new__
Changes by Ethan Furman et...@stoneleaf.us: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19040 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors
Roundup Robot added the comment: New changeset 96081e7526f0 by Ethan Furman in branch 'default': Issue19030: fixed comment that was still referring to a changed descriptor. http://hg.python.org/cpython/rev/96081e7526f0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19030 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14365] argparse: subparsers, argument abbreviations and ambiguous option
paul j3 added the comment: I think the correction to the problem that I noted in the previous post is to return 'None, arg_string, None', rather than 'action, arg_string, None' in the case where the action is found in a subparser. This is what '_parse_optional' does at the end: # it was meant to be an optional but there is no such option # in this parser (though it might be a valid option in a subparser) return None, arg_string, None An input like '--foo baz' would then produce an 'invalid choice' error. Since '--foo' is an optional that the primary parser does not recognize, 'baz' in interpreted as a positional, in this case an invalid subparser choice. I'm working on cleaning up a test script. -- Added file: http://bugs.python.org/file31888/subparser_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14365 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14365] argparse: subparsers, argument abbreviations and ambiguous option
paul j3 added the comment: In the last patch, 'parser.scan = True' is needed to activate this fix. I left that switch in for testing convenience. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14365 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19110] PEP-0 history link is broken
New submission from anatoly techtonik: See http://www.python.org/dev/peps/, click Last-Modified. -- assignee: docs@python components: Documentation messages: 198509 nosy: docs@python, techtonik priority: normal severity: normal status: open title: PEP-0 history link is broken ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19110 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19094] urljoin should raise a TypeError if URL is not a string
Vajrasky Kok added the comment: I modified the patch to handle the last case using your way as well. Anyway, I found out that urlsplit and urlparse got the same issue as well. urlparse('python.org', b'http://') Traceback (most recent call last): File stdin, line 1, in module File /home/sky/Code/python/programming_language/cpython/Lib/urllib/parse.py, line 292, in urlparse url, scheme, _coerce_result = _coerce_args(url, scheme) File /home/sky/Code/python/programming_language/cpython/Lib/urllib/parse.py, line 109, in _coerce_args raise TypeError(Cannot mix str and non-str arguments) TypeError: Cannot mix str and non-str arguments urlparse('python.org', b'') ParseResult(scheme=b'', netloc='', path='python.org', params='', query='', fragment='') urlparse('python.org', 0) ParseResult(scheme=0, netloc='', path='python.org', params='', query='', fragment='') Same thing happens in urlsplit. Fortunately, urlunsplit and urlunparse don't have this issue. -- Added file: http://bugs.python.org/file31889/urljoin_throws_type_error_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19094 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18990] Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser
Stefan Behnel added the comment: Eli didn't explicitly comment on the patch so far, but let me quote some of his earlier comments: if the reader discards parts of the tree (by deleting subtrees), then returning the root from close() becomes even more meaningless, because it's no longer the root and we have no idea what it actually is. Meaning: .root is definitely the wrong name for this attribute. The API is well defined by the documentation. All the rest is implementation details. Meaning: .root is not a public attribute, the existing (functionally equivalent and therefore redundant) ._root is enough and makes it clear(er) for readers of the source code that the attribute is really non-public. I read these as a clear expression of consensus that the public .root attribute is not supposed to exist at all. So, given that the next alpha release is due tomorrow, I'd like to see my latest patch applied by then in order to finally move at least a tiny step forward with this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19001] test_gdb fails on Fedora buildbot
Stefan Krah added the comment: Nick Coghlan rep...@bugs.python.org wrote: My F19 system (which works) shows gdb-7.6-34, while the new debugging output Antoine added shows 7.3.50.20110722-16.fc16 on F16 Maybe the new gdb version check needs to be looking for 7.4+ rather than 7.3+? Yes, probably. We've already had another problem with the strange gdb version on Fedora 16. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19001 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18990] Remove root attribute from XMLPullParser
Changes by Nick Coghlan ncogh...@gmail.com: -- title: Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser - Remove root attribute from XMLPullParser ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18990] Remove root attribute from XMLPullParser
Roundup Robot added the comment: New changeset c5e206b9df2e by Nick Coghlan in branch 'default': Close #18990: remove root attribute from XMLPullParser http://hg.python.org/cpython/rev/c5e206b9df2e -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18990] Remove root attribute from XMLPullParser
Nick Coghlan added the comment: We're not changing XMLPullParser.close() to return anything other than None, so the unit tests now check for this, and this behaviour is explicitly documented with users redirected towards read_events() instead. This is consistent with the XMLParser.close() API, since what to return is up to the target, and the implicit custom target for XMLPullParser is designed for the events to be consumed in a stream. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18990] Remove root attribute from XMLPullParser
Stefan Behnel added the comment: Thanks, Nick. Your changes look good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19078] Allow reversed(memoryview), like memoryview
Stefan Krah added the comment: Yes, len() should return the number of items. +1 for making reversed() work. NumPy does this: x = numpy.array([1,2,3,4,5,6,7,8]) list(reversed(x)) [8, 7, 6, 5, 4, 3, 2, 1] x = numpy.array([[1,2,3], [4,5,6]]) list(reversed(x)) [array([4, 5, 6]), array([1, 2, 3])] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18596] enable usage of AddressSanitizer in CPython [PATCH]
Roundup Robot added the comment: New changeset f6792f734fcc by Nick Coghlan in branch 'default': Close #18596: Support address sanity checking in clang/GCC http://hg.python.org/cpython/rev/f6792f734fcc -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18596 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19078] Allow reversed(memoryview), like memoryview
Stefan Krah added the comment: Hmm, I meant: Number of items in the first dimension, thus 4 in Claudiu's example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18596] enable usage of AddressSanitizer in CPython [PATCH]
Nick Coghlan added the comment: Incorporated, but as Charles-François noted, a buildbot running with it enabled would be nice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18596 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19086] Make fsum usable incrementally.
Oscar Benjamin added the comment: Thanks for responding Raymond. Raymond Hettinger wrote: A start argument won't help you, because you will discard information on input. A sequence like [1E100, 0.1, -1E100, 0.1] wouldn't work when split into subtotal=fsum([1E100, 0.1]) and fsum([-1E100, 0.1], start=subtotal). I'm not sure if you've fully understood the proposal. The algorithm underlying fsum is (I think) called distillation. It compresses a list of floats into a shorter list of non-overlapping floats having the same exact sum. Where fsum deviates from this idea is that it doesn't return a list of floats, rather it returns only the largest float. My proposal is that there be a way to tell fsum to return the list of floats whose sum is exact and not rounded. Specifically the subtotal that is returned and fed back into fsum would be a list of floats and no information would be discarded. So fsum(numbers, []) would return a list of floats and that list can be passed back in again. My motivation for this is that I want to be able to write an efficient sum function that is accurate for a mix of ints and floats FWIW, fsum() already works well with integers as long as they don't exceed 53bits of precision. I was simplifying the use-case somewhat. I would also like this sum function to work with fractions and decimals neither of which coerces exactly to float (and potentially I want some non-stdlib types also). For such exotic use cases, the decimal module would be a better alternative. Now that the decimal module has a C implementation, there is no reason not to use it for high precision applications. It is possible to coerce to Decimal and exactly sum a list of ints, floats and decimals (by trapping inexact and increasing the context precision). I have tried this under CPython 3.3 and it was 20-50x slower than fsum depending on how it manages the arithmetic context and whether it can be used safely with a generator that also manipulates the context - the safe version that doesn't build a list is 50x slower. It is also not possible to use Decimal exactly with Fractions. I believe that there are other use-cases for having fsum be usable incrementally. This would make it usable for accurate summation in incremental, parallel and distributed computation also. Unfortunately fsum itself already isn't used as much as it should be and I agree that probably all the use cases for this extension would be relatively obscure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19086 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19111] 2to3 should remove from future_builtins import *
New submission from Peter: The 2to3 script should remove lines like this: from future_builtins import zip after running the zip fixer which respects the meaning of this command (issue 217). It does not, which results in an ImportError when trying to use the converted code under Python 3. Similarly for lines like this after running the map fixer etc: from future_builtins import map Background: Python 2.6 and 2.7 have an iterator-style zip function in future_builtins (and other things): $ python2.6 Python 2.6.8 (unknown, Sep 28 2013, 12:09:28) [GCC 4.6.3] on linux3 Type help, copyright, credits or license for more information. import future_builtins dir(future_builtins) ['__doc__', '__file__', '__name__', '__package__', 'ascii', 'filter', 'hex', 'map', 'oct', 'zip'] quit() $ python2.7 Python 2.7.1 (r271:86832, Dec 26 2010, 19:03:20) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. import future_builtins dir(future_builtins) ['__doc__', '__file__', '__name__', '__package__', 'ascii', 'filter', 'hex', 'map', 'oct', 'zip'] quit() The future_builtins module does not exist under Python 3, in particular its zip and map functions do not exist. $ python3.3 Python 3.3.2 (default, Sep 28 2013, 12:00:20) [GCC 4.6.3] on linux Type help, copyright, credits or license for more information. import future_builtins Traceback (most recent call last): File stdin, line 1, in module ImportError: No module named 'future_builtins' -- Sample script using zip which works under Python 2.6 and 2.7, $ more zip_2to3_bug.py from future_builtins import zip assert next(zip(abc, [1, 2, 3])) == (a, 1) print Done $ python2.6 zip_2to3_bug.py Done $ python2.7 zip_2to3_bug.py Done Now let's use the 2to3 script (in place): $ 2to3 -w zip_2to3_bug.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma RefactoringTool: Refactored zip_2to3_bug.py --- zip_2to3_bug.py (original) +++ zip_2to3_bug.py (refactored) @@ -1,3 +1,3 @@ from future_builtins import zip assert next(zip(abc, [1, 2, 3])) == (a, 1) -print Done +print(Done) Here's the (broken) output: $ more zip_2to3_bug.py from future_builtins import zip assert next(zip(abc, [1, 2, 3])) == (a, 1) print(Done) This breaks: $ python3.3 zip_2to3_bug.py Traceback (most recent call last): File zip_2to3_bug.py, line 1, in module from future_builtins import zip ImportError: No module named 'future_builtins' Expected output should respect the fact I am using from future_builtins import zip therefore zip as an iterator already (this is working), and then remove the line from future_builtins import zip: $ more zip_2to3_bug.py assert next(zip(abc, [1, 2, 3])) == (a, 1) print(Done) -- Sample script using zip which works under Python 2.6 and 2.7, $ more map_2to3_bug.py from future_builtins import map x = [-2, -1, 0, 1, 2, 3] y = next(map(abs, x)) assert y == 2 print Done $ python2.6 map_2to3_bug.py Done $ python2.7 map_2to3_bug.py Done Now let's use the 2to3 script (in place): $ 2to3 -w map_2to3_bug.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma RefactoringTool: Refactored map_2to3_bug.py --- map_2to3_bug.py (original) +++ map_2to3_bug.py (refactored) @@ -2,4 +2,4 @@ x = [-2, -1, 0, 1, 2, 3] y = next(map(abs, x)) assert y == 2 -print Done +print(Done) RefactoringTool: Files that were modified: RefactoringTool: map_2to3_bug.py Here's the (broken) output: $ more map_2to3_bug.py from future_builtins import map x = [-2, -1, 0, 1, 2, 3] y = next(map(abs, x)) assert y == 2 print(Done) This breaks: $ python3.3 map_2to3_bug.py Traceback (most recent call last): File map_2to3_bug.py, line 1, in module from future_builtins import map ImportError: No module named 'future_builtins' Expected output should respect the fact I am using from future_builtins import map and therefore treat map according (this is working), and then remove the line from future_builtins import map: $ more zip_2to3_bug.py x = [-2, -1, 0, 1, 2, 3] y = next(map(abs, x)) assert y == 2 print(Done) -- components: 2to3 (2.x to 3.x conversion tool) messages: 198521 nosy: maubp priority: normal severity: normal status: open title: 2to3 should remove from future_builtins import * type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19111 ___ ___ Python-bugs-list mailing list Unsubscribe:
[issue10042] functools.total_ordering fails to handle NotImplemented correctly
Nick Coghlan added the comment: Updated patch that includes the simplified OrderedEnum example in the enum docs and also updates the enum tests to check that type errors are correctly raised between different kinds of ordered enum. -- nosy: +ethan.furman priority: low - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] functools.total_ordering fails to handle NotImplemented correctly
Nick Coghlan added the comment: Raymond, I'm happy to leave this until alpha 4, but I'm raising the priority a bit since I think the inclusion of Enum in the standard library increases the chances of people wanting to use functools.total_ordering to avoid writing out the comparison methods in situations where incompatible types may encounter each other. -- Added file: http://bugs.python.org/file31890/issue10042_with_enum_updates.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18594] C accelerator for collections.Counter is slow
Changes by Eli Bendersky eli...@gmail.com: -- nosy: -eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18594 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19010] Make XMLPullParser in ElementTree inherit from XMLParser
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - wont fix stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19010 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19010] Make XMLPullParser in ElementTree inherit from XMLParser
Stefan Behnel added the comment: Any comment and/or reason? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19010 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16079] list duplicate test names with patchcheck
Xavier de Gaye added the comment: duplicate_code_names_2.py uses tokenize to print duplicate code names within the same scope, excluding property setter/getter/deleter duplicates, excluding duplicates of nested classes or functions, and ignoring duplicates listed in a file (run with --help for more details). With the attached ignored_duplicates file, it prints the following output on the root of the current default branch (in about 1 mn on an old laptop): $ ./duplicate_code_names_2.py --ignore ignored_duplicates . Duplicate function or class names: ./Lib/test/_test_multiprocessing.py:3047 _TestProcess ./Lib/test/test_os.py:1290 Win32ErrorTests Duplicate method names: ./Lib/ctypes/test/test_functions.py:316 FunctionTestCase.test_errors ./Lib/distutils/tests/test_cmd.py:80 CommandTestCase.test_ensure_string_list ./Lib/lib2to3/tests/test_fixers.py:1467 Test_dict.test_14 ./Lib/lib2to3/tests/test_fixers.py:1472 Test_dict.test_15 ./Lib/lib2to3/tests/test_fixers.py:1477 Test_dict.test_17 ./Lib/lib2to3/tests/test_fixers.py:1482 Test_dict.test_18 ./Lib/lib2to3/tests/test_fixers.py:1487 Test_dict.test_19 ./Lib/test/test_complex.py:104 ComplexTest.test_truediv ./Lib/test/test_dis.py:250 DisTests.test_big_linenos ./Lib/test/test_dis.py:294 DisTests.test_dis_object ./Lib/test/test_ftplib.py:537 TestFTPClass.test_mkd ./Lib/test/test_heapq.py:366 TestErrorHandling.test_get_only ./Lib/test/test_import.py:255 ImportTests.test_import_name_binding ./Lib/test/test_regrtest.py:210 ParseArgsTestCase.test_findleaks ./Lib/test/test_smtplib.py:249 DebuggingServerTests.testNotImplemented ./Lib/test/test_webbrowser.py:161 OperaCommandTest.test_open_new ./Lib/unittest/test/testmock/testmock.py:1381 MockTest.test_attribute_deletion ./Lib/xml/dom/minidom.py:379 Attr._get_name ./Mac/Tools/Doc/setup.py:123 DocBuild.makeHelpIndex -- Added file: http://bugs.python.org/file31891/duplicate_code_names_2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16079] list duplicate test names with patchcheck
Changes by Xavier de Gaye xdeg...@gmail.com: Added file: http://bugs.python.org/file31892/ignored_duplicates ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18902] Make ElementTree event handling more modular to allow custom targets for the non-blocking parser
Stefan Behnel added the comment: Closing #18990 defines the API of the new XMLPullParser that 3.4 will ship with, so this ticket becomes an enhancement for future versions. -- type: behavior - enhancement versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18902 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19112] tests of _TestProcess are not run by the multiprocessing test suite
New submission from Xavier de Gaye: class _TestProcess in Lib/test/_test_multiprocessing.py is overshadowed by a function of the same name. And test_current is its first method: $ ./python -m test -v test_multiprocessing_fork | grep test_current $ With the attached patch: $ ./python -m test -v test_multiprocessing_fork | grep test_current test_current (test.test_multiprocessing_fork.WithProcessesTestProcess) ... ok test_current (test.test_multiprocessing_fork.WithThreadsTestProcess) ... ok $ -- components: Library (Lib) files: testprocess.patch keywords: patch messages: 198528 nosy: jnoller, xdegaye priority: normal severity: normal status: open title: tests of _TestProcess are not run by the multiprocessing test suite type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31893/testprocess.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19112 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19010] Make XMLPullParser in ElementTree inherit from XMLParser
Eli Bendersky added the comment: Discussed in #18990 Future discussions of this class belong in #18902 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19010 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py
New submission from Xavier de Gaye: After renaming the first test_errors method to test_errors_1 and the second one to test_errors_2: $ /bin/sh -c cd Lib/ctypes/test; ../../../python runtests.py test_functions.py F == FAIL: test_errors_1 (ctypes.test.test_functions.FunctionTestCase) -- Traceback (most recent call last): File ./Lib/ctypes/test/test_functions.py, line 227, in test_errors_1 self.assertRaises(TypeError, f, X()) #cannot convert parameter AssertionError: TypeError not raised by _testfunc_p_p -- Ran 21 tests in 0.007s FAILED (failures=1) -- components: Library (Lib) messages: 198529 nosy: amaury.forgeotdarc, belopolsky, meador.inge, xdegaye priority: normal severity: normal status: open title: duplicate test names in Lib/ctypes/test/test_functions.py type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19113 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19112] tests of _TestProcess are not run by the multiprocessing test suite
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19112 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11344] Add os.path.splitpath(path) function
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11344 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19114] duplicate test names in Lib/distutils/tests/test_cmd.py
New submission from Xavier de Gaye: $ ./python -m unittest -v Lib/distutils/tests/test_cmd.py 21 | grep test_ensure_string_list test_ensure_string_list (Lib.distutils.tests.test_cmd.CommandTestCase) ... ok $ And after renaming the first test_ensure_string_list to test_ensure_string_list_1 and the second one to test_ensure_string_list_2: $ ./python -m unittest -v Lib/distutils/tests/test_cmd.py 21 | grep test_ensure_string_list test_ensure_string_list_1 (Lib.distutils.tests.test_cmd.CommandTestCase) ... ok test_ensure_string_list_2 (Lib.distutils.tests.test_cmd.CommandTestCase) ... ok $ -- components: Library (Lib) messages: 198530 nosy: eric.araujo, tarek, xdegaye priority: normal severity: normal status: open title: duplicate test names in Lib/distutils/tests/test_cmd.py type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19114 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19115] duplicate test names in Lib/lib2to3/tests/test_fixers.py
New submission from Xavier de Gaye: There are 5 duplicate test names in this file. $ ./python -m unittest Lib/lib2to3/tests/test_fixers.py .. -- Ran 451 tests in 8.770s OK With the patch applied: $ ./python -m unittest Lib/lib2to3/tests/test_fixers.py .. -- Ran 456 tests in 8.810s OK -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198531 nosy: benjamin.peterson, xdegaye priority: normal severity: normal status: open title: duplicate test names in Lib/lib2to3/tests/test_fixers.py type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31894/duplicate_test_name.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19115 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19107] CSV output of benchmark runner tries to write to binary file
Roundup Robot added the comment: New changeset 07a8440b3987 by Antoine Pitrou in branch 'default': Issue #19107: fix csv output with Python 3 http://hg.python.org/benchmarks/rev/07a8440b3987 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19107 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19107] CSV output of benchmark runner tries to write to binary file
Antoine Pitrou added the comment: Fixed! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19107 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting
Roundup Robot added the comment: New changeset 921177a65386 by Antoine Pitrou in branch 'default': Issue #19108: fix str/bytes mismatch when raising exception under Python 3 http://hg.python.org/benchmarks/rev/921177a65386 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting
Antoine Pitrou added the comment: Ok, I've fixed the str/bytes mismatch. I don't have any strong feelings about the rest, other than whoever wants perf.py to work with wrapper scripts should probably propose a patch. I'll let Brett decide. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting
Stefan Behnel added the comment: Well, it worked before, so the current state is clearly a regression. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18902] Make ElementTree event handling more modular to allow custom targets for the non-blocking parser
Stefan Behnel added the comment: Copying a relevant comment by Eli from http://bugs.python.org/issue18990#msg198145 and replying inline. The way the APIs are currently defined, XMLParser and XMLPullParser are different animals. XMLParser can be considered to only have one front in the API - feed() and close(). You feed() until the document is done and then you close() and get the parsed tree. There's no other way to get the parsed tree (unless you use a custom builder, I guess). On the other hand XMLPullParser has two clear fronts - an input front with feed() and close() and an output front with read_events(). For XMLPullParser, close() is just an input signal. The canonical way to get output from XMLPullParser is read_events(). close() has no better reason to return output than feed(). When we decided to change the method names (recall that Antoine's originals were completely different), we perhaps forgot this detail. No, we didn't. Even though XMLPullParser's method is named close(), it's *not* like XMLParser's close(). If someone is using XMLPullParser for its close() he's likely using the class incorrectly. Just as an example: consider that in a lot of use cases the programmer will want to discard parts of the tree that's parsed iteratively (similarly to the main use case of iterparse()), because the XML itself is too huge. It's a convenient streaming API, in other words. Now, if the reader discards parts of the tree (by deleting subtrees), then returning the root from close() becomes even more meaningless, because it's no longer the root and we have no idea what it actually is. Let me repeat that this was already the case before the new class was added and that it's a feature. If the target decides to discard parts of the tree, or not build a tree at all and (say) instead count elements and return their total number on close(), then that's what the user asked for by selecting that target. Let's agree to disagree on your conclusions, but I still can't see any advantages of making the separation between the two classes. The way I see it, making XMLPullParser inherit from XMLParser makes it very easy to explain what the difference is: the read_events() method, i.e. the additional way to receive the parse events that the combination of parser and target generate. Essentially, it's the target that does all the work here and the parser only collects the results and presents them to the user. Thus my intention to keep the parser as stupid as it looks from the user's side, instead of adding something new right next to it. That being said, if ElementTree keeps them separate and decides to *never* return anything from XMLPullParser.close(), then that's sufficiently compatible with lxml.etree, so I won't object to it. lxml has a long history of extending what's there in order to make it easier to use. As long as we can find a way to keep both libraries compatible for users, I think we should be able to both move forward. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18902 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18950] Miscellaneous fixes for the sunau module
Roundup Robot added the comment: New changeset 41ed98a93236 by Serhiy Storchaka in branch '3.3': Issue #18950: Fix miscellaneous bugs in the sunau module. http://hg.python.org/cpython/rev/41ed98a93236 New changeset 9e54def97a5e by Serhiy Storchaka in branch 'default': Issue #18950: Fix miscellaneous bugs in the sunau module. http://hg.python.org/cpython/rev/9e54def97a5e New changeset fdbbbc7b40d7 by Serhiy Storchaka in branch '2.7': Issue #18950: Fix miscellaneous bugs in the sunau module. http://hg.python.org/cpython/rev/fdbbbc7b40d7 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18950 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19116] duplicate test names in Lib/test/test_complex.py
New submission from Xavier de Gaye: $ ./python -m test -v test_complex | grep test_truediv test_truediv (test.test_complex.ComplexTest) ... ok After renaming the first test_truediv to test_truediv_1 and the second one to test_truediv_2: $ ./python -m test -v test_complex | grep test_truediv test_truediv_1 (test.test_complex.ComplexTest) ... ok test_truediv_2 (test.test_complex.ComplexTest) ... ok -- components: Library (Lib) messages: 198539 nosy: xdegaye priority: normal severity: normal status: open title: duplicate test names in Lib/test/test_complex.py type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19116 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19110] PEP-0 history link is broken
Roundup Robot added the comment: New changeset aba730d39749 by Ned Deily in branch 'default': Issue #19110: Surpress Last-Modified link in PEP 0 html http://hg.python.org/peps/rev/aba730d39749 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19110 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19115] duplicate test names in Lib/lib2to3/tests/test_fixers.py
Roundup Robot added the comment: New changeset 39bb7421cb69 by Benjamin Peterson in branch '2.7': fix duplicate test names (closes #19115) http://hg.python.org/cpython/rev/39bb7421cb69 New changeset 6bf37e2cbe83 by Benjamin Peterson in branch '3.3': fix duplicate test names (closes #19115) http://hg.python.org/cpython/rev/6bf37e2cbe83 New changeset 9f1694c2d47f by Benjamin Peterson in branch 'default': merge 3.3 (#19115) http://hg.python.org/cpython/rev/9f1694c2d47f -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19115 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19117] duplicate test names in Lib/test/test_dis.py
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_dis.py:250 DisTests.test_big_linenos ./Lib/test/test_dis.py:294 DisTests.test_dis_object The attached patch fixes this. -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198542 nosy: ncoghlan, xdegaye priority: normal severity: normal status: open title: duplicate test names in Lib/test/test_dis.py type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31895/duplicate_test_name.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19117 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19118] duplicate test names in Lib/test/test_ftplib.py
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_ftplib.py:537 TestFTPClass.test_mkd The attached patch fixes this. -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198543 nosy: giampaolo.rodola, xdegaye priority: normal severity: normal status: open title: duplicate test names in Lib/test/test_ftplib.py type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31896/duplicate_test_name.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding
STINNER Victor added the comment: Here is a patch. It uses same algorithm to obtain encodable non-ASCII string as for FS_NONASCII, but with locale encoding. It also adds new tests and simplifies existing tests. I don't like your patch. The purpose of PYTHONIOENCODING is to set sys.stdin/stdout/stderr encodings. Your patch does not check sys.stdout.encoding, but check directly the codec. Two codecs may encode the same character as the same byte sequence. Your test is skipped if the locale encoding is ASCII, whereas the purpopse of PYTHONIOENCODING is to write non-ASCII characters without having to care of the locale encoding. I would really prefer to simply check sys.stdin.encoding, sys.stdout.encoding and sys.stderr.encoding attributes. If you really want to check the codec itself, you should use known sequence, ex: 'héllo€'.encode('cp1252') gives b'h\xe9llo\x80'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19058 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19060] docs: note that subprocess doesn't replace os.exec*
Terry J. Reedy added the comment: The problem with the current text is 'such as', implying that there are other unlisted items that could have (should have?) been added to make the list complete. If the list is complete, 'such as' could just be removed. If a sentence were added, I would simplify it to It does not replace os.exec*. or perhaps os.fork and os.exec*.. -- keywords: +easy nosy: +loewis, terry.reedy versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
Terry J. Reedy added the comment: Please stop marking all versions. Use cntl-left click to select the appropriate ones (currently at most 2.7, 3.3, 3.4 for users). Which version did you run your file with? -- nosy: +loewis, terry.reedy stage: - test needed type: - behavior versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18950] Miscellaneous fixes for the sunau module
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18950 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19067] Built-in range docstrings are not PEP-8 compatible
Terry J. Reedy added the comment: PEP8 just says PEP 257 describes good docstring conventions. PEP 257 is what says '''It [the one line docstring] prescribes the function or method's effect as a command (Do this, Return that), not as a description; e.g. don't write Returns the pathname ''' I strongly prefer the rule, but we do not usually patch purely for PEP8 compliance. However, a docstring patch is safer than a code patch. -- nosy: +terry.reedy stage: - patch review versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19067 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers
Hrvoje Nikšić added the comment: Here is the updated patch, with a very minor improvement (no longer unnecessarily holds on to original exc_info), and with new tests. The tests test for the non-suppression of exit-exception (which fails without the fix) and for the correct suppression of body-exception by an outer CM. It was not necessary to write a test for suppression of exit-exception, since this is already tested by test_exit_exception_chaining_suppress(). There is one problem, however: applying my patch mysteriously breaks the existing test_exit_exception_chaining(). It breaks in a peculiar way: the correct exception is propagated , but the exception's context is wrong. Instead of to KeyError, it points to ZeroDivisionError, despite its having been correctly suppressed. I placed prints in _fix_exception_context right before assignment to __context__, to make sure it wasn't broken by my patch, and the assignment appears correct, it sets the context of IndexError to KeyError instance. The __context__ is correct immediately before the raise statement. However, after the IndexError is caught inside test_exit_exception_chaning(), its __context__ is unexpectedly pointing to ZeroDivisionError. It would seem that the difference is in the raise syntax. The old code used raise, while the new code uses raise exc[1], which I assume changes the exception's __context__. Changing raise exc[1] to raise exc[1] from None didn't help. -- Added file: http://bugs.python.org/file31897/exitstack.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19067] Built-in range docstrings are not PEP-8 compatible
Terry J. Reedy added the comment: I asked on py-dev whether to do this. #19068 and #19069 are similar issues for complex and float docstrings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19067 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19068] Some built-in complex docstrings are not PEP-8 compatible
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19069] Built-in float docstrings are not PEP-8 compatible
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19069 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19072 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19075] Add sorting algorithm visualization to turtledemo
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19075 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19119] duplicate test name in Lib/test/test_heapq.py
New submission from Xavier de Gaye: There are two test_get_only methods. The patch provides a partial fix, but removes the following two lines from the first method as the execution of these lines fails: for f in (self.module.nlargest, self.module.nsmallest): self.assertRaises(TypeError, f, 2, GetOnly()) because heapq.nlargest is stuck in an infinite loop when the sequence does not have a length. This seems to be a bug in nlargest. See the following test that runs with 100 % cpu usage. $ ./python Python 3.4.0a2+ (default:f6792f734fcc, Sep 28 2013, 17:09:46) [GCC 4.3.2] on linux Type help, copyright, credits or license for more information. class GetOnly: ... Dummy sequence class defining __getitem__ but not __len__. ... def __getitem__(self, ndx): ... return 10 ... import heapq heapq.nlargest(2, GetOnly()) ^CTraceback (most recent call last): File stdin, line 1, in module File Lib/heapq.py, line 455, in nlargest result = _nlargest(n, it) File stdin, line 3, in __getitem__ KeyboardInterrupt -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198550 nosy: rhettinger, stutzbach, xdegaye priority: normal severity: normal status: open title: duplicate test name in Lib/test/test_heapq.py type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31898/duplicate_test_name.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19119 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19078] Allow reversed(memoryview), like memoryview
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - patch review type: behavior - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18978] Allow urllib.request.Request subclasses to override method
Senthil Kumaran added the comment: Thanks for the this change, Jason. Docs could be updated to reflect this change (using ..versionchanged: directive). Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18978 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding
Serhiy Storchaka added the comment: Here is a patch which directly checks sys.std* attributes. -- Added file: http://bugs.python.org/file31899/sys_test_ioencoding.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19058 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding
Serhiy Storchaka added the comment: Your test is skipped if the locale encoding is ASCII, whereas the purpopse of PYTHONIOENCODING is to write non-ASCII characters without having to care of the locale encoding. This case was tested in previous test. If you really want to check the codec itself, you should use known sequence, ex: 'héllo€'.encode('cp1252') gives b'h\xe9llo\x80'. We can't be sure that OS supports cp1252 (or any other non-default) locale. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19058 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding
Serhiy Storchaka added the comment: Your patch does not check sys.stdout.encoding, but check directly the codec. Two codecs may encode the same character as the same byte sequence. Checking encoding name is too rigid. Python interpreter can normalize encoding name before assigning it to standard streams. This is implementation detail. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19058 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19080] Enrich SyntaxError with additional information
Terry J. Reedy added the comment: Currently, * 2 # or * a SyntaxError: can use starred expression only as assignment target This conflicts with your desired message. It cannot change because *a, at least, is a valid statement prefix in a way that '/ a' is not. Most other things give an uninformative generic 'invalid syntax' message (plus a more informative location indicator). If you can find a way to improve this, lots of people would be happy ;-). -- nosy: +terry.reedy versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19091] ast.parse gives wrong position for some Names when non-ascii characters occur before
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19091 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19094] urljoin should raise a TypeError if URL is not a string
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +orsenthil stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19094 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19103] Use pprint in displayhook
Terry J. Reedy added the comment: (in the patch, import of sys and pprint should be done once at module level and not repeated with every line of interactive output). pprint.pprint() produces more human readable output than print(repr()) which is used in sys.displayhook() Only sometimes, and when it is not, the result can be *much* worse. For instance, try list(range(40)) with the two options. On windows, pprint.pprint(list(range(300))) will not even fit in the default 300 line output buffer of the standard interpreter. This is not to mention doctest and other test breakage. I believe the majority consensus on python-ideas was to reject this until pprint is much improved, and then reconsider. I agree with that. As I said on the list, I think this is more feasible for environments (like Idle) where it could be turned on and off, or invoked to re-display an output where pprint *would* be better. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19103] Use pprint in displayhook
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared
Roundup Robot added the comment: New changeset 48d28de5bdf8 by Antoine Pitrou in branch '3.3': Issue #4366: Fix building extensions on all platforms when --enable-shared is used. http://hg.python.org/cpython/rev/48d28de5bdf8 New changeset d6e35146ae53 by Antoine Pitrou in branch 'default': Issue #4366: Fix building extensions on all platforms when --enable-shared is used. http://hg.python.org/cpython/rev/d6e35146ae53 New changeset 28e6c23c8ae6 by Antoine Pitrou in branch '2.7': Issue #4366: Fix building extensions on all platforms when --enable-shared is used. http://hg.python.org/cpython/rev/28e6c23c8ae6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared
Antoine Pitrou added the comment: Ok, let's mark this bug fixed. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers
Nick Coghlan added the comment: Moving the context fixing into an exception handler may work. Something like: try: raise exc[1] except BaseException as fix_exc: ... raise -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18857] urlencode of a None value uses the string 'None'
Senthil Kumaran added the comment: Hi Joshua, I did not setup a php server to test the html form that you uploaded. We cannot test this in browsers because HTML does not have None as values, it is simple empty strings and that is correct. I think that the cost of making this change is higher than the value that it will give and I am inclined to close this bug report as wont fix. If you strongly disagree, please feel free to reopen it (and can possibly discuss at python-dev). Thank you! -- resolution: - wont fix stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19120] shlex.shlex.lineno reports a different number depending on the previous token
New submission from Daniel: See the example below (also attached). First example: The lineno reported just after word2 is pulled is 2. Second example: The lineno reported just after , is pulled is still 1. This behaviour seems inconsistent. The lineno should increment either when the last token of a line is pulled, or after the first token from the next line (in my opinion preferably the former). It should not have different bahaviour depending on what type of token that is (alpha vs. comma). I have repeated this on Also, does Issue 16121 relate to this? #!/usr/bin/env python import shlex first = shlex.shlex(word1 word2\nword3) print (first.get_token()) print (first.get_token()) print (line no, first.lineno) print () second = shlex.shlex(word1 word2,\nword3) print (second.get_token()) print (second.get_token()) print (second.get_token()) print (line no, second.lineno) # Output: # word1 # word2 # line no 2 # # word1 # word2 # , # line no 1 -- files: shlex_line.py messages: 198561 nosy: daniel-s priority: normal severity: normal status: open title: shlex.shlex.lineno reports a different number depending on the previous token type: behavior versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file31900/shlex_line.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19120 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19120] shlex.shlex.lineno reports a different number depending on the previous token
Daniel added the comment: From the unfinished sentence: I have repeated this on all versions of shlex on which I have tried. Including Python 2.6, 2.7, 3.2 and 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19120 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14365] argparse: subparsers, argument abbreviations and ambiguous option
Changes by paul j3 ajipa...@gmail.com: Removed file: http://bugs.python.org/file31888/subparser_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14365 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14365] argparse: subparsers, argument abbreviations and ambiguous option
paul j3 added the comment: This the argparse patch as described in the previous post, along with test_argparse tests. For now the tests handle both subparser required cases and not required ones ( http://bugs.python.org/issue9253 ). While error messages can differ based on this requirement, it does not affect the 'ambiguity' that underlies the current issue. -- Added file: http://bugs.python.org/file31901/subparser_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14365 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19110] PEP-0 history link is broken
Changes by Georg Brandl ge...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19110 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com