[issue6889] «Python’s default encoding is the ‘ascii’ encoding.»
New submission from flox : In the Python «Unicode HOWTO», we still read the statement: «For example, Python's default encoding is the 'ascii' encoding.» Here: http://svn.python.org/view/python/branches/py3k/Doc/howto/unicode.rst?revision=72294&view=markup -- assignee: georg.brandl components: Documentation messages: 92523 nosy: flox, georg.brandl severity: normal status: open title: «Python’s default encoding is the ‘ascii’ encoding.» versions: Python 3.0, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue6889> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6891] small typo in «unicode.rst»: « the Uniode APIs should be used» and broken URL
New submission from flox : Found 2 typos: - Uniode instead of Unicode - Acknowledgements instead of Acknowledgments And the following reference is broken (Jason Orendorff website): http://www.jorendorff.com/articles/unicode/ The last version is dated 2007 on the wayback machine: http://web.archive.org/web/*/www.jorendorff.com/articles/unicode/index.html Relevant file is: Doc/howto/unicode.rst -- assignee: georg.brandl components: Documentation messages: 92526 nosy: flox, georg.brandl severity: normal status: open title: small typo in «unicode.rst»: «the Uniode APIs should be used» and broken URL versions: Python 3.0, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue6891> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7376] FAIL: Doctest: __main__.DebugRunner
New submission from flox : Running on Debian Lenny, with Python 3.1. The Python 2.5 version is OK. ~ $ python3 --version Python 3.1.1+ ~ $ python3 -m doctest F.. == FAIL: Doctest: __main__.DebugRunner -- Traceback (most recent call last): File "/usr/lib/python3.1/doctest.py", line 2096, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for __main__.DebugRunner File "/usr/lib/python3.1/doctest.py", line 1644, in DebugRunner -- File "/usr/lib/python3.1/doctest.py", line 1712, in __main__.DebugRunner Failed example: runner.run(test) Expected: Traceback (most recent call last): ... doctest.UnexpectedException: Got: Traceback (most recent call last): File "/usr/lib/python3.1/doctest.py", line 1243, in __run compileflags, 1), test.globs) File "", line 1, in runner.run(test) File "/usr/lib/python3.1/doctest.py", line 1736, in run r = DocTestRunner.run(self, test, compileflags, out, False) File "/usr/lib/python3.1/doctest.py", line 1375, in run return self.__run(test, compileflags, out) File "/usr/lib/python3.1/doctest.py", line 1296, in __run exception) File "/usr/lib/python3.1/doctest.py", line 1742, in report_unexpected_exception raise UnexpectedException(test, example, exc_info) UnexpectedException: -- Ran 15 tests in 0.015s FAILED (failures=1) ~ $ -- components: Library (Lib), Tests messages: 95605 nosy: flox severity: normal status: open title: FAIL: Doctest: __main__.DebugRunner versions: Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7377] Slight difference: math.floor returns an Integral
New submission from flox : The last code snippet on section "25.2.3.2 How are Docstring Examples Recognized?" does not output the expected result. http://docs.python.org/dev/py3k/library/doctest.html#how-are-docstring-examples-recognized Documentation example: >>> assert "Easy!" >>> import math >>> math.floor(1.9) 1.0 Real life (Python 3.1): >>> math.floor(1.9) 1 -- assignee: georg.brandl components: Documentation messages: 95606 nosy: flox, georg.brandl severity: normal status: open title: Slight difference: math.floor returns an Integral versions: Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7377> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7379] Docstring for fractions.Fraction.limit_denominator fails
New submission from flox : Yes, you can reduce the fraction 1234/5678. Bad Luck :p ~ $ python3 -m doctest /usr/lib/python3.1/fractions.py ** File "/usr/lib/python3.1/fractions.py", line 165, in fractions.Fraction.limit_denominator Failed example: Fraction(1234, 5678).limit_denominator(1) Expected: Fraction(1234, 5678) Got: Fraction(617, 2839) ** 1 items had failures: 1 of 3 in fractions.Fraction.limit_denominator ***Test Failed*** 1 failures. ~ $ -- components: Library (Lib), Tests messages: 95620 nosy: flox severity: normal status: open title: Docstring for fractions.Fraction.limit_denominator fails versions: Python 3.0, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7379> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes
New submission from flox : I've tried some experiments with module uuid, and I meet some inconsistencies between the documentation, the docstring and the real behavior of the module. An interactive session is worth a thousand words: >>> import uuid >>> uuid.UUID(bytes='\x12\x34\x56\x78'*4) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.1/uuid.py", line 149, in __init__ assert isinstance(bytes, bytes_), repr(bytes) AssertionError: '\x124Vx\x124Vx\x124Vx\x124Vx' >>> uuid.UUID(bytes_le='\x78\x56\x34\x12\x34\x12\x78\x56' + ...'\x12\x34\x56\x78\x12\x34\x56\x78') Traceback (most recent call last): File "", line 2, in File "/usr/lib/python3.1/uuid.py", line 144, in __init__ bytes_(reversed(bytes_le[6:8])) + TypeError: 'str' object cannot be interpreted as an integer >>> Ok, the lines above are just parts of the documentation which need update. But what is more confusing is the last example of the documentation. http://docs.python.org/dev/py3k/library/uuid.html Here is the interactive session: >>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}') >>> x.bytes bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f') >>> x.bytes_le b'\x03\x02\x01\x00\x05\x04\x07\x06\x08\t\n\x0b\x0c\r\x0e\x0f' >>> Normally both attributes should get a "UUID as a 16-byte string", according to the documentation. Only the endianness should do the difference. I guess this one need a patch. Finally, the docstring fails, too: ~ $ python3 -m doctest /usr/lib/python3.1/uuid.py ** File "/usr/lib/python3.1/uuid.py", line 16, in uuid Failed example: uuid.uuid1() Expected: UUID('a8098c1a-f86e-11da-bd1a-00112444be1e') Got: UUID('e4bc8a38-d829-11de-9eee-0024e8bc58f0') ** File "/usr/lib/python3.1/uuid.py", line 24, in uuid Failed example: uuid.uuid4() Expected: UUID('16fd2706-8baf-433b-82eb-8c7fada847da') Got: UUID('71588cf5-7a51-4d59-ad76-05fb6b932673') ** File "/usr/lib/python3.1/uuid.py", line 39, in uuid Failed example: x.bytes Expected: b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' Got: bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f') ** File "/usr/lib/python3.1/uuid.py", line 43, in uuid Failed example: uuid.UUID(bytes=x.bytes) Exception raised: Traceback (most recent call last): File "/usr/lib/python3.1/doctest.py", line 1243, in __run compileflags, 1), test.globs) File "", line 1, in uuid.UUID(bytes=x.bytes) File "/usr/lib/python3.1/uuid.py", line 149, in __init__ assert isinstance(bytes, bytes_), repr(bytes) AssertionError: bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f') ** 1 items had failures: 4 of 9 in uuid ***Test Failed*** 4 failures. ~ $ -- components: Library (Lib) messages: 95622 nosy: flox severity: normal status: open title: uuid.UUID.bytes gives a bytearray() instead of bytes versions: Python 3.0, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes
flox added the comment: Attached patch gives coherence: * both UUID.bytes and UUID.bytes_le return a "bytes" object * the random tests are explicitly skipped Then the documentation needs fixing, too. -- keywords: +patch Added file: http://bugs.python.org/file15385/issue7380_uuid.diff ___ Python tracker <http://bugs.python.org/issue7380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"
New submission from flox : I've tested the docstring of the module subprocess. Python 2.5 is OK, but Python 3.1 fails. ~ $ python2.5 -m doctest /usr/lib/python2.5/subprocess.py ... -- Ran 15 tests in 0.012s OK ~ $ python3 -m doctest /usr/lib/python3.1/subprocess.py Traceback (most recent call last): File "/usr/lib/python3.1/runpy.py", line 128, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python3.1/runpy.py", line 34, in _run_code exec(code, run_globals) File "/usr/lib/python3.1/doctest.py", line 2637, in sys.exit(_test()) File "/usr/lib/python3.1/doctest.py", line 2626, in _test failures, _ = testmod(m) File "/usr/lib/python3.1/doctest.py", line 1847, in testmod for test in finder.find(m, name, globs=globs, extraglobs=extraglobs): File "/usr/lib/python3.1/doctest.py", line 854, in find self._find(tests, obj, name, module, source_lines, globs, {}) File "/usr/lib/python3.1/doctest.py", line 908, in _find globs, seen) File "/usr/lib/python3.1/doctest.py", line 896, in _find test = self._get_test(obj, name, module, globs, source_lines) File "/usr/lib/python3.1/doctest.py", line 980, in _get_test filename, lineno) File "/usr/lib/python3.1/doctest.py", line 590, in get_doctest return DocTest(self.get_examples(string, name), globs, File "/usr/lib/python3.1/doctest.py", line 604, in get_examples return [x for x in self.parse(string, name) File "/usr/lib/python3.1/doctest.py", line 566, in parse self._parse_example(m, name, lineno) File "/usr/lib/python3.1/doctest.py", line 636, in _parse_example lineno + len(source_lines)) File "/usr/lib/python3.1/doctest.py", line 722, in _check_prefix (lineno+i+1, name, line)) ValueError: line 11 of the docstring for subprocess.check_output has inconsistent leading whitespace: "'" -- components: Library (Lib), Tests messages: 95625 nosy: flox severity: normal status: open title: subprocess.check_output: "docstring has inconsistent leading whitespace" versions: Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"
flox added the comment: I fixed the docstring inconsistency (see patch) and some obvious things. But I still have errors. ~ $ python3 -m doctest py3_failed/subprocess.py ** File "py3_failed/subprocess.py", line 139, in subprocess Failed example: subprocess.getstatusoutput('/bin/junk') Expected: (256, 'sh: /bin/junk: not found') Got: (32512, '/bin/sh: /bin/junk: No such file or directory') ** File "py3_failed/subprocess.py", line 449, in subprocess.check_output Failed example: check_output(["ls", "-l", "/dev/null"]) Expected: b'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n' Got: b'crw-rw-rw- 1 root root 1, 3 Nov 15 17:41 /dev/null\n' ** File "py3_failed/subprocess.py", line 455, in subprocess.check_output Failed example: check_output(["/bin/sh", "-c", "ls -l non_existent_file ; exit 0"], stderr=STDOUT) Expected: b'ls: non_existent_file: No such file or directory\n' Got: b'ls: cannot access non_existent_file: No such file or directory\n' ** File "py3_failed/subprocess.py", line 559, in subprocess.getstatusoutput Failed example: subprocess.getstatusoutput('/bin/junk') Expected: (256, 'sh: /bin/junk: not found') Got: (32512, '/bin/sh: /bin/junk: No such file or directory') ** 3 items had failures: 1 of 6 in subprocess 2 of 2 in subprocess.check_output 1 of 4 in subprocess.getstatusoutput ***Test Failed*** 4 failures. ~ $ -- keywords: +patch Added file: http://bugs.python.org/file15386/issue7381_first.diff ___ Python tracker <http://bugs.python.org/issue7381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"
flox added the comment: It may be fixed with "# doctest: +ELLIPSIS" and "# doctest: +SKIP" directives... But it is probably platform-dependent. I have tested only with Debian Lenny. -- ___ Python tracker <http://bugs.python.org/issue7381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7376] "python -m doctest" results in FAIL: Doctest: __main__.DebugRunner
flox added the comment: I am ok with the proposal of removing the current "selftest" default behavior. And thank you for the tip. I tried the command "python -m doctest Lib/*.py" and I found interesting things: * #7379 about Lib/fractions.py * #7380 about Lib/uuid.py * #7381 about Lib/subprocess.py ;) -- ___ Python tracker <http://bugs.python.org/issue7376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"
flox added the comment: Forget the "python2.5 -m doctest /usr/lib/python2.5/subprocess.py" in first message msg95625. This command does not do what I guessed. And there's no doctest in the Python2.5 "subprocess" module. The attached patch may be enough to fix the docstring inconsistencies with Python3.1. It might not be mandatory to make the docstring 100% successful. (I see no PEP which requires that). -- ___ Python tracker <http://bugs.python.org/issue7381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes
flox added the comment: Patch with documentation included. (branches/py3k) -- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl Added file: http://bugs.python.org/file15388/issue7380.diff ___ Python tracker <http://bugs.python.org/issue7380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes
Changes by flox : Removed file: http://bugs.python.org/file15385/issue7380_uuid.diff ___ Python tracker <http://bugs.python.org/issue7380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7376] "python -m doctest" results in FAIL: Doctest: __main__.DebugRunner
flox added the comment: Patch proposed. -- Added file: http://bugs.python.org/file15391/issue7376_usage.diff ___ Python tracker <http://bugs.python.org/issue7376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7376] "python -m doctest" results in FAIL: Doctest: __main__.DebugRunner
Changes by flox : Removed file: http://bugs.python.org/file15391/issue7376_usage.diff ___ Python tracker <http://bugs.python.org/issue7376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7376] "python -m doctest" results in FAIL: Doctest: __main__.DebugRunner
Changes by flox : Added file: http://bugs.python.org/file15392/issue7376_usage.diff ___ Python tracker <http://bugs.python.org/issue7376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7376] "python -m doctest" results in FAIL: Doctest: __main__.DebugRunner
flox added the comment: Patch could be applied to Python 2.6 and trunk too. -- versions: +Python 2.6, Python 2.7 ___ Python tracker <http://bugs.python.org/issue7376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7390] inconsistent type return
flox added the comment: The relevant documentation for Python 2.6 is there. http://docs.python.org/reference/datamodel.html#new-style-and-classic-classes The PEP 3115 is implemented for Python >= 3.0. There's nothing wrong. -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue7390> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
flox added the comment: I would think to use weak references in order to prevent such leaks. With the patch attached, if the handler is not referenced anywhere, it is closed. However named handlers are not closed (because of hard reference in _handlers dictionary). -- nosy: +flox Added file: http://bugs.python.org/file15395/issue6615_weakref.diff ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
Changes by flox : Removed file: http://bugs.python.org/file15395/issue6615_weakref.diff ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
flox added the comment: yep... patch was not clean. Sorry :( I changed it. It passes the 21 tests of the test_logging suite. And the count of references decreases with the test: >>> import logging >>> handler = logging.Handler() >>> handler = logging.Handler() -- Added file: http://bugs.python.org/file15396/issue6615_weakref.diff ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
flox added the comment: Updated the patch with technical recommendations from Antoine. I kept the _handlerList as a list because "It allows handlers to be removed in reverse of order initialized." And some tests are needed to outline the change. -- Added file: http://bugs.python.org/file15397/issue6615_weakref.diff ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
Changes by flox : Removed file: http://bugs.python.org/file15396/issue6615_weakref.diff ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
flox added the comment: Small change to acquire the module lock before working on _handlerList. -- Added file: http://bugs.python.org/file15398/issue6615_weakref.diff ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
Changes by flox : Removed file: http://bugs.python.org/file15397/issue6615_weakref.diff ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
flox added the comment: Thank you Vinay. Since you "reversed()" the _handlerList, the following part need to be changed: Index: Lib/logging/__init__.py === --- Lib/logging/__init__.py (revision 76508) +++ Lib/logging/__init__.py (working copy) @@ -610,7 +610,7 @@ """ _acquireLock() try: -_handlerList.insert(0, weakref.ref(handler, _removeHandlerRef)) +_handlerList.append(weakref.ref(handler, _removeHandlerRef)) finally: _releaseLock() -- versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue6615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4097] Traceback doesn't run back all the way
flox added the comment: It looks similar to issue7378, but the latter has more details. Close as duplicate? -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue4097> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4158] compilation of sqlite3 fails
flox added the comment: Please close as invalid. -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue4158> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4158] compilation of sqlite3 fails
Changes by flox : -- nosy: -flox ___ Python tracker <http://bugs.python.org/issue4158> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4380] Deepcopy of functools.partial gives wierd exception
flox added the comment: This issue is somewhat related to the same issue with pickle. See issue1398 for the explanation. -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue4380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7392] cPickle test failure on release26-maint branch
flox added the comment: I experienced same failure (trunk is OK). It seems that r70531 needs backporting. -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue7392> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3599] test_pydoc after test_urllib2 causes exception in Popen.__del__
flox added the comment: Tested on debian with r76600 (/branches/release26-maint No error. ~/dev/python/release26-maint $ ./python Lib/test/regrtest.py -uall test_urllib2 test_pydoc test_urllib2 test_pydoc All 2 tests OK. ~/dev/python/release26-maint $ Is it specific to Windows? -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue3599> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text
flox added the comment: Proposed patch following suggestion of And Clover. Compliant with documentation: «Files are always opened in binary mode, even if no binary mode was specified. This is done to avoid data loss due to encodings using 8-bit values. This means that no automatic conversion of '\n' is done on reading and writing.» -- keywords: +patch nosy: +flox Added file: http://bugs.python.org/file15422/issue691291.diff ___ Python tracker <http://bugs.python.org/issue691291> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text
Changes by flox : Added file: http://bugs.python.org/file15423/issue691291_py3k.diff ___ Python tracker <http://bugs.python.org/issue691291> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes
Changes by flox : Added file: http://bugs.python.org/file15426/issue7380_py3k.diff ___ Python tracker <http://bugs.python.org/issue7380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes
Changes by flox : Removed file: http://bugs.python.org/file15388/issue7380.diff ___ Python tracker <http://bugs.python.org/issue7380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
flox added the comment: Proposed docstring patch. -- keywords: +patch nosy: +flox versions: +Python 3.2 Added file: http://bugs.python.org/file15428/issue7417_py3k.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7418] hashlib : the names of the different hash algorithms
flox added the comment: I guess you missed the quotes. $ ./python foo.py Traceback (most recent call last): File "foo.py", line 2, in from hashlib import * TypeError: attribute name must be string, not 'tuple' -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue7418> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
flox added the comment: Indentation is not easy on this part. The list of arguments overflow the 79 chars limit. With the proposed patch, the generated output is something like: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True) -> file object Open file and return a stream. Raise IOError upon failure. ... Is it wrong? -- ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
flox added the comment: According to PEP257: «Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description.» Maybe this second patch is more conventional? -- Added file: http://bugs.python.org/file15434/issue7417_py3k_pep257.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text
Changes by flox : Added file: http://bugs.python.org/file15435/issue691291.diff ___ Python tracker <http://bugs.python.org/issue691291> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text
Changes by flox : Removed file: http://bugs.python.org/file15422/issue691291.diff ___ Python tracker <http://bugs.python.org/issue691291> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
Changes by flox : Removed file: http://bugs.python.org/file15434/issue7417_py3k_pep257.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
Changes by flox : Removed file: http://bugs.python.org/file15428/issue7417_py3k.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
flox added the comment: Actually the docstring of _pyio.open Python function should not change. The patch is smaller. -- Added file: http://bugs.python.org/file15436/issue7417_py3k.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
flox added the comment: Ulrik, I agree that most builtins have the signature on first lines. I will not apply this part of the PEP257. But it seems that the "[...]" syntax is not enforced for all builtins. See "help(print)", "help(sorted)" and "help(__import__)" examples: >>> print(print.__doc__) print(value, ..., sep=' ', end='\n', file=sys.stdout) Prints the values to a stream, or to sys.stdout by default. Optional keyword arguments: file: a file-like object (stream); defaults to the current sys.stdout. sep: string inserted between values, default a space. end: string appended after the last value, default a newline. >>> print(sorted.__doc__) sorted(iterable, key=None, reverse=False) --> new sorted list >>> print(__import__.__doc__) __import__(name, globals={}, locals={}, fromlist=[], level=-1) -> module Import a module. The globals are only used to determine the context; they are not modified... Patch is updated. -- Added file: http://bugs.python.org/file15439/issue7417_py3k.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
Changes by flox : Removed file: http://bugs.python.org/file15436/issue7417_py3k.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
flox added the comment: Or I suggest something more verbose... >>> print(open.__doc__) open(filename) -> file object for reading in text mode open(filename, mode=binary[, buffering]) -> file object in binary mode open(filename[, mode=text][, buffering][,encoding][,errors][,newline]) -> file object in text mode open(file_descriptor[, ...][, closefd]) -> file object Open file and return a stream. Raise IOError upon failure. filename is either a text or byte string giving the name (and the path if the file isn't in the current working directory) of the file to be opened. file_descriptor is an integer file descriptor of the file to be wrapped. The file descriptor is closed when the returned I/O object is closed, unless closefd is set to False.) mode is an optional string that specifies the mode in which the file is opened... -- ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
flox added the comment: (patch attached: explicit signature) I vote +1 for something more explicit. « Explicit is better than implicit. » >>> help(open) Help on built-in function open in module io: open(...) open(file_name_or_path) -> file object for reading in text mode open(file_name_or_path, mode=binary_mode[, buffering]) -> file objec open(file_name_or_path[, mode=text_mode[, buffering[, encoding [, errors[, newline]) -> file object open(file_descriptor[, ...[, closefd]]) -> file object Open file and return a stream. Raise IOError upon failure. file_name_or_path is either a text or byte string giving the name (and the path if the file isn't in the current working directory) of the file to be opened. file_descriptor is an integer file descriptor of the file to be wrapped. The file descriptor is closed when the returned I/O object is closed, unless closefd is set to False.) mode is an optional string that specifies the mode in which the file is opened... -- Added file: http://bugs.python.org/file15441/issue7417_py3k_explicit.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
Changes by flox : Added file: http://bugs.python.org/file15442/issue7417_py3k_explicit.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7417] open builtin has no signature in docstring
Changes by flox : Removed file: http://bugs.python.org/file15441/issue7417_py3k_explicit.diff ___ Python tracker <http://bugs.python.org/issue7417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"
Changes by flox : Removed file: http://bugs.python.org/file15386/issue7381_first.diff ___ Python tracker <http://bugs.python.org/issue7381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"
flox added the comment: Patch against the trunk, and against the Py3k branch. It fixes: * docstring and documentation formatting * and examples -- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 2.6, Python 2.7 Added file: http://bugs.python.org/file15446/issue7381.diff ___ Python tracker <http://bugs.python.org/issue7381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"
Changes by flox : Added file: http://bugs.python.org/file15447/issue7381_py3k.diff ___ Python tracker <http://bugs.python.org/issue7381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1398] Can't pickle partial functions
flox added the comment: It seems fixed on trunk. It is fixed on Python 3.1 and 3.2, too. With Python 2.6 I see the error: >>> ./python partial_bug.py TypeError: can't pickle partial objects Documentation for "trunk" and "py3k" is OK? -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue1398> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4380] Deepcopy of functools.partial gives wierd exception
flox added the comment: Already fixed on Python trunk (2.7). Fixed on branches 3.1 and 3.2, too. -- ___ Python tracker <http://bugs.python.org/issue4380> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7431] UnboundLocalError during test.test_linecache.LineCacheTests
flox added the comment: Actually it should use the TESTFN filename which is always writable. Patch attached. -- keywords: +patch nosy: +flox Added file: http://bugs.python.org/file15448/issue7431.diff ___ Python tracker <http://bugs.python.org/issue7431> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7431] UnboundLocalError during test.test_linecache.LineCacheTests
Changes by flox : -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue7431> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7435] Int/Long: some tests are duplicate and error messages refer to "long"
New submission from flox : In python 3.x there's a single type for integer: int. The automatic conversion of the test suite has created many tests which are duplicate of each other. The attached patch removes duplication of tests, and fix the strings for these modules: Lib/random.py Lib/test/mapping_tests.py Lib/test/pickletester.py Lib/test/string_tests.py Lib/test/test_binop.py Lib/test/test_builtin.py Lib/test/test_datetime.py Lib/test/test_decimal.py Lib/test/test_descr.py Lib/test/test_dict.py Lib/test/test_getargs2.py Lib/test/test_int.py Lib/test/test_long.py Lib/test/test_types.py -- components: Tests messages: 95971 nosy: flox severity: normal status: open title: Int/Long: some tests are duplicate and error messages refer to "long" versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue7435> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7435] Int/Long: some tests are duplicate and error messages refer to "long"
Changes by flox : -- keywords: +patch Added file: http://bugs.python.org/file15449/issue7435_py3k.diff ___ Python tracker <http://bugs.python.org/issue7435> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7441] Py3.1: Fatal Python Error: Py_Initialize...unknown encoding: chcp 65001.
flox added the comment: there's a patch proposed to add cp65001 alias: issue6058 -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue7441> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6058] Add cp65001 to encodings/aliases.py
Changes by flox : -- versions: +Python 2.6, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue6058> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
Changes by flox : -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
flox added the comment: There's many differences between both implementations. I don't know if we can live with them or not. ~ $ ./python Python 3.1.1+ (release31-maint:76650, Dec 3 2009, 17:14:50) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree import ElementTree as ET, cElementTree as cET >>> from io import StringIO >>> SAMPLE = '' >>> IO_SAMPLE = StringIO(SAMPLE) With ElementTree >>> elt = ET.XML(SAMPLE) >>> elt.getiterator() [] >>> elt.findall('') # or '.' [] >>> elt.findall('./') [] >>> elt.items() dict_items([]) >>> elt.keys() dict_keys([]) >>> elt[:] [] >>> IO_SAMPLE.seek(0) >>> next(ET.iterparse(IO_SAMPLE)) ('end', ) >>> IO_SAMPLE.seek(0) >>> list(ET.iterparse(IO_SAMPLE)) [('end', )] With cElementTree >>> elt_c = cET.XML(SAMPLE) >>> elt_c.getiterator() >>> elt_c.findall('') [] >>> elt_c.findall('./') [] >>> elt_c.items() [] >>> elt_c.keys() [] >>> elt_c[:] Traceback (most recent call last): TypeError: sequence index must be integer, not 'slice' >>> IO_SAMPLE.seek(0) >>> next(cET.iterparse(IO_SAMPLE)) Traceback (most recent call last): TypeError: iterparse object is not an iterator >>> IO_SAMPLE.seek(0) >>> list(cET.iterparse(IO_SAMPLE)) [(b'end', )] -- ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
flox added the comment: Proposed patch fixes most of the discrepancies between both implementations. It restores some features that were lost with Python 3: * cElement slicing and extended slicing * iterparse, cET.getiterator and cET.findall return an iterator (as documented) Some tests were added to check these issues. -- keywords: +patch Added file: http://bugs.python.org/file15461/issue6472.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
Changes by flox : Added file: http://bugs.python.org/file15462/issue6472_py3k.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
flox added the comment: I fixed it differently, using the upstream modules (Thank you Fredrik). * ElementTree 1.3a3-20070912 * cElementTree 1.0.6-20090110 It works. And it closes issue1143, too. -- Added file: http://bugs.python.org/file15468/issue6472_upstream.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
Changes by flox : -- versions: -Python 3.0 Added file: http://bugs.python.org/file15469/issue6472_upstream_py3k.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
Changes by flox : Removed file: http://bugs.python.org/file15462/issue6472_py3k.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
Changes by flox : Removed file: http://bugs.python.org/file15461/issue6472.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1143] Update to latest ElementTree in Python 2.7
flox added the comment: Patch proposed with latest versions: * ElementTree 1.3a3-20070912 * cElementTree 1.0.6-20090110 Attached to issue6472. -- keywords: +patch nosy: +flox Added file: http://bugs.python.org/file15470/issue1143_ET13_cET106.diff ___ Python tracker <http://bugs.python.org/issue1143> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1143] Update to latest ElementTree in Python 2.7
Changes by flox : Removed file: http://bugs.python.org/file15470/issue1143_ET13_cET106.diff ___ Python tracker <http://bugs.python.org/issue1143> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
flox added the comment: I see some new features in the changelog. I will try to update the documentation during the week. (patch "py3k" fixed: support assignment of arbitrary sequences) -- Added file: http://bugs.python.org/file15471/issue6472_upstream_py3k.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
Changes by flox : Removed file: http://bugs.python.org/file15469/issue6472_upstream_py3k.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
flox added the comment: test_textwrap seems OK with r76697 I still have leaks on test_pipes and test_urllib: ~ $ ./python Lib/test/regrtest.py -R : test_textwrap \ test_pipes test_urllib test_pipes leaked [0, -26, 0, 26] references, sum=0 test_pipes leaked [0, -26, 26, -26] references, sum=-26 test_pipes leaked [-26, 26, 0, 0] references, sum=0 test_pipes leaked [26, -26, 26, 0] references, sum=26 test_urllib leaked [0, 2, 0, 0] references, sum=2 test_urllib leaked [4, 6, 0, 2] references, sum=12 test_urllib leaked [2, 4, 2, 0] references, sum=8 test_urllib leaked [6, 6, 2, 0] references, sum=14 -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
Changes by flox : Added file: http://bugs.python.org/file15479/issue5596_urllib_py3k.diff ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
Changes by flox : Added file: http://bugs.python.org/file15480/issue5596_pipes_py3k.diff ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
flox added the comment: Patch for the test refleaks: * test_pipes * test_urllib -- ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
flox added the comment: And the test_urllib may leak on 2.7, too. Patch attached. -- Added file: http://bugs.python.org/file15482/issue5596_urllib.diff ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
Changes by flox : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
flox added the comment: Another false-positive in test_zipimport_support. Both on 2.7 and 3.2. Patch attached. -- Added file: http://bugs.python.org/file15485/issue5596_zipimport_support.diff ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5596] memory leaks in py3k
Changes by flox : Added file: http://bugs.python.org/file15486/issue5596_zipimport_support_py3k.diff ___ Python tracker <http://bugs.python.org/issue5596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7458] crash in str.find() and str.rfind() with invalid start value
flox added the comment: This bug does not occur on Debian 64 bits. ~ $ uname -srvm Linux 2.6.30-bpo.1-amd64 #1 SMP Mon Aug 17 08:42:50 UTC 2009 x86_64 Tested with variants: from random import getrandbits self.checkequal(-1, 'ab', 'find', 'xxx', getrandbits(64), 0) self.checkequal(-1, 'ab', 'find', 'xxx', getrandbits(96), 0) self.checkequal(-1, 'ab', 'rfind', 'xxx', getrandbits(64), 0) self.checkequal(-1, 'ab', 'rfind', 'xxx', getrandbits(96), 0) -- nosy: +flox ___ Python tracker <http://bugs.python.org/issue7458> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7458] crash in str.find() and str.rfind() with invalid start value
flox added the comment: I got it to crash (2.7): ~ $ ./python Lib/test/regrtest.py string_tests test_unicode test_str test_unicode test test_unicode failed -- Traceback (most recent call last): AssertionError: -1 != -8276732 test_str test test_str failed -- Traceback (most recent call last): AssertionError: -1 != -255833 2 tests failed: test_unicode test_str [56425 refs] ~ $ Thank you haypo :) -- versions: +Python 2.6, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7458> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7458] crash in str.find() and str.rfind() with invalid start value
flox added the comment: I reviewed the patch, and it seems partially redundant. Actually the "find" method was not broken. There is already a test "if (str_len < 0) return -1;" for this one. See attached patch. -- Added file: http://bugs.python.org/file15501/issue7458_rfind.diff ___ Python tracker <http://bugs.python.org/issue7458> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7462] Implement fastsearch algorithm for rfind/rindex
New submission from flox : While looking at issue7458 I stopped on: /* XXX - create reversefastsearch helper! */ Here is the patch which is just the translation of the same algorithm already implemented for "find/index". http://effbot.org/zone/stringlib.htm Note: it supersedes patch for 7458. -- components: Interpreter Core files: fastsearch_rfind.patch keywords: patch messages: 96157 nosy: flox severity: normal status: open title: Implement fastsearch algorithm for rfind/rindex type: performance versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file15505/fastsearch_rfind.patch ___ Python tracker <http://bugs.python.org/issue7462> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7462] Implement fastsearch algorithm for rfind/rindex
flox added the comment: (removed comment which should not be copied) -- Added file: http://bugs.python.org/file15507/fastsearch_rfind.patch ___ Python tracker <http://bugs.python.org/issue7462> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7462] Implement fastsearch algorithm for rfind/rindex
Changes by flox : Removed file: http://bugs.python.org/file15505/fastsearch_rfind.patch ___ Python tracker <http://bugs.python.org/issue7462> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules
flox added the comment: Patch for the documentation. (source: upstream documentation) -- Added file: http://bugs.python.org/file15513/issue6472_upstream_docs.diff ___ Python tracker <http://bugs.python.org/issue6472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7466] Segmentation fault after about 20 seconds on lenovo T500
flox added the comment: Yes, confirmed too. Both 3.1 and 3.2 are broken. Minimal sequence to trigger the bug: """ ~ $ ./python Python 3.2a0 (py3k:76743M, Dec 10 2009, 12:19:41) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. """ def m(i): if i == 10: return next(i for i in '0') MAX_LOOP = 1<<10 t = range(11) for i in range(MAX_LOOP): d = map(m, t) tup = tuple(d) ## python: Objects/tupleobject.c:853: _PyTuple_Resize: ## Assertion `g->gc.gc_refs != (-2)' failed. -- components: +Interpreter Core nosy: +flox versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue7466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7466] Segmentation fault after about 20 seconds on lenovo T500
flox added the comment: Fix is coming soon... ## Sample code: import gc tuple(gc.collect() for i in range(11)) ## python: Objects/tupleobject.c:853: _PyTuple_Resize: ## Assertion `g->gc.gc_refs != (-2)' failed. And Trunk is affected -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue7466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7466] Segmentation fault after about 20 seconds on lenovo T500
flox added the comment: Well... here comes the patch. -- keywords: +patch Added file: http://bugs.python.org/file15520/issue7466.diff ___ Python tracker <http://bugs.python.org/issue7466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7466] Segmentation fault after about 20 seconds on lenovo T500
Changes by flox : Removed file: http://bugs.python.org/file15520/issue7466.diff ___ Python tracker <http://bugs.python.org/issue7466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7466] Segmentation fault after about 20 seconds on lenovo T500
Changes by flox : Added file: http://bugs.python.org/file15521/issue7466.diff ___ Python tracker <http://bugs.python.org/issue7466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] codecs missing: base64 bz2 hex zlib ...
New submission from flox : AFAIK these codecs were not ported to Python 3. 1. I found no hint in documentation on this matter. 2. Is it possible to contribute some of them, or there's a good reason to look elsewhere? -- components: Library (Lib) messages: 96218 nosy: flox severity: normal status: open title: codecs missing: base64 bz2 hex zlib ... versions: Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7475> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...
flox added the comment: «Everything you thought you knew about binary data and Unicode has changed.» Reopening for the documentation part. This "mistake" deserves some words in the documentation: docs.python.org/dev/py3k/whatsnew/3.0.html #text-vs-data-instead-of-unicode-vs-8-bit And the conversion may be automated with 2to3, maybe. -- assignee: -> georg.brandl components: +2to3 (2.x to 3.0 conversion tool), Documentation -Library (Lib) nosy: +georg.brandl status: closed -> open title: codecs missing: base64 bz2 hex zlib ... -> No hint about codecs removed : base64 bz2 hex zlib ... ___ Python tracker <http://bugs.python.org/issue7475> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...
flox added the comment: Is it possible to add "DeprecationWarning" for these codecs when using "python -3" ? >>> {}.has_key('a') __main__:1: DeprecationWarning: dict.has_key() not supported in 3.x; use the in operator False >>> print `123` :1: SyntaxWarning: backquote not supported in 3.x; use repr() 123 >>> 'abc'.encode('base64') 'YWJj\n' -- ___ Python tracker <http://bugs.python.org/issue7475> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...
Changes by flox : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue7475> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] No hint about codecs removed: base64 bz2 hex zlib ...
Changes by flox : -- title: No hint about codecs removed : base64 bz2 hex zlib ... -> No hint about codecs removed: base64 bz2 hex zlib ... ___ Python tracker <http://bugs.python.org/issue7475> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com