[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here's an implementation of read1() that satisfies that condition, along with some relevant unit tests. -- keywords: +patch Added file: http://bugs.python.org/file21531/gzipfile_read1.diff ___ Python tracker

[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: > Something looks fishy: what happens if size is -1 and EOFError is not raised? You're right - I missed that possibility. In that case, extrasize and offset get updated incorrectly, which will break subsequent calls to seek() and tell(). However, it se

[issue11795] Better core dev guidelines for committing submitted patches

2011-04-07 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue11795> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6715] xz compressor support

2011-04-07 Thread Nadeem Vawda
Nadeem Vawda added the comment: > As a reference, I think you are refering to #5863 and #10791. Pretty fine > job, I must say. Thank you :) > Nadeem, what do you think?. Is xz in your list?. Yes, it's the next substantial thing I was planning on working on. I don't have

[issue5996] abstract class instantiable when subclassing dict

2011-04-08 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue5996> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: I've looked at the code for Python 3, and there isn't anything there that prevents this from happening there, either. So the fix should be applied to 3.2 and 3.3 as well. An alternative approach would be to limit the size of the cache, so that the call

[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-08 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue11277> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: Patch for 3.3 and 3.2 -- keywords: +patch Added file: http://bugs.python.org/file21584/filecmp-lru-cache-3.3.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: Patch for 2.7. -- Added file: http://bugs.python.org/file21585/filecmp-lru-cache-2.7.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue11802> ___ ___ Python-bugs-list mailing list Un

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: Oops, there was a typo in the 2.7 patch ("import _thread" instead of "import thread"). Corrected patch attached. -- Added file: http://bugs.python.org/file21586/filecmp-lru-cache-2.7.diff ___ P

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-09 Thread Nadeem Vawda
Nadeem Vawda added the comment: Because the lru_cache decorator doesn't provide any way to invalidate stale cache entries. Perhaps I should factor out the duplicated code into a separate class that can then also be exposed to users of the stdlib. But that would only apply to 3.3, so the u

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-09 Thread Nadeem Vawda
Nadeem Vawda added the comment: > I question whether this should be backported. Please discuss with the RM. Will do. Are you referring specifically to 2.7, or to 3.1 and 3.2 as well? -- ___ Python tracker <http://bugs.python.org/issu

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-10 Thread Nadeem Vawda
Nadeem Vawda added the comment: Georg? Benjamin? Do you think this fix should be backported? -- nosy: +benjamin.peterson, georg.brandl ___ Python tracker <http://bugs.python.org/issue11

[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-13 Thread Nadeem Vawda
Nadeem Vawda added the comment: > By the way, at this point I think we could simply skip the test on BSDs > and OS X. The tested functionality is cross-platform, so testing under > a limited set of systems should be ok. Another solution would be to rewrite the test to not use mmap

[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-13 Thread Nadeem Vawda
Nadeem Vawda added the comment: > I think there's basically noone and nothing (even among the buildbots) > that runs bigmem tests on a regular basis, so I'd much rather keep the > mmap() solution, even if that means it must be skipped on OS X. Fair enough. (As an aside, if

[issue11851] Flushing the standard input causes an error

2011-04-15 Thread Nadeem Vawda
New submission from Nadeem Vawda : Could you provide more details on the problem? What version of Python did you encounter this error under? A short code fragment that triggers the error would also be useful. (I get no errors executing "sys.stdin.flush()" on 2.6.6 or 3.3) -

[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-16 Thread Nadeem Vawda
Nadeem Vawda added the comment: > So i finally did some tests using Nadeem's code snippet > from msg133677. The largest top(1) i ever got was >30477 python3 2.7 00:09.77 101877912M+ 240K > but the system is unusable then. The code I posted was

[issue11877] Mac OS X fsync() should really be fcntl(F_FULLFSYNC)

2011-04-19 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue11877> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-25 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue11918> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10276] zlib crc32/adler32 buffer length truncation (64-bit)

2011-05-03 Thread Nadeem Vawda
Nadeem Vawda added the comment: Changeset a0681e7a6ded fixes this bug for 2.7 - too-large buffers cause an OverflowError during argument parsing, so there is no possibility of truncation happening. -- status: open -> closed ___ Python tracker &l

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-05 Thread Nadeem Vawda
Nadeem Vawda added the comment: haypo> Can we just remove the test? I think so. The test was originally intended to catch the case where crc32() or adler32() would get a buffer of >=4GB, and then silently truncate the size and produce an incorrect result (issue10276). However, 2.7&

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: test_move_dir_caseinsensitive is failing on some of the XP buildbots: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4514 http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/2696 http://www.python.org/dev/buildbot/all

[issue12021] mmap.read requires an argument

2011-05-06 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12021> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: Thanks for the tests; I'll review and commit them tomorrow morning. > Even if that means that there is no test which checksums an > entire superlarge mmap() region. Bear in mind that the test is only to be removed from 2.7; it will still be prese

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-07 Thread Nadeem Vawda
Nadeem Vawda added the comment: sdaoden> @Nadeem: note that the committed versions of the tests would not sdaoden> show up the Mac OS X mmap() bug AFAIK, because there is an sdaoden> intermediate .close() of the file to be mmapped. Thanks for catching that. Should be fixed now. hay

[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12041> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12046] Windows build identification incomplete

2011-05-09 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12046> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12050] unconsumed_tail of zlib.Decompress is not always cleared on decompress() call

2011-05-10 Thread Nadeem Vawda
Nadeem Vawda added the comment: Thanks for the bug report. It seems that the code needs fixing. I'll look into it this weekend. -- assignee: -> nadeem.vawda nosy: +nadeem.vawda stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3

[issue12053] Add prefetch() for Buffered IO (experiment)

2011-05-10 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12053> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12060] Python doesn't support real time signals

2011-05-11 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12060> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12062] Buffered I/O inconsistent with unbuffered I/O in certain cases

2011-05-12 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12062> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12050] unconsumed_tail of zlib.Decompress is not always cleared on decompress() call

2011-05-14 Thread Nadeem Vawda
Nadeem Vawda added the comment: The code has been fixed. Once again, thanks for the bug report. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue8650] zlibmodule.c isn't 64-bit clean

