[issue4804] Python on Windows disables all C runtime library assertions
Martin v. Löwis mar...@v.loewis.de added the comment: The revised patch looks fine to me, please apply. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5200] unicode.normalize gives wrong result for some characters
New submission from Peter Landgren peter.tal...@telia.com: If any of the Swedish characters åäöÅÄÖ are input to unicode.normalize(form, ustr) with form = NFD or NFKD the result will be aaoAAO. åäöÅÄÖ are normal character and should be the same after normalize. They are not connected to aaoAAO other than for historic reasons, but not in modern languages. It's a common misinterpretation that the dots and circle above them are diacritic signs, but those letters should behave as the (Danish) Ø which is normalized correctly. From Wikipedia: Å is often perceived as an A with a ring, interpreting the ring as a diacritical mark. However, in the languages that use it, the ring is not considered a diacritic but part of the letter. The letter Ö in the Swedish and Icelandic alphabets historically arises from the Germanic umlaut, but it is considered a separate letter from O. See http://en.wikipedia.org/wiki/%C3%85 I think this is pobably impossible to solve as it will be mixed up with umlaut and you don't know what language the specific word is connected to. -- components: Library (Lib) messages: 81536 nosy: PeterL severity: normal status: open title: unicode.normalize gives wrong result for some characters type: behavior versions: Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1818] Add named tuple reader to CSV module
Jervis Whitley jervi...@gmail.com added the comment: Updated NamedTupleReader to give a rename=False keyword argument. rename is passed directly to the namedtuple factory function to enable automatic handling of invalid fieldnames. Two new tests for the rename keyword. Cheers, Added file: http://bugs.python.org/file13009/ntreader4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1818 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build
New submission from Floris Bruynooghe floris.bruynoo...@gmail.com: When specifying an RPATH with -rpath or -R you can use the special tokens `$LIB' and `$ORIGIN' which the runtime linker interprets as normal search path and relative to current sofile respectively. To get these correctly to the gcc command line you need to specify this in LDFLAGS as `\$$LIB' to work around escapes of both the makefile and shell, so in the Python Makefile this will appear somewhere as (this is on one line): CONFIG_ARGS= '--prefix=/opt/example.com/python25' 'LDFLAGS=-Wl,-rpath=\$$LIB:/opt/example.com/lib,--enable-new-dtags' This works for compiling the main python binary. But when the extension modules get compiled distutils chokes on this. distutils.sysconfig.parse_makefile() does think that any value of a variable that contains `$' in it refers to an other variable in the makefile. It will fail to find the value and CONFIG_ARGS will not be defined. This then fails in setup.py for the _ctypes extension: if not '--with-system-ffi' in sysconfig.get_config_var(CONFIG_ARGS): return Where `None' is returned instead of a list by .get_config_var(). It seems that distutils.sysconfig.parse_makefile() needs to understand more of the makefile synatax to deal with this. -- assignee: tarek components: Distutils messages: 81538 nosy: flub, tarek severity: normal status: open title: Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build type: compile error versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5201 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
New submission from David Jones d...@pobox.com: When using the wave module to output wave files, the output file cannot be a Unix pipeline. Example. The following program outputs a (trivial) wave file on stdout: #!/usr/bin/env python import sys import wave w = wave.open(sys.stdout, 'w') w.setnchannels(1) w.setsampwidth(1) w.setframerate(32000) w.setnframes(0) w.close() It can create a wave file like this: $ ./bugex foo.wav When used in a pipeline we get: $ ./bugex | wc Traceback (most recent call last): File ./bugex, line 9, in module w.close() File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/wave.py , line 437, in close self._ensure_header_written(0) File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/wave.py , line 458, in _ensure_header_written self._write_header(datasize) File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/wave.py , line 465, in _write_header self._form_length_pos = self._file.tell() IOError: [Errno 29] Illegal seek Exception exceptions.IOError: (29, 'Illegal seek') in bound method Wave_write.__del__ of wave.Wave_write instance at 0x71418 ignored 0 1 8 The wave module has almost all it needs to work around this problem. The wave module will only seek the output if it needs to patch the header. If you use setnframes to write the correct number of frames before writing them with writeframesraw then the header will not be patched upon calling close. However... The problem is that the tell method is invoked on the output stream (to record where the header is, in the event that we need to patch it); the tell method fails with an exception when the output is a pipeline (see example, above). Exceptions from tell when writing the header initially (in _write_header) should be ignored. If _patchheader is later invoked it will fail due to lack of pos. -- components: Library (Lib) messages: 81539 nosy: drj severity: normal status: open title: wave.py cannot write wave files into a shell pipeline type: behavior versions: Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5175] negative PyLong - C unsigned integral, TypeError or OverflowError?
Lisandro Dalcin dalc...@gmail.com added the comment: Mark, here you have a patch. I've only 'make test' on a 32bit Linux box Just two comments: - in docs: perhaps the 'versionchanged' stuff should be added. - in tests: I did not touch Modules/_testcapimodule.c, as it seems the test is covered. However, note that in all these tests, actual exception types are not checked) -- keywords: +patch Added file: http://bugs.python.org/file13010/negative-to-unsigned.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
David Jones d...@pobox.com added the comment: Attached is a patch which is a diff from this version of wave.py : http://svn.python.org/view/*checkout*/python/trunk/Lib/wave.py?rev=54394 -- keywords: +patch Added file: http://bugs.python.org/file13011/wave-20090210.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
Guilherme Polo ggp...@gmail.com added the comment: Wouldn't it be better if you only ignored the 'illegal seek' error instead of ignoring any ioerror (should it even be always discarded) ? I get a 'bad file descriptor' under Windows 7, but, again, can it be always discarded ? You can also reproduce the problem without using wave: import sys sys.stdout.tell() I'm really unsure about the proposed patch. -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3386] [PATCH] distutils.sysconfig.get_python_lib prefix argument broken
Tarek Ziadé ziade.ta...@gmail.com added the comment: Done in r69485. Thanks for the patch Phillip ! -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3386 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5203] ctypes segfaults when passing a unicode string to a function without argtypes
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: The following code segfaults on platforms where HAVE_USABLE_WCHAR_T is not defined (for example: narrow unicode build and sizeof(wchar_t)==4) from ctypes import * import ctypes.util CDLL(ctypes.util.find_library('c')).wcslen(u'text') (it works if the argtypes member is defined) The reason is a non initialized structure, and the correction is trivial: --- Modules/_ctypes/callproc.c~ 2007-06-15 19:10:41.0 +0200 +++ Modules/_ctypes/callproc.c 2009-02-10 13:28:10.0 +0100 @@ -538,6 +538,7 @@ int size = PyUnicode_GET_SIZE(obj); size += 1; /* terminating NUL */ size *= sizeof(wchar_t); + pa-ffi_type = ffi_type_pointer; pa-value.p = PyMem_Malloc(size); if (!pa-value.p) { PyErr_NoMemory(); -- assignee: theller components: ctypes messages: 81544 nosy: amaury.forgeotdarc, theller severity: normal status: open title: ctypes segfaults when passing a unicode string to a function without argtypes type: crash versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5203 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3729] SystemError on calling len() if __len__() doesn't return an int
Benjamin Peterson benja...@python.org added the comment: Fixed in #5137. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
David Jones d...@pobox.com added the comment: On 10 Feb 2009, at 12:28, Guilherme Polo wrote: Guilherme Polo ggp...@gmail.com added the comment: Wouldn't it be better if you only ignored the 'illegal seek' error instead of ignoring any ioerror (should it even be always discarded) ? No. I get a 'bad file descriptor' under Windows 7, but, again, can it be always discarded ? Yes. To expand: Observe that the exception is raised when we are writing the header for the first time. The exception is not raised when we attempt to seek to patch the header, it is raised when we recording the file position so that we can seek to it later. We record the file position even though we might not use it later (the file position is only needed if we need to patch the header). So if we don't need to patch the header, we do not need the file position. So we can clearly ignore any error in attempting to get the file position. If we do need to patch the header, then we need the file position. If we do not have the file position (because the earlier attempt to get it failed), then patching the header will fail when it attempts a seek. This seems reasonable to me. You can also reproduce the problem without using wave: import sys sys.stdout.tell() That does not reproduce the problem. The problem is not that tell raises an exception, the problem is that tell raises an exception and it is only being used to get some information that may be not needed later. Therefore the exception should be ignored, and a problem should only be raised if it turns out that we did need for information that we couldn't get. I'm really unsure about the proposed patch. Noted. I also note that my patch can be improved by removing its last 11 lines. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
David Jones d...@pobox.com added the comment: On 10 Feb 2009, at 12:28, Guilherme Polo wrote: Guilherme Polo ggp...@gmail.com added the comment: I'm really unsure about the proposed patch. Perhaps my example was too trivial. The point is that if you call setnframes then you can get wave.py to avoid patching the header; so it does not need to seek on the output file. However, that _still_ doesn't let you pipe the output, because of the tell problem. That's what the patch is for. Here is a (slightly) less trivial example: #!/usr/bin/env python import sys import wave w = wave.open(sys.stdout, 'w') w.setnchannels(1) w.setsampwidth(1) w.setframerate(2000) w.setnframes(100) for _ in range(50): w.writeframesraw('\x00\xff') w.close() (The wave file that it outputs is 100ms of 1000 Hz sine wave by the way) Note the call to setnframes _before_ the data is written. That's what means the header does not need to be patched. With my patch applied the output of this program can be fed to a pipe. If you remove the call to setnframes then the header will need to be patched, and this still (correctly, usefully) raises an error with my patch applied. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5134] Compiler warnings in sqlite module
Martin v. Löwis mar...@v.loewis.de added the comment: Fixed in r69489, r69490, r69491, r69492, r69493. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4804] Python on Windows disables all C runtime library assertions
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Committed r69495 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5175] negative PyLong - C unsigned integral, TypeError or OverflowError?
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the patch! I agree that the 'versionchanged' reference should be added in the docs. I also think that the test should be updated to check the exception type. Here's a modified version of your patch that adds a test for OverflowError to the capi tests, adds 'versionchanged', and rewords the docs slightly. I also took the liberty of rewording the docs for PyLong_AsLongLong, to match. I've tested this on a 64-bit linux machine, and checked that the docs build properly. I'll test on 32-bit and 64-bit OS X later today. Lisandro, does this updated patch work for you? Added file: http://bugs.python.org/file13012/negative-to-unsigned2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5204] test.os/TestInvalidFD/test_fdopen on VC6
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: This comes from issue4804. This simple patch is required to pass test_fdopen on VC6. -- components: Windows files: test_fdopen_on_vc6.patch keywords: patch messages: 81551 nosy: ocean-city severity: normal stage: commit review status: open title: test.os/TestInvalidFD/test_fdopen on VC6 versions: Python 2.7 Added file: http://bugs.python.org/file13013/test_fdopen_on_vc6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4804] Python on Windows disables all C runtime library assertions
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I opened new issue related to VC6 as issue5204. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
David Jones d...@pobox.com added the comment: On 10 Feb 2009, at 13:02, David Jones wrote: I also note that my patch can be improved by removing its last 11 lines. Er, no it can't. What was I thinking? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5175] negative PyLong - C unsigned integral, TypeError or OverflowError?
Lisandro Dalcin dalc...@gmail.com added the comment: It worked for me. BTW, 'make test' did not noticed the change in Modules/testcapi_long.h, which is #include'd by Modules/_testcapimodule.c. I've attached a trivial patch for setup.py fixing the dependency issue. Added file: http://bugs.python.org/file13014/setup.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5205] String Formatting with namedtuple
New submission from Lie Ryan lie.1...@gmail.com: I've been experimenting with namedtuple, it seems that string formatting doesn't recognize namedtuple as mapping. from collections import namedtuple Nt = namedtuple('Nt', ['x', 'y']) nt = Nt(12, 32) print 'one = %(x)s, two = %(y)s' % nt # output should be: one = 12, two = 32 currently, it is possible to use nt._asdict() as a workaround, but I think it will be easier and more intuitive to be able to use namedtuple directly with string interpolation. I tried this with 2.6 and 2.7a (trunk). Haven't seen 3.0 yet. PS: Although the following works, it is not the topic of the issue: print 'one = %s, two = %s' % nt -- components: Library (Lib) messages: 81555 nosy: lieryan severity: normal status: open title: String Formatting with namedtuple type: feature request versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5205 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5205] String Formatting with namedtuple
Changes by Lie Ryan lie.1...@gmail.com: -- components: +Interpreter Core versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5205 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5175] negative PyLong - C unsigned integral, TypeError or OverflowError?
Mark Dickinson dicki...@gmail.com added the comment: Committed, r69498 (trunk) and r69499 (py3k). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5175] negative PyLong - C unsigned integral, TypeError or OverflowError?
Mark Dickinson dicki...@gmail.com added the comment: ...and your patch for setup.py applied in r69500, r69501, r69502, r69503. Thank you! -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1035576] Add New RPM-friendly record option to setup.py
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1035576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue818201] distutils: clean -b ignored; set_undefined_options doesn't
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue818201 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue755286] Generate rpm filelist including directories
Akira Kitada akit...@gmail.com added the comment: Duplicate of issue1035576 -- nosy: +akitada, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue755286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1035576] Add New RPM-friendly record option to setup.py
Akira Kitada akit...@gmail.com added the comment: duplicate of issue755286 -- nosy: +akitada ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1035576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1169193] Handle ungzipped man pages in rpm builds correctly
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek type: - behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1169193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue809846] distutils/bdistwin32 doesn't clean up RO files properly
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue809846 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1169193] Handle ungzipped man pages in rpm builds correctly
Akira Kitada akit...@gmail.com added the comment: Duplicate of issue644744 -- nosy: +akitada ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1169193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue644744] bdist_rpm fails when installing man pages
Akira Kitada akit...@gmail.com added the comment: Duplicate of issue1169193 -- nosy: +akitada, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue644744 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1382562] --install-base not honored on win32
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek type: - behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1382562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue957381] bdist_rpm fails on redhat9, fc1, fc2
Akira Kitada akit...@gmail.com added the comment: Is this problem already closed? -- nosy: +akitada, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue957381 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1289136] distutils extension library path bug on cygwin
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1289136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
Guilherme Polo ggp...@gmail.com added the comment: I see what you want to do, but I fell really uncomfortable by totally ignoring IOError. I could get a bad file descriptor under Linux too, and I wouldn't like to see it discarded for no reason. Now, is there some problem if we remove the calls to the tell method in _write_header ? See patch attached (tests are very welcome too). Added file: http://bugs.python.org/file13015/writeheader_without_tell.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1274324] 'setup.py install' fail on linux from read-only storage
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1274324 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1028432] Specify a source baseurl for bdist_rpm.
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek type: - feature request versions: +Python 2.7, Python 3.1 -Python 2.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1028432 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5206] with context object for unittest assertRaises()
New submission from Martin Blais bl...@furius.ca: Here is a useful trick to restore the normal call syntax for delayed evaluation for assertRaises(): from contextlib import contextmanager @contextmanager def raised(exctype): try: yield raise AssertionError(Exception %s not raised. % exctype.__name__) except exctype, e: pass Then you can do this:: with raised(ValueError): rate = foo(arg1, arg2) Instead of :: self.assertRaises(foo, arg1, arg2) Which means you don't have to break the function from its arguments (it doesn't look like a function call anymore). P.S. I know I didn't include self up there in my proposed implementation but it could be parameterized to get the failureException. (This is a second issue:) However, I really think that all the failUnlessXXX methods should be taken out of the class and made available at module level so that they can be reused by py.test tests as well, and they are perhaps even worthy of their own module. I can't remember a single instance where I had to override that failureException class... Comments welcome, I'd be happy to fix this one myself if we can restore my commit privileges (I think they expired because I didn't use them since the need-for-speed workshop.) -- messages: 81564 nosy: blais severity: normal status: open title: with context object for unittest assertRaises() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1051216] make distutils.core.run_setup re-entrant
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek type: - feature request versions: +Python 2.7, Python 3.1 -Python 2.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1051216 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5207] extend strftime/strptime format for RFC3339 and RFC2822
New submission from Iakov Davydov da...@myths.ru: Currently there is no obvious way to parse time from ISO 8601/W3C/RFC3339 datetime format (http://www.ietf.org/rfc/rfc3339.txt) or RFC2822. (Actually RFC2822 could be parsed with rfc822 module but that is not very good way). I suggest that we should add special directive (let's say %o) for time offset which is Z or (+ / -) time-hour : time-minute. Also %O directive will parse zone: ( + / - ) time-hour time-minute. (I suppose there is no need to support obsolate time zones but if that is possible it's also good idea). -- components: Library (Lib) messages: 81565 nosy: davydov severity: normal status: open title: extend strftime/strptime format for RFC3339 and RFC2822 type: feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5207 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5206] with context object for unittest assertRaises()
Changes by Martin Blais bl...@furius.ca: -- components: +Library (Lib) type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4448] should socket readline() use default_bufsize instead of _rbufsize?
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Issue 4879 has been resolved so that that HTTPResponse invokes socket.socket.makefile() with default buffering. see r69209. Since the problem stated in this defect has no bearing on 3.0 (there is no special hack for readline() in 3.0) I am closing this again. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5208] urllib2.build_opener([handler, ...]) incorrect signature in docs
New submission from Max m...@research-net.de: The build_opener() function of urllib2 is speciofied as: urllib2.build_opener([handler, ...]) I think it should be: urllib2.build_opener(handler, ...) see http://docs.python.org/library/urllib2.html?highlight=build_opener -- assignee: georg.brandl components: Documentation messages: 81567 nosy: Böhm, georg.brandl severity: normal status: open title: urllib2.build_opener([handler, ...]) incorrect signature in docs versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5208 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1214675] module warnings lacks a remove filter function
Changes by Daniel Diniz aja...@gmail.com: -- versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1214675 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4882] Behavior of backreferences to named groups in regular expressions unclear
alec resnick aresnick...@gmail.com added the comment: Hi Georg! Sorry to be so long in getting back to you. I've attached a suggested patch for the python-2.6.1-docs-text/library/re.txt documentation. Also, in looking over Kuchling's HOWTO, the necessary information is actually there, and I just wasn't paying attention =) Let me know if I should do something else--this is my first 'fix'/submission to Python, and I'm eager for feedback. Thanks! Gratefully, a. -- keywords: +patch Added file: http://bugs.python.org/file13016/re-backreference-clarification.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4882 ___*** /home/aresnick/Desktop/python-2.6.1-docs-text/library/re.txt 2009-01-04 01:25:41.0 -0500 --- modified-re.txt 2009-02-10 12:38:30.0 -0500 *** *** 242,254 or referenced later in the pattern. ``(?Pname...)`` Similar to regular parentheses, but the substring matched by the !group is accessible via the symbolic group name *name*. Group !names must be valid Python identifiers, and each group name must be !defined only once within a regular expression. A symbolic group is !also a numbered group, just as if the group were not named. So the !group named 'id' in the example below can also be referenced as the !numbered group 1. For example, if the pattern is ``(?Pid[a-zA-Z_]\w*)``, the group can be referenced by its name in arguments to methods of match --- 242,256 or referenced later in the pattern. ``(?Pname...)`` + Similar to regular parentheses, but the substring matched by the !group is accessible within the rest of the regular expression via !the symbolic group name *name*. Group names must be valid Python !identifiers, and each group name must be defined only once within a !regular expression. A symbolic group is also a numbered group, !just as if the group were not named. So the group named 'id' in !the example below can also be referenced (within the regular !expression) as the numbered group 1. For example, if the pattern is ``(?Pid[a-zA-Z_]\w*)``, the group can be referenced by its name in arguments to methods of match *** *** 256,264 name in pattern text (for example, ``(?P=id)``) and replacement text (such as ``\gid``). ! ``(?P=name)`` Matches whatever text was matched by the earlier group named !*name*. ``(?#...)`` A comment; the contents of the parentheses are simply ignored. --- 258,268 name in pattern text (for example, ``(?P=id)``) and replacement text (such as ``\gid``). ! ``(?P=name)`` Matches whatever text was matched by the earlier group named !*name*. This can only be used within the regular expression. To !reference the captured group, pass the group's name as an argument !to the method of a match object, e.g. ``m.group('name')``. ``(?#...)`` A comment; the contents of the parentheses are simply ignored. ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1440472] email.Generator is not idempotent
Changes by Daniel Diniz aja...@gmail.com: -- components: +Documentation -Library (Lib) type: - behavior versions: +Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1440472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1661108] base64.urlsafe_b64encode() shouldn't use the = character
Changes by Daniel Diniz aja...@gmail.com: -- assignee: - georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1661108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1381476] csv.reader endless loop
Daniel Diniz aja...@gmail.com added the comment: Invalid per discussion. -- nosy: +ajaksu2 title: csv.reader endless loop - csv.reader endless loop ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1381476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1630794] Seg fault in readline call.
Daniel Diniz aja...@gmail.com added the comment: Not confirmed with newer versions, closing suggested. -- nosy: +ajaksu2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1630794 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3676] Obsolete references to PEP 291 in py3k lib
Changes by Daniel Diniz aja...@gmail.com: -- nosy: +facundobatista ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3734] subclassing complex
Daniel Diniz aja...@gmail.com added the comment: Confirmed in trunk. Here's a copy-n-past'able testcase: class xcomplex( complex ): def __new__(cls,*args,**kwargs): return complex.__new__(cls,*args,**kwargs) def __coerce__(self,other): t = complex.__coerce__(self,other) try: return (self,xcomplex(t[1])) except TypeError: return t def __add__(self,x): return xcomplex( complex.__add__(self,x) ) def __radd__(self,x): return xcomplex( complex.__radd__(self,x) ) class xfloat(float): def __new__(cls,*args,**kwargs): return float.__new__(cls,*args,**kwargs) def __coerce__(self,other): t = float.__coerce__(self,other) try: return (self,float(t[1])) except TypeError: return t def __add__(self,x): return xfloat( float.__add__(self,x) ) def __radd__(self,x): return xfloat( float.__radd__(self,x) ) z = 1j xz = xcomplex(1j) f = 1.0 xf = xfloat(1.0) print type(z + xz) print type(f + xf) -- components: +Interpreter Core -None nosy: +ajaksu2, marketdickinson versions: +Python 2.6, Python 2.7 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1732212] repr of 'nan' floats not parseable
Daniel Diniz aja...@gmail.com added the comment: OP posted a message in python-dev, with no replies: http://mail.python.org/pipermail/python-dev/2007-June/073625.html -- nosy: +ajaksu2, marketdickinson versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1732212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1151323] New fpconst module
Changes by Daniel Diniz aja...@gmail.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1151323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1633648] incomplete numerical comparisons
Changes by Daniel Diniz aja...@gmail.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1633648 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1177779] explicit sign variable for longs
Changes by Daniel Diniz aja...@gmail.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3694] Undetected error in _struct.pack_into
Changes by Daniel Diniz aja...@gmail.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5206] with context object for unittest assertRaises()
Antoine Pitrou pit...@free.fr added the comment: This is already done in trunk, you can use it as follows: with self.assertRaises(ZeroDivisionError): 1/0 -- nosy: +pitrou resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3694] Undetected error in _struct.pack_into
Antoine Pitrou pit...@free.fr added the comment: Yes, PyNumber_AsSsize_t() should be used instead. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3694] Undetected error in _struct.pack_into
Antoine Pitrou pit...@free.fr added the comment: Oh, and a test should be added :) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1440472] email.Generator is not idempotent
Barry A. Warsaw ba...@python.org added the comment: I think we should update the documentation to mention these exceptions. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1440472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1911] webbrowser.open firefox 3 issues
Georg Brandl ge...@python.org added the comment: Thanks, closing. -- nosy: +georg.brandl resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1177779] explicit sign variable for longs
Antoine Pitrou pit...@free.fr added the comment: I agree with MvL, it should probably be rejected. Memory size of longs is critical in py3k. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1327971] HTTPResponse instance has no attribute 'fileno'
Georg Brandl ge...@python.org added the comment: Well, easy access is not the point. If the object is supposed to have the file-like interface, and can provide a fileno(), it should. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1327971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1175686] add reload function to IDLE
Changes by Brett Cannon br...@python.org: -- title: add reload function - add reload function to IDLE ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1175686 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5200] unicode.normalize gives wrong result for some characters
Martin v. Löwis mar...@v.loewis.de added the comment: It is not true that normalize produces aaoAAO. Instead, it produces u'a\u030aa\u0308o\u0308A\u030aA\u0308O\u0308' This is the correct result, according to the Unicode specification. It would be incorrect to normalize them unchanged under the Unicode Normal Form D (for decomposed); the decomposed character for 'LATIN SMALL LETTER A WITH RING ABOVE' (for example) is 'LATIN SMALL LETTER A' + 'COMBINING RING ABOVE'. The wikipedia article is irrelevant; refer to the Unicode specification for a normative reference. Closing as invalid. -- nosy: +loewis resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5138] File Reload for IDLE
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Duplicate of 1175686. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5203] ctypes segfaults when passing a unicode string to a function without argtypes
Thomas Heller thel...@ctypes.org added the comment: Fixed in trunk (rev 69505) and release26-maint (rev 69506). The bug was already fixed in a different way in py3k and release30-maint although in a different way, I merged this exact fix anyway (rev 69507 and rev 69508). Thanks. -- resolution: - fixed status: open - closed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5203 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1175686] add reload function to IDLE
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Kurt, is this something you can add? Closed the duplicate issue 5138 and leaving this open. IDLE would be *much* easier to use in conjunction with version control if there were a reload option that did the equivalent of (close current with no save, followed by open current file). -- assignee: - kbk priority: low - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1175686 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3734] subclassing complex
Mark Dickinson dicki...@gmail.com added the comment: I'll take a look. -- assignee: - marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1327971] HTTPResponse instance has no attribute 'fileno'
Brett Cannon br...@python.org added the comment: Georg is right and this has been fixed apparently in 3.0, leaving 2.7 and older broken. There are two possible solutions to this. One is to change socket._fileobject.fileno() to simply try self._sock.fp.fileno() if self._sock.fileno() does not exist. The other option is to add a __getattr__ to httplib.HTTPResponse to redirect to self.fp. Anyone have an opinion? -- nosy: +brett.cannon stage: - test needed versions: +Python 2.4, Python 2.5, Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1327971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5204] test.os/TestInvalidFD/test_fdopen on VC6
Martin v. Löwis mar...@v.loewis.de added the comment: The patch is fine, please apply. -- assignee: - ocean-city nosy: +loewis resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5209] nntplib needs updating to RFC 3977
New submission from Travis Hassloch tra...@giganews.com: RFC 977 has been obsoleted by RFC 3977 Numerous new commands, standardized extensions, clarifications. -- components: Library (Lib) messages: 81587 nosy: travis severity: normal status: open title: nntplib needs updating to RFC 3977 type: feature request versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5209 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1327971] HTTPResponse instance has no attribute 'fileno'
Brett Cannon br...@python.org added the comment: Another option is to change urllib.addinfourl to look for fileno() on an HTTPResponse object. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1327971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5210] zlib does not indicate end of compressed stream properly
New submission from Travis Hassloch tra...@giganews.com: Underlying zlib can determine when it has hit the end of a compressed stream without reading past the end. Python zlib implementation requires that one read past the end before it signals the end by putting data in Decompress.unused_data. This complicates interfacing with mixed compressed/uncompressed streams. -- components: Library (Lib) messages: 81590 nosy: travis severity: normal status: open title: zlib does not indicate end of compressed stream properly type: behavior versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1732212] repr of 'nan' floats not parseable
Mark Dickinson dicki...@gmail.com added the comment: I don't see a huge need for this. In 2.6, 3.0 and higher, float(repr(x)) recovers x reliably across platforms (modulo the occasional system strtod bug), even when x is an infinity or nan. It's true that using float() doesn't help if you want to eval the repr of a container with nans in it. But in that situation it's not hard to prefix the eval with nan = float('nan'); inf = float('inf'). Pete, are you still interested in this? Can you suggest a solution that doesn't mess up the float(repr(.)) round- trip? I don't really want to lose the float(repr(.)) round-trip. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1732212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1732212] repr of 'nan' floats not parseable
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1732212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1151323] New fpconst module
Mark Dickinson dicki...@gmail.com added the comment: Since PEP 754 has been rejected, I think this issue can be closed. As noted at the top of PEP 754, much of the functionality of the patch is already included (in somewhat different form) in 2.6 and 3.0. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1151323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1633648] incomplete numerical comparisons
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1633648 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3694] Undetected error in _struct.pack_into
Daniel Diniz aja...@gmail.com added the comment: Here's a patch with test for 3.x. Erm, I have no idea if that's all that is necessary :) Does this have the potential to break existing code? Added file: http://bugs.python.org/file13017/pynumber_assizet.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1177779] explicit sign variable for longs
Martin v. Löwis mar...@v.loewis.de added the comment: I wasn't actually proposing to reject it, merely asking, since all people who ever commented are also committers. However, since nobody bothered committing it in the last 3+ years, I'm now rejecting it. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2204] document ConfigParser behaviour when a file has same section multiple times
Raghuram Devarakonda draghu...@gmail.com added the comment: The attached patch is a proof of concept for throwing an exception. If it is not too much of a problem, can you upload the patch to http://codereview.appspot.com? Reviewing there is simpler. Also, you will have to include some test cases in the patch. As discussed on the mailing list [1], it has some shortcomings that should be addressed before it is merged. I think that the builder interface already has correct behaviour in that duplicate sections are not allowed. So you can have 'unique_sections' control only parser interface and can set it to False by default (to be compatible with current behaviour). [1]: http://mail.python.org/pipermail/python-dev/2009- Correct discussion link: http://mail.python.org/pipermail/python-dev/2009-February/085838.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5200] unicode.normalize gives wrong result for some characters
Peter Landgren peter.tal...@telia.com added the comment: Thanks for the fast response. I understand that python follows the unicode specification. I think the unicode standard is not correct in this case for the Swedish letters. I have asked unicode.org for an explanation. Should not the Danish letter Ø be normalized as O? I get Ø for all NFC/NFD/NFKC/NFKD normalizations? Regards, Peter Landgren Added file: http://bugs.python.org/file13018/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5200 ___!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0//EN http://www.w3.org/TR/REC-html40/strict.dtd; htmlheadmeta name=qrichtext content=1 /style type=text/css p, li { white-space: pre-wrap; } /style/headbody style= font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal; p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;Thanks for the fast response./p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;I understand that python follows the unicode specification. I think the unicode standard is not correct in this case for the Swedish letters. I have asked unicode.org for an explanation. /p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;Should not the Danish letter à be normalized as O? I get à for all NFC/NFD/NFKC/NFKD normalizations?/p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;Regards,/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;Peter Landgren/p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; Martin v. Löwis lt;mar...@v.loewis.degt; added the comment:/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; It is not true that normalize produces aaoAAO. Instead, it produces/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; u'a\u030aa\u0308o\u0308A\u030aA\u0308O\u0308'/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; This is the correct result, according to the Unicode specification. It/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; would be incorrect to normalize them unchanged under the Unicode Normal/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; Form D (for decomposed); the decomposed character for 'LATIN SMALL/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; LETTER A WITH RING ABOVE' (for example) is 'LATIN SMALL LETTER A' +/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; 'COMBINING RING ABOVE'./p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; The wikipedia article is irrelevant; refer to the Unicode specification/p p style= margin-top:0px;
[issue5200] unicode.normalize gives wrong result for some characters
Martin v. Löwis mar...@v.loewis.de added the comment: Should not the Danish letter Ø be normalized as O? I get Ø for all NFC/NFD/NFKC/NFKD normalizations? I think you have a fundamental misunderstanding what a decomposition is. Ø should *not* be decomposed as O, because clearly, Ø and O are different letters. If anything, it would be decomposed as O + PLUS SOME COMBINING MARK Now, in the specific case of 00D8;LATIN CAPITAL LETTER O WITH STROKE;Lu;0;L;N;LATIN CAPITAL LETTER O SLASH;;;00F8; no canonical decomposition is specified. Compare this to 00D5;LATIN CAPITAL LETTER O WITH TILDE;Lu;0;L;004F 0303N;LATIN CAPITAL LETTER O TILDE;;;00F5; which decomposes to U+004F followed by U+0303, i.e. LATIN CAPITAL LETTER O followed by COMBINING TILDE. If Ø was to be decomposed, it should use a mark COMBINING STROKE, but no such combining mark exists in Unicode. I don't know why that is; you would have to ask the Unicode consortium. In any case, Unicode guarantees stability wrt. decompositions, so even if some combining mark gets added later on, the existing decomposition remain stable. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue722647] lower-level API for longs
Mark Dickinson dicki...@gmail.com added the comment: I recommend closing this due to lack of interest/PEP/patch. 2.7 and 3.1 now have n.bit_length(), which matches Gregory's proposed n.bitwid(). I'm semi-interested in the bit-access methods n.bit(x) and n.bit(hi, lo), but not enough to write a PEP or patch right now. For n.bitarray(), it might be better to expose the _PyLong_{As,From}ByteArray methods instead. -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue722647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5200] unicode.normalize gives wrong result for some characters
Peter Landgren peter.tal...@telia.com added the comment: The same applies Å and A, Ä and A and Ö and O which also are also different letters as Ø and O are. (Ø is the Danish version of Ö ) Maybe not in the unicode world but in treal life. That's why I'm a little confused. Will wait and see what/if the unicode people says. In any case, thanks for the discussion. Regards, /Peter Added file: http://bugs.python.org/file13019/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5200 ___!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0//EN http://www.w3.org/TR/REC-html40/strict.dtd; htmlheadmeta name=qrichtext content=1 /style type=text/css p, li { white-space: pre-wrap; } /style/headbody style= font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal; p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; I think you have a fundamental misunderstanding what a decomposition/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; is. à should *not* be decomposed as O, because clearly, à and O/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; are different letters. If anything, it would be decomposed as/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;gt; O + PLUS SOME COMBINING MARK/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;The same applies à and A, à and A and à and O/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;which also are also different letters as à and O are. (à is the Danish version of à )/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;Maybe not in the unicode world but in treal life./p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;That's why I'm a little confused./p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;Will wait and see what/if the unicode people says./p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;In any case, thanks for the discussion./p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;Regards,/p p style= margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/Peter/p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p p style=-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;/p/body/html___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5186] Reduce hash collisions for objects with no __hash__ method
Mark Dickinson dicki...@gmail.com added the comment: Some comments, while I remember: * the argument to _Py_HashPointer is not always divisible by 8. It's called to create hashes for various objects, including methodobjects; see the line: y = _Py_HashPointer((void*)(a-m_ml-ml_meth)); in meth_hash in methodobject.c, for example; here ml_meth is a C function pointer. I can't see how this could be a problem, though, especially as is seems very unlikely that two function pointers could be less than 8 bytes apart. * following from the above, it's also pretty unlikely that any two object pointers will be less than 16 bytes apart, so it might be worth seeing if performance with 4 is noticeably any different from with 3. * we should make sure that the value returned by _Py_HashPointer isn't the illegal hash value -1 (though it's difficult to see how it could be). One safe way to do this that shouldn't cost any CPU cycles would be to cast to unsigned long before the right shift, to be sure that the right shift zero-extends instead of sign-extending, so that the result is guaranteed nonnegative. * It *would* be nice to do something about the SIZEOF_LONG SIZEOF_VOID_P case: the current conversion to a PyLong seems like quite an expensive way to go. And I've just ordered a computer with 64-bit Windows installed... ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3694] Undetected error in _struct.pack_into
Antoine Pitrou pit...@free.fr added the comment: Well, a patch for 2.6 should be provided as well. Besides, PyExc_OverflowError is probably a better choice than PyExc_IndexError (but I'm not sure on this one). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
David Jones d...@pobox.com added the comment: On 10 Feb 2009, at 16:57, Guilherme Polo wrote: Guilherme Polo ggp...@gmail.com added the comment: Now, is there some problem if we remove the calls to the tell method in _write_header ? See patch attached (tests are very welcome too). Yes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5186] Reduce hash collisions for objects with no __hash__ method
Antoine Pitrou pit...@free.fr added the comment: Some tests on py3k (32-bit build): l = [object() for i in range(20)] [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [16, -96, 104, 8, 8, 8, 8, 8, -749528, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8] class C(object): ...__slots__ = () ... l = [C() for i in range(20)] [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [-104, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 8, 8, 8, 8, 16, -8, 16] class C(object): ...__slots__ = ('x') ... l = [C() for i in range(20)] [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [432, 24, -384, 408, 24, 24, -480, 528, 24, 24, 24, 24, 48, -360, 504, 24, -480, 552, 24] So, as soon as an user-defined type isn't totally trivial, it is allocated in at least 24-byte memory units. Shifting by 4 shouldn't be detrimental performance-wise, unless you allocate lots of purely empty object() instances... Note: a 64-bit build shows an even greater allocation unit: class C(object): ...__slots__ = ('x') ... l = [C() for i in range(20)] [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [56, -112, 168, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56] I wonder why the allocation unit is 56 and not 48 (2*24). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5200] unicode.normalize gives wrong result for some characters
Martin v. Löwis mar...@v.loewis.de added the comment: The same applies Å and A, Ä and A and Ö and O which also are also different letters as Ø and O are. Sure. And rightfully, they Å is *not* (I repeat: not) normalized as A, under NFD: py unicodedata.normalize(NFD, uÅ) u'A\u030a' Maybe not in the unicode world but in treal life. They are different letters also in the Unicode world. That's why I'm a little confused. I think the confusion comes from your assumption that normalizing Å produces A. It does not. Really not. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1732212] repr of 'nan' floats not parseable
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Recommend closing this. We like to have eval(repr(obj))==obj where possible but it is not a strict requirement. Am opposed to the two proposed solutions (float attributes or new literals). Mark's solution of defining nan=float('nan') whereever you care about it seems like a reasonable workaround. IMO, the special case code we've already added to support NaNs and Infs has already far exceeded their worth in real-world use cases. No need to further muddy the waters when simple workarounds exist. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1732212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5206] with context object for unittest assertRaises()
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Humph! The time machine strikes again. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1732212] repr of 'nan' floats not parseable
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1732212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5186] Reduce hash collisions for objects with no __hash__ method
Antoine Pitrou pit...@free.fr added the comment: Le mardi 10 février 2009 à 21:18 +, Antoine Pitrou a écrit : Note: a 64-bit build shows an even greater allocation unit: class C(object): ...__slots__ = ('x') ... l = [C() for i in range(20)] [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [56, -112, 168, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56] I wonder why the allocation unit is 56 and not 48 (2*24). I have found the answer. The PyGC_Head forces its own alignment using a long double dummy, which in 64-bit mode (Linux / gcc) wastes 8 bytes between the end of the PyGC_Head and the PyObject itself. (SIZEOF_LONG_DOUBLE is 16 in pyconfig.h) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue722647] lower-level API for longs
Mark Dickinson dicki...@gmail.com added the comment: Closing. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue722647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5209] nntplib needs updating to RFC 3977
Travis Hassloch tra...@giganews.com added the comment: Attached is a difference which implements CAPABILITIES and MODE READER and leaves some TODO comments for other RFC 3977 commands. -- keywords: +patch Added file: http://bugs.python.org/file13020/nntplib.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5209 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3734] subclassing complex
Mark Dickinson dicki...@gmail.com added the comment: So there's a hint about what's happening here at the bottom of the section http://docs.python.org/reference/datamodel.html#id5 of the docs, where it says: In the current implementation, the built-in numeric types int, long and float do not use coercion; the type complex however does use it. The difference can become apparent when subclassing these types. Over time, the type complex may be fixed to avoid coercion. [...] In the OPs example, when z + xz is evaluated, xz is (successfully) coerced to type complex, and then complex.__add__ is called to do the addition as usual. There's definitely (at least) a documentation bug here, given that at the same place as referenced above it says: New-style classes (those derived from object) never invoke the __coerce__() method in response to a binary operator; the only time __coerce__() is invoked is when the built-in function coerce() is called. At the level of the C code, the practical difference between complex and (for example) float is that the float type has Py_TPFLAGS_CHECKTYPES set, and all arithmetic operations do their own conversions. The complex type doesn't set Py_TPFLAGS_CHECKTYPES, and so (contrary to the documentation) relies on complex_coerce to do any conversions. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4631] urlopen returns extra, spurious bytes
Antoine Pitrou pit...@free.fr added the comment: I took a look at the patch and it looks ok, apart from the _checkClosed() hack (but I don't think there's any immediate solution). It should be noted that HTTPResponse.readline() will be awfully slow since, as HTTPResponse doesn't have peek(), readline() will call read() one byte at a time... (slow I/O is nothing new in py3k, however :-)) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4631] urlopen returns extra, spurious bytes
Antoine Pitrou pit...@free.fr added the comment: Here is a patch without the _checkClosed() hack. The solution is simply to remove redundant _checkClosed() calls in IOBase (for example, readline() doesn't need to do an explicit `closed` check as it calls read()). Added file: http://bugs.python.org/file13021/urllib-chunked2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com