[issue14894] distutils.LooseVersion fails to compare number and a word
New submission from Natalia : $ python2.7 -c 'from distutils.version import LooseVersion as V; print V("a") > V("1")' True $ python3.2 -c 'from distutils.version import LooseVersion as V; print(V("a") > V("b"))' False $ python3.2 -c 'from distutils.version import LooseVersion as V; print(V("a") > V("1"))' Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.2/distutils/version.py", line 70, in __gt__ c = self._cmp(other) File "/usr/lib/python3.2/distutils/version.py", line 343, in _cmp if self.version < other.version: TypeError: unorderable types: str() < int() -- assignee: eric.araujo components: Distutils messages: 161453 nosy: Natalia, eric.araujo, tarek priority: normal severity: normal status: open title: distutils.LooseVersion fails to compare number and a word type: behavior versions: Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue14894> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14894] distutils.LooseVersion fails to compare number and a word
Natalia added the comment: Hello, as a GSoC student, I'm working on PyPI to Debian repository converter. I wanted to compare versions of packages available in PyPI and it broke while comparing appwsgi, wsgi-design ('default') and gar ('prototype.1') versions. -- ___ Python tracker <http://bugs.python.org/issue14894> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14894] distutils.LooseVersion fails to compare number and a word
Natalia added the comment: Hi, I'm attaching a patch that fixes this issue:) -- keywords: +patch Added file: http://bugs.python.org/file25807/14894.patch ___ Python tracker <http://bugs.python.org/issue14894> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14894] distutils.LooseVersion fails to compare number and a word
Natalia added the comment: I had a wrong return value in one of unit tests, fixed. -- Added file: http://bugs.python.org/file25808/14894.patch ___ Python tracker <http://bugs.python.org/issue14894> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14894] distutils.LooseVersion fails to compare number and a word
Changes by Natalia : Removed file: http://bugs.python.org/file25807/14894.patch ___ Python tracker <http://bugs.python.org/issue14894> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)
New submission from Natalia B. Bidart : If libreadline-dev was installed after configure was run, and the latter is not re-run, test_readline fails with: [1/1] test_readline test test_readline failed -- Traceback (most recent call last): File "/home/nessita/pycon/sprint/cpython/Lib/test/test_readline.py", line 16, in testHistoryUpdates readline.clear_history() AttributeError: 'module' object has no attribute 'clear_history' 1 test failed: test_readline -- components: Tests messages: 130817 nosy: nessita priority: normal severity: normal status: open title: test_readline fails when readline was installed after running configure (and was not re-run) type: crash versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue11496> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)
Natalia B. Bidart added the comment: I'm working on a patch. -- ___ Python tracker <http://bugs.python.org/issue11496> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)
Natalia B. Bidart added the comment: Trivial patch to skip the test if module 'readline' doesn't have the 'clear_history' attr. -- keywords: +patch Added file: http://bugs.python.org/file21115/pycon-issue11496.patch ___ Python tracker <http://bugs.python.org/issue11496> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib
New submission from Natalia B. Bidart : When running the test suite, if zlib is not available, we get this failure: [1/1] test_zipfile test test_zipfile failed -- Traceback (most recent call last): File "/home/nessita/pycon/sprint/cpython/Lib/test/test_zipfile.py", line 498, in test_unicode_filenames zipfp.open(name).close() File "/home/nessita/pycon/sprint/cpython/Lib/zipfile.py", line 978, in open close_fileobj=not self._filePassed) File "/home/nessita/pycon/sprint/cpython/Lib/zipfile.py", line 487, in __init__ self._decompressor = zlib.decompressobj(-15) AttributeError: 'NoneType' object has no attribute 'decompressobj' 1 test failed: test_zipfile -- components: Tests messages: 130831 nosy: nessita priority: normal severity: normal status: open title: test_zipfile.test_unicode_filenames should be skipped of no zlib type: crash versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue11498> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib
Natalia B. Bidart added the comment: Trivial patch to skip the aforementioned test. -- keywords: +patch Added file: http://bugs.python.org/file21118/pycon-issue11498.patch ___ Python tracker <http://bugs.python.org/issue11498> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)
Natalia B. Bidart added the comment: Attaching patch with improved skip message as per David's comment. -- Added file: http://bugs.python.org/file21119/pycon-issue11496.patch ___ Python tracker <http://bugs.python.org/issue11496> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11501] distutils.archive_util should handle absence of zlib module
New submission from Natalia B. Bidart : When creating a zipfile, the code: zip = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED) does not handle the potential RuntimeError casued by: "If ZIP_DEFLATED is specified but the zlib module is not available, RuntimeError is also raised." -- assignee: tarek components: Distutils2 messages: 130847 nosy: alexis, eric.araujo, nessita, tarek priority: normal severity: normal status: open title: distutils.archive_util should handle absence of zlib module type: crash versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue11501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11501] distutils.archive_util should handle absence of zlib module
Natalia B. Bidart added the comment: Attaching patch that performs the following: * skip all the distutils tests that need zlib in order to run properly. * add a new test (test_make_zipfile_no_zlib) to ensure that make_zipfile uses the compression option from zipfile module that works without zlib. * add a helper method to patch objects. The fix itself was discussed with Tarek, and the patch helper implementation was discussed with Michael Foord. -- components: +Distutils -Distutils2 keywords: +patch Added file: http://bugs.python.org/file21137/pycon-issue11501.patch ___ Python tracker <http://bugs.python.org/issue11501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11501] distutils.archive_util should handle absence of zlib module
Natalia B. Bidart added the comment: Hi Éric, Thanks for looking at the patch. I'm not using "if zlib is not None" since the archive_utils module never explicitly imports zlib. Only the zipfile module imports zlib and raises RuntimeError if not available (as per http://docs.python.org/library/zipfile.html#zipfile-objects). I'm changing the patch function to raise an exception as requested. -- versions: -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue11501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11501] distutils.archive_util should handle absence of zlib module
Natalia B. Bidart added the comment: * Added change notice to Misc/NEWS. * changed patch method implementation so AttributeError is raised when trying to patch a non-existent attribute for an object (see Éric's comment). -- Added file: http://bugs.python.org/file21142/pycon-issue11501.patch ___ Python tracker <http://bugs.python.org/issue11501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11501] distutils.archive_util should handle absence of zlib module
Natalia B. Bidart added the comment: On Tue, Mar 15, 2011 at 7:15 AM, Éric Araujo wrote: > > Éric Araujo added the comment: > >> I'm not using "if zlib is not None" since the archive_utils module >> never explicitly imports zlib. > > Well, you can import zlib in that module too to detect in advance whether > zipfile will work. Indeed, but from my POV that's less cleaner than the proposed solution: importing a module that is not used (other than checking for a condition) may generate confusion to a reader. IMHO, the proposed solution may ease the readability of the code block by being super-explicit about what condition is being handled when creating the ZipFile. Let me know if you still consider I should change that. -- ___ Python tracker <http://bugs.python.org/issue11501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11501] distutils.archive_util should handle absence of zlib module
Natalia B. Bidart added the comment: Attaching a new patch with latest changes from trunk merged in (conflicts resolved). -- Added file: http://bugs.python.org/file21211/pycon-issue11501.patch ___ Python tracker <http://bugs.python.org/issue11501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11557] Increase coverage in logging module
New submission from Natalia B. Bidart : Current coverage is: Name Stmts Miss Cover -- Lib/logging/__init__ 73916278% Lib/logging/config 571 9883% Lib/logging/handlers 60132546% -- TOTAL 191158569% -- components: Tests messages: 130983 nosy: nessita priority: normal severity: normal status: open title: Increase coverage in logging module type: resource usage versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue11557> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11557] Increase coverage in logging module
Natalia B. Bidart added the comment: Attaching a patch that increases test coverage for logging/__init__.py by 12%. There are still a lot more to do, but this pacth is big enough. -- keywords: +patch Added file: http://bugs.python.org/file21249/pycon-issue11557.patch ___ Python tracker <http://bugs.python.org/issue11557> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11557] Increase coverage in logging module
Natalia B. Bidart added the comment: I'll work on a fix during next weekend (sooner if I have an open slot). -- ___ Python tracker <http://bugs.python.org/issue11557> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint
Changes by Natalia B. Bidart : -- nosy: +nessita ___ Python tracker <http://bugs.python.org/issue22293> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6994] enumerate dosctring has a typo
New submission from Natalia B. Bidart : Current docstring states: Return an enumerate object. iterable must be an other object that supports iteration. It should be: Return an enumerate object. iterable must be another object that supports iteration. -- assignee: georg.brandl components: Documentation messages: 93109 nosy: georg.brandl, nessita severity: normal status: open title: enumerate dosctring has a typo versions: Python 2.6 ___ Python tracker <http://bugs.python.org/issue6994> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com