2011-05-14 Thread Nadeem Vawda
Nadeem Vawda added the comment: Fixed in 3.1, 3.2 and 3.3. 2.7 no longer has this problem -- the fix for issue8651 ensures that the functions cannot receive inputs large enough to be problematic (since we don't define PY_SSIZE_T_CLEAN). -- resolution: -> fixed stage: nee

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda added the comment: Also failing to compile on OS X: http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.x/builds/1385/steps/test/logs/stdio The problem seems to be that is not being included on these non-Linux systems. Looking at Modules/socketmodule.h reveals

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda added the comment: The OpenIndiana bots are now green, but the BSD and OS X bots are still failing. It seems that on those systems, depends on and maybe some other headers, so the current configure script detects it as "present but not usable". I'm current

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda added the comment: OK. I'll try to put together something cleaner just for 3.3, then. -- assignee: -> nadeem.vawda stage: patch review -> needs patch versions: -Python 2.7, Python 3.1, Python 3.2 ___ Python tra

[issue12081] Remove distributed copy of libffi

2011-05-15 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12081> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda added the comment: OK, that's great. It'll be another couple of hours before I can do anything from the FreeBSD side; I'm still waiting for the ISO to finish downloading :/ -- ___ Python tracker <http://bugs.pytho

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-15 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12084> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda added the comment: All the buildbots are back to normal. It looks like FreeBSD was having the same problem as OS X. -- ___ Python tracker <http://bugs.python.org/issue1746

[issue6715] xz compressor support

2011-05-16 Thread Nadeem Vawda
Nadeem Vawda added the comment: Also, if I'm reading the documentation correctly, there isn't any support for incremental in-memory coding, so it wouldn't be possible to implement classes analogous to BZ2Compressor/BZ2Decompressor. -- assignee:

[issue7443] test.support.unlink issue on Windows platform

2011-05-16 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue7443> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12107] TCP listening sockets created without FD_CLOEXEC flag

2011-05-19 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12107> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12124] python -m test test_packaging test_zipimport failure

2011-05-19 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12124> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12127] Inconsistent leading zero treatment

2011-05-20 Thread Nadeem Vawda
Nadeem Vawda added the comment: The behaviour of int() can be made consistent with the syntax for Python integer literals by specifying a base of 0: >>> int("0050", 0) Traceback (most recent call last): File "", line 1, in ValueError: invalid

[issue12131] python built with --prefix fails in site.py with no section 'posix_prefix'

2011-05-21 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12131> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12132] test_packaging failures when run with -j

2011-05-21 Thread Nadeem Vawda
New submission from Nadeem Vawda : test_packaging fails when regrtest is run with the -j option (run multiple tests concurrently). $ ./python -Wd -E -bb -j0 -v test_packaging [snip] == ERROR: test_build_ext

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12133> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12141] --multiprocessing fails with packaging.tests.test_command_build_ext

2011-05-21 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12141> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10512] regrtest ResourceWarning - unclosed socket

2010-11-23 Thread Nadeem Vawda
New submission from Nadeem Vawda : When running "make test" on Python3, test_socket reports a number of ResourceWarnings due to unclosed sockets. Attached is a patch that changes the relevant tests so that they close all the created sockets. test_multiprocessing and test_xml

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2010-11-23 Thread Nadeem Vawda
Nadeem Vawda added the comment: Attached is a patch that fixes the warnings in test_xmlrpc, along with some other file- and socket-related warnings in test_normalization, test_timeout and test_tk that only show up when regrtest is run with -uall. The warning in test_timeout could be fixed

[issue1508475] transparent gzip compression in urllib

2010-11-23 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue1508475> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2010-11-25 Thread Nadeem Vawda
Nadeem Vawda added the comment: test_cgi causes a strange filehandle leak that only causes a warning when regrtest terminates, and for some reason doesn't show up if you run just test_cgi by itself. I've attached a patch that closes the filehandle. -- nosy: +lukasz.langa

[issue5863] bz2.BZ2File should accept other file-like objects.

2010-11-29 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue5863> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-03 Thread Nadeem Vawda
Nadeem Vawda added the comment: The fix for test_normalization was committed as r87441. As for test_cgi, I still seem to get the leak (also on Linux; Ubuntu 10.10 64-bit). I'll poke around with it some more tomorrow. In addition to the ResourceWarnings, some of tests have been ra

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: r87710 introduces a ResourceWarning in test_threading. Fix attached. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-04 Thread Nadeem Vawda
Changes by Nadeem Vawda : Added file: http://bugs.python.org/file20255/test_threading.diff ___ Python tracker <http://bugs.python.org/issue10512> ___ ___ Python-bug

[issue6643] Throw away more radioactive locks that could be held across a fork in threading.py

2011-01-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: r87710 introduces an AttributeError in test_thread's TestForkInThread test case. If os.fork() is called from a thread created by the _thread module, threading._after_fork() will get a _DummyThread (with no _block attribute) as the current thread.

[issue8052] subprocess close_fds behavior should only close open fds

2011-01-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: According to POSIX [1], if a multi-threaded program calls fork(), the child process may only use async-signal-safe system calls between fork() and exec*(). readdir() is not required to be async-safe [2], so reading /proc/self/fds in the child process is

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: r87736 introduces another DeprecationError; this time in test_time (line 150; s/assertEquals/assertEqual/). -- ___ Python tracker <http://bugs.python.org/issue10

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-05 Thread Nadeem Vawda
Nadeem Vawda added the comment: Fix attached for test_imaplib. Most of the warnings were simply due to reap_server() not closing the server object correctly. The remaining warning was due a genuine leak in imaplib.IMAP4.__init__() - if an exception is raised after the connection is opened

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-05 Thread Nadeem Vawda
Nadeem Vawda added the comment: Awesome. That just leaves test_urllibnet, test_urllib2net, and test_cgi. I'm hoping to post patches for the first two tomorrow. About test_cgi, I've fiddled around with it a bit more. The leak manifests itself with any set of tests including te

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-05 Thread Nadeem Vawda
Nadeem Vawda added the comment: Have you tried my patch (resourcewarning-fixes-3.diff)? It fixes the warning for me without breaking anything. I was just worried that the warning was something triggered by my specific system configuration when you said that you couldn't reproduce it.

[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2011-01-06 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue4681> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: Looking at the warnings from test_urllib2net, it seems that they all originate in the FTP tests: * OtherNetworkTests.test_ftp() * TimeoutTest.test_ftp_basic() * TimeoutTest.test_ftp_default_timeout() Most of these leaks seem to stem from the fact that

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-07 Thread Nadeem Vawda
Nadeem Vawda added the comment: Sorry, scratch that - I misunderstood the semantics of SocketIO.close(). I hadn't realized that the underlying socket is supposed to stay open until it itself is also explicitly closed (as well as all SocketIO objects referring to it). I've been a

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-10 Thread Nadeem Vawda
Nadeem Vawda added the comment: Good idea; they look like more work to fix than the warnings so far. Aside from those two, it looks like test_cgi is all that's left. Just to clarify, did you manage to reproduce the test_cgi warning? -- ___ P

[issue10903] ZipExtFile:_update_crc fails for CRC >= 0x80000000

2011-01-15 Thread Nadeem Vawda
Nadeem Vawda added the comment: I have been unable to reproduce this on either 3.2rc1 or 2.6. I used a Zip archive containing a single file with the data b"a\n" (CRC 0xDDEAA107). -- nosy: +nvawda ___ Python tracker <http://bu

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-21 Thread Nadeem Vawda
Nadeem Vawda added the comment: I have been working on a patch for this issue. I've implemented everything except for readline(), readlines() and the iterator protocol. In the existing implementation, the reading methods seem to interact weirdly - iternext() uses a readahead buffer,

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-24 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here is a patch that rewrites BZ2File to implement the requested feature, and adds some tests using BytesIO objects. Some notes: * iteration and the read*() method now use the same buffering machinery, so they can be mixed freely. The test for issue8397 has

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-24 Thread Nadeem Vawda
Nadeem Vawda added the comment: Yes, see bz2module-v1.diff. -- ___ Python tracker <http://bugs.python.org/issue5863> ___ ___ Python-bugs-list mailing list Unsub

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-25 Thread Nadeem Vawda
Nadeem Vawda added the comment: > BTW,what is the best way to check for case insensitive file-system? > The test here merely checks if sys.platform returns mac, darwin or win32. I would suggest not checking at all. If the system is case-sensitive, the test will pass, so it doesn't

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-25 Thread Nadeem Vawda
Nadeem Vawda added the comment: > Interesting! If you are motivated, a further approach would be to expose > the compressor and decompressor objects from the C extension, and write > the file object in Python (as in Lib/gzip.py). I had initially considered doing something that, but

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-25 Thread Nadeem Vawda
Nadeem Vawda added the comment: * I had initially considered doing something *like* that -- ___ Python tracker <http://bugs.python.org/issue5863> ___ ___ Pytho

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-25 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here is a quick-and-dirty reimplementation of BZ2File in Python, on top of the existing C implementation of BZ2Compressor and BZ2Decompressor. There are a couple of issues with this code that need to be fixed: * BZ2Decompressor doesn't signal when it re

[issue11018] typo in test_bz2

2011-01-26 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue11018> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-26 Thread Nadeem Vawda
Nadeem Vawda added the comment: >> * The read*() methods are implemented very inefficiently. Since they >> have to deal with the bytes objects returned by >> BZ2Decompressor.decompress(), a large read results in lots of >> allocations that weren't necessary in

[issue10276] zlib crc32/adler32 buffer length truncation (64-bit)

2011-01-26 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here is an update patch, which corrects a typo in the previous patch, and adds a test to test_zlib. The test uses a memory-mapped sparse file, so it gets skipped on systems without mmap. The alternative would be to allocate a 4+GB buffer of ordinary memory

[issue6715] xz compressor support

2011-01-29 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue6715> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11051] system calls per import

2011-01-30 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue11051> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-30 Thread Nadeem Vawda
Nadeem Vawda added the comment: OK, I've rewritten the whole bz2 module (patch attached), and I think it is now ready for review. The BZ2File implementation is a cleaned-up version of the one from my previous patch, with some further additions. I've factored out the common

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-30 Thread Nadeem Vawda
Nadeem Vawda added the comment: Looks good to me. My earlier patch was more defensive because I wasn't sure whether any of the other tests might be using cgi.log(), but it seems that this isn't the case. -- ___ Python trac

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-31 Thread Nadeem Vawda
Nadeem Vawda added the comment: No objections here. The other remaining leaks that I am aware of are covered by issue10883. -- ___ Python tracker <http://bugs.python.org/issue10

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-02-05 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here's an update to the documentation for the bz2 module. -- Added file: http://bugs.python.org/file20692/bz2-doc.diff ___ Python tracker <http://bugs.python.org/i

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-02-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here's a revised version of bz2-v3.diff, with docstrings that are more consistent with the updated documentation. -- ___ Python tracker <http://bugs.python.org/i

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-02-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: Weird, the patch didn't upload... -- Added file: http://bugs.python.org/file20721/bz2-v3b.diff ___ Python tracker <http://bugs.python.org/i

[issue8651] "s#" and friends can silently truncate buffer length

2011-02-21 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue8651> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8650] zlibmodule.c isn't 64-bit clean

2011-02-21 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker <http://bugs.python.org/issue8650> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1519] async_chat.__init__() parameters

2007-11-30 Thread Nadeem Vawda
Nadeem Vawda added the comment: Thanks for pointing that out; I've uploaded a second patch that changes async_chat.__init__() to use 'sock' instead of 'conn'. This change shouldn't affect anything either, since the argument is simply passed to asyncore.dispatcher

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-16 Thread Nadeem Vawda
Nadeem Vawda added the comment: For 3.x, I think that ignoring non-string names is a reasonable fix. The docs for io.FileIO specify that its name attribute can be either a path or an integer file descriptor, and changing this doesn't seem to serve any purpose. As for the case of 2.7&#x

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: Attached is a fix for 3.x. -- keywords: +patch Added file: http://bugs.python.org/file24258/gzip-fdopen.diff ___ Python tracker <http://bugs.python.org/issue13

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: As Georg suggested, it would be better to use dummy_threading.RLock, rather than providing our own implementation. The test in the patch fails when I try to run it on a no-thread build. support.import_fresh_module seems to treat the absence of the threading

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: Fix committed. For the test, it turns out we can get the desired behavior by telling import_fresh_module to block the threading module directly, instead of blocking _thread. -- resolution: -> fixed stage: patch review -> committed/rejected status

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: > As far as fixing this for 2.7 goes, i don't like the _sound_ of it > because it is gross... But i'm actually okay with having special case > code in the gzip module that rejects '' as an actual filename > and uses ''

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-18 Thread Nadeem Vawda
Nadeem Vawda added the comment: Done. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker <http://bugs.python

[issue12500] Skip test_ssl.test_connect_ex() on connection error

2012-01-24 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker <http://bugs.python.org/issue12500> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12804] "make test" fails on systems without internet access

2012-01-24 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13862] test_zlib failure

2012-01-25 Thread Nadeem Vawda
Nadeem Vawda added the comment: Do you have a self-compiled version of zlib (1.2.5) installed on this system? It looks like this is due to a (benign) version mismatch between zlib.h and the actual shared lib. -- ___ Python tracker <h

[issue13862] test_zlib failure

2012-01-25 Thread Nadeem Vawda
Nadeem Vawda added the comment: Either way, the failure should be fixed now. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending ___ Python tracker <http://bugs.python.or

<    1   2   3   4   5   6   >