[issue16718] Mysterious atexit fail
Amaury Forgeot d'Arc added the comment: I don't know, you should probably ask there. One blocker is to make builtin and extension modules participate in GC, search pep3121 to see the many intermediate issues. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16734] Delay interpreter startup phase until script is read
Charles-François Natali added the comment: I may be missing something, but nothing's wrong here. When you start a subprocess, the child process keeps running (in background). If you want to wait for its termination, just use p.wait() or p.communicate(). -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
New submission from Bohuslav Slavek Kabrda: When I use zipfile.is_zipfile on file fastjar (sample uploaded at [1]) from libgcj, I get True, while I should get False (reproducible with fastjar from libgcj 4.7.2 on Fedora 18). This is caused by stringEndArchive string being present in the file, but the file still isn't zip. Would it be possible to add some further checks to eliminate this kind of errors? I'd like to submit a patch but I'm not sure what to check for, maybe some other constants mentioned in the ZIP format definition? Thanks a lot. [1] http://bkabrda.fedorapeople.org/fastjar -- components: Library (Lib) messages: 177804 nosy: bkabrda priority: normal severity: normal status: open title: zipfile.is_zipfile wrongly recognizes non-zip as zip versions: Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16733] Solaris ctypes_test failures
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16733 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16734] Delay interpreter startup phase until script is read
Serhiy Storchaka added the comment: You should use some kind of inter-process communication to synchronize your processes. In particular, for get rid of a temporary script file you can either send script via pipe: p = Popen([sys.executable], stdin=PIPE) p.stdin.write(longscript) or use it as a program argument: p = Popen([sys.executable, '-c', longscript]) -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
Serhiy Storchaka added the comment: You can upload a sample file on bug tracker. Actually jar files are just zip files (with some limitation and special files). zipfile.is_zipfile should return True on a jar file. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14373] C implementation of functools.lru_cache
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
Bohuslav Slavek Kabrda added the comment: Oh, sorry, I will upload it on the bugtracker next time. I know that jar files are zip files, but this is not a jar (although it has jar in file). This is a binary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13863 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14373] C implementation of functools.lru_cache
Serhiy Storchaka added the comment: Thanks, Alexey. However most of my comments were not considered. I have repeated them and added some new comments. -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12876] Make Test Error : ImportError: No module named _sha256
Encolpe DEGOUTE added the comment: I my experience this error comes when SASL headers are missing during the build. Under debian or ubuntu it's the package named libsasl2-dev. -- nosy: +encolpe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Serhiy Storchaka added the comment: Sorry, I forgot push a Publish All My Drafts button. Please consider other my comments to first patch. I also have added new comments about length_hint(). Your implementation of attrgetter() looks good. One possible disadvantage of pure functional approach is that attrgetter() will be not a class. Unlikely someone subclass attrgetter, but it can be used in an isinstance() check. You solve this issue. The same approach can be applied to itemgetter(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14373] C implementation of functools.lru_cache
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: -nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16736] select.poll() converts long to int without checking for overflow
New submission from Richard Oudkerk: Relevant code: int timeout = 0, poll_result, i, j; ... tout = PyNumber_Long(tout); if (!tout) return NULL; timeout = PyLong_AsLong(tout); -- implicit cast to int -- messages: 177811 nosy: sbt priority: normal severity: normal status: open title: select.poll() converts long to int without checking for overflow type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3
Serhiy Storchaka added the comment: A simplest solution is to raise a TclError instead of ValueError for non-BMP characters. This should not break any existing code, because a user code should be ready to catch a TclError in any case. Here is a patch. A more complicated solution is to add ValueError to any catch of TclError. And this will fix only IDLE, user programs should fix self every. Also we can silently encode non-BMP characters for Tcl with UTF-16 (and decode a result back). This can cause some subtle errors with shifted indices however. -- keywords: +patch nosy: +serhiy.storchaka versions: +Python 2.7 Added file: http://bugs.python.org/file28376/tkinter_nobmp_error.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16736] select.poll() converts long to int without checking for overflow
Serhiy Storchaka added the comment: This is a part of issue15989. -- nosy: +serhiy.storchaka resolution: - duplicate superseder: - Possible integer overflow of PyLong_AsLong() results ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16737] Different behaviours in script run directly and via runpy.run_module
New submission from Vinay Sajip: If a script is run directly, the value of __file__ in it is relative to the current directory. If run via runpy.run_module, the value of __file__ is an absolute path. This is a problem in certain scenarios - e.g. if the script is a distribution's setup.py, a lot of distributions (rightly or wrongly) assume that the __file__ in setup.py will be relative, and mess up if it's absolute. Example: # script.py print(__file__, __name__) #runscript.py import runpy runpy.run_module('script', run_name='__main__') Example output (2.7): $ python script.py ('script.py', '__main__') $ python runscript.py ('/home/vinay/projects/scratch/script.py', '__main__') Example output (3.2): $ python3.2 script.py script.py __main__ $ python3.2 runscript.py /home/vinay/projects/scratch/script.py __main__ -- components: Library (Lib) messages: 177814 nosy: ncoghlan, vinay.sajip priority: normal severity: normal status: open title: Different behaviours in script run directly and via runpy.run_module type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6514] python -m unittest testmodule does not run any tests
anatoly techtonik added the comment: The documentation should be fixed then: http://docs.python.org/2/library/unittest#command-line-interface -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6514 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue879399] socket line buffering
Kristján Valur Jónsson added the comment: New patch, with unittest. -- Added file: http://bugs.python.org/file28377/_fileobject.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue879399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16738] Comparisons difference: bytes with bytes, str with str
New submission from Ivan Bykov: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. b = b't' b[0] in [b] False u = 't' u[0] in [u] True -- messages: 177817 nosy: ivb priority: normal severity: normal status: open title: Comparisons difference: bytes with bytes, str with str type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16737] Different behaviours in script run directly and via runpy.run_module
Serhiy Storchaka added the comment: $ ./python -m script /home/serhiy/py/cpython/script.py __main__ $ ./python -c import runpy; runpy.run_path('script.py', run_name='__main__') script.py __main__ This looks consistent. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16738] Comparisons difference: bytes with bytes, str with str
Christian Heimes added the comment: That's the correct behaviour. Iteration and item access of bytes don't return bytes but a small number, e.g. b[0] returns 116 and not b't'. b = b't' b[0] in [b] False b[0] 116 ord(b) 116 But: b in [b] True -- nosy: +christian.heimes resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2721] unittest.makeSuite undocumented and obsolete - but what to use instead?
anatoly techtonik added the comment: What about? suite = unittest.makeSuite(SConfTestCase, 'test_') -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16734] Delay interpreter startup phase until script is read
Christian Heimes added the comment: That's the way fork() and the subprocess module work. Please follow Serhiy's advice. -- nosy: +christian.heimes resolution: - rejected stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16692] Support TLS 1.1 and TLS 1.2
Changes by Christian Heimes li...@cheimes.de: -- components: +Extension Modules nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16692 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16736] select.poll() converts long to int without checking for overflow
Richard Oudkerk added the comment: Thanks. I will close. -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16727] Windows installers for 2.7.3 don't install python27.dll correctly
Christian Heimes added the comment: On my Windows box the 32bit python27.dll is in C:\Windows\System32\ and the 64bit DLL is in c:\Windows\SysWOW64\. Can you recall the installation order, did you install the 32 or 64bit version first? Did you choose install for all users for both installations? Which version of Windows are you running (release and service pack)? For some applications like COM the DLL must be installed the system directory. -- nosy: +christian.heimes, loewis type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16737] Different behaviours in script run directly and via runpy.run_module
Vinay Sajip added the comment: I'd use runpy.run_path if I could, but it's not available on Python 2.6 - that's why I'm using run_module. A lot of setup.py files out there use __file__ to compute additional package names, package data locations etc. - this can lead to bogus package names computed blindly from paths assumed to be relative, when the setup.py file is run using run_module. I'm not sure what you mean when you say looks consistent - ISTM there is a difference, i.e. inconsistency, between a direct run and a run via run_module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16737] Different behaviours in script run directly and via runpy.run_module
Serhiy Storchaka added the comment: I'm just pointing that run_module() and run_path() differs in the same way as `python -m` and `python`. If you want to change behavior of run_module(), then you should to change behavior of `python -m` too. And I'm not sure that this change will not break a lot of third-part code. Try to backport run_path() to 2.6 if you need it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16727] Windows installers for 2.7.3 don't install python27.dll correctly
Martin v. Löwis added the comment: Are you sure that the file in SysWOW64 is a 64-bit binary? On Win64, system32 contains the 64-bit DLLs, and SysWOW64 contains the 32-bit DLLs: http://en.wikipedia.org/wiki/WoW64#Registry_and_file_system Indeed, on my system, it's exactly reversed to what Christian reports. I'm closing this report as invalid: I can't see a problem in Keith original message. *Of course* the x86 installer won't install to system32 on a Win64 system; this is correct behavior. Of course, the 64-bit installer should install to system32, this is what it should do. It should *not* install to SysWOW64. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16727] Windows installers for 2.7.3 don't install python27.dll correctly
Christian Heimes added the comment: No, I'm not sure. I peaked into python27.dll in system32 and saw that it refers to kernel32.dll. I guess I made the wrong conclusion ... You have to admit that the naming convention is a tiny bit confusion. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16727] Windows installers for 2.7.3 don't install python27.dll correctly
Keith Sabine added the comment: Well all I can say is having installed BOTH the 32 and 64 bit versions, I found I only had the 32 bit dll installed. I can raise a second issue for the request to put a copy of the dll in the DLL directory, so that it's easier to locate the correct dll if needed to ship with an embedded python application. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14901] Python Windows FAQ is Very Outdated
Ashish Nitin Patil added the comment: Always happy to contribute! My first! Looking forward to getting accustomed to it doing my part for python. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14901 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
R. David Murray added the comment: I'm imagining that it creates jar files, and thus has the signature as a constant. The is_zipfile check is much more complicated than just looking for that string, though, so what is going on must be even more perverse than that. It would be interesting to know if other zip tools have an issue with it, although be careful when comparing, since is_zipfile only does the initial check, whereas running another unzip tool against it may produce an error, but only later in the process (after the zip tool has decided it is a zip file and tries to process it). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
Serhiy Storchaka added the comment: $ zipinfo fastjar Archive: fastjar Zip file size: 47664 bytes, number of entries: 31883 [fastjar]: Zipfile is disk 33807 of a multi-disk archive, and this is not the disk on which the central zipfile directory begins (disk 190). I.e. zipinfo detects fastjar as a zip file, but fails to read a contents (`unzip -l fastjar` and `python -m zipinfo -l fastjar` fail too). The file contains an obviously incorrect values in the control structures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Serhiy Storchaka added the comment: There are a lot of people in the nosy list already. Does anyone have enough experience with exception machinery to review the patch (especially C part)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16739] texttestresult should decorate the stream with _WritelnDecorator
New submission from Leo Arias: Using the unittest's texttestresult with stdout and verbosity 2 will fail because that stream doesn't have a writeln method. File /usr/lib/python2.7/unittest/suite.py, line 108, in run test(result) File /usr/lib/python2.7/unittest/suite.py, line 70, in __call__ return self.run(*args, **kwds) File /usr/lib/python2.7/unittest/suite.py, line 108, in run test(result) File /usr/lib/python2.7/unittest/suite.py, line 70, in __call__ return self.run(*args, **kwds) File /usr/lib/python2.7/unittest/suite.py, line 108, in run test(result) File /usr/lib/python2.7/dist-packages/unittest2/case.py, line 398, in __call__ return self.run(*args, **kwds) File /usr/lib/python2.7/dist-packages/unittest2/case.py, line 375, in run result.addSuccess(self) File /home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py, line 253, in addSuccess return self._dispatch('addSuccess', test, details=details) File /home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py, line 231, in _dispatch for result in self._results) File /home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py, line 231, in genexpr for result in self._results) File /home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py, line 555, in addSuccess return self.decorated.addSuccess(test) File /usr/lib/python2.7/unittest/runner.py, line 60, in addSuccess self.stream.writeln(ok) AttributeError: 'file' object has no attribute 'writeln' It would be nice if the stream is decorated with _WritelnDecorator, as it is done on TextTestRunner. -- components: Library (Lib) messages: 177833 nosy: elopio priority: normal severity: normal status: open title: texttestresult should decorate the stream with _WritelnDecorator type: enhancement versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16739 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
R. David Murray added the comment: So, it looks like this is not a bug in Python, just a weirdness of fastjar. Or, if you prefer, a bug in fastjar (they could assemble the signature instead of coding it as a single constant). -- resolution: - invalid stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
Serhiy Storchaka added the comment: It's rather a bug in the ZIP format design. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
R. David Murray added the comment: Well, yes, but that ship has already sunk :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16480] pyvenv 3.3 fails to create symlinks for virtualenv/local/{bin, lib} to virtualenv/{bin, lib}
Matthias Klose added the comment: having the posix_prefix as the default in Debian is an oversight on my side. it always should be posix_local. I'll fix this at least for 3.3 in current development releases. The rationale for this is that distutils based installs install by default into the path which is used by the distributor and get in conflict with the packages distributed by Debian/Ubuntu. At one of the language summits in Chicago I asked that the default installation target should be changed to the user dir, but this idea was rejected. Therefore you do have two site directories, called /usr/lib/pythonX.Y/dist-packages /usr/local/lib/pythonX.Y/dist-packages The renaming from site to dist was done to not conflict with a default python installation (without any configure parameters). The default install should go to /usr/local, packagers for Debian usually should use the Debian local distutils option --install-layout=deb. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Serhiy Storchaka added the comment: Patch updated with Benjamin's nit. -- Added file: http://bugs.python.org/file28378/bufferedio_finally_close_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16480] pyvenv 3.3 fails to create symlinks for virtualenv/local/{bin, lib} to virtualenv/{bin, lib}
Vinay Sajip added the comment: Even when posix_local becomes the default scheme on Debian python builds, it's not clear whether the suggested fix is the correct one to make, unless posix_local is added to sysconfig's list of _INSTALL_SCHEMES. Matthias comment makes sense when considering system-wide installs, but when installing into a venv, these considerations don't seem to apply. Technically the change is not hard to do, but I'm a little uncomfortable whether it's the right thing to do, as it's only for a specific Linux distribution, and it seems a bit of a kludge. Although the ideal situation is for software not to care whether it's running in a venv, I'm not sure whether installers like pip/distribute need to be completely ignorant of whether they're installing in a venv. For example, the posix_local scheme says that the site-packages directory is to be called 'dist-packages', which seems unnecessary in a venv since its purpose is really for system-wide installations. Yet, virtualenv names the directory 'site-packages', so it appears not to be following the scheme faithfully as far as that part of it is concerned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Roundup Robot added the comment: New changeset b0602a1eb3f6 by Benjamin Peterson in branch '3.3': call close on the underlying stream even if flush raises (closes #16597) http://hg.python.org/cpython/rev/b0602a1eb3f6 New changeset 142012e47c3b by Benjamin Peterson in branch 'default': merge 3.3 (#16597) http://hg.python.org/cpython/rev/142012e47c3b -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Serhiy Storchaka added the comment: Here is a patch for 3.2. -- Added file: http://bugs.python.org/file28380/bufferedio_finally_close-3.2_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16739] texttestresult should decorate the stream with _WritelnDecorator
Leo Arias added the comment: A test with a fix. I'm not sure if this is the way to go, because the stream in TextTestRunner will be decorated twice. -- keywords: +patch Added file: http://bugs.python.org/file28379/fix-16739-texttestresult_writeln.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16739 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Serhiy Storchaka added the comment: Here is a patch for 2.7. -- Added file: http://bugs.python.org/file28381/bufferedio_finally_close-2.7_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6514] python -m unittest testmodule does not run any tests
Berker Peksag added the comment: The documentation should be fixed then: http://docs.python.org/2/library/unittest#command-line-interface The documentation already covers that python -m unittest test_module usage works only in 2.7+. Changed in version 2.7: In earlier versions it was only possible to run individual test methods and not modules or classes. -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6514 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16739] texttestresult should decorate the stream with _WritelnDecorator
Michael Foord added the comment: TextTestResult could decorate a raw stream (and not redecorate an already decorated one). -- assignee: - michael.foord nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16739 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Benjamin Peterson added the comment: I think we can leave 3.2 alone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Roundup Robot added the comment: New changeset b6ff6ac1f049 by Benjamin Peterson in branch '2.7': call close on the underlying stream even if flush raises (#16597) http://hg.python.org/cpython/rev/b6ff6ac1f049 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16480] pyvenv 3.3 fails to create symlinks for virtualenv/local/{bin, lib} to virtualenv/{bin, lib}
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Serhiy Storchaka added the comment: What is the peculiarity of 3.2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16480] pyvenv 3.3 fails to create symlinks for virtualenv/local/{bin, lib} to virtualenv/{bin, lib}
Matthias Klose added the comment: virtualenv for 2.7, when used with a Debian/Ubuntu system installation, should only see site-packages. Same thing should be done for venv for 3.3 and up. Even if needed patches will not go upstream, they are welcome. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6514] python -m unittest testmodule does not run any tests
anatoly techtonik added the comment: The documentation already covers that python -m unittest test_module usage works only in 2.7+. Changed in version 2.7: In earlier versions it was only possible to run individual test methods and not modules or classes. But the command line help says otherwise: $ python -m unittest -h Usage: unittest.py [options] [test] [...] Options: -h, --help Show this message -v, --verboseVerbose output -q, --quiet Minimal output Examples: unittest.py - run default set of tests unittest.py MyTestSuite - run suite 'MyTestSuite' unittest.py MyTestCase.testSomething - run MyTestCase.testSomething unittest.py MyTestCase- run all 'test*' test methods in MyTestCase $ python --version Python 2.6.6 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6514 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Serhiy Storchaka added the comment: About Misc/NEWS. Actually fixed close() methods of: Python implementation of BaseIO (C implementation already do right things), C implemettation of Buffered(Reader|Writer|Random) (Python implementation already do right things) and both implementations of TextIOWrapper. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Roundup Robot added the comment: New changeset 54372f38932e by Benjamin Peterson in branch '3.3': improve message (#16597) http://hg.python.org/cpython/rev/54372f38932e New changeset faaac6ce by Benjamin Peterson in branch 'default': merge 3.3 (#16597) http://hg.python.org/cpython/rev/faaac6ce New changeset a057d9985fb8 by Benjamin Peterson in branch '2.7': add news note (#16597) http://hg.python.org/cpython/rev/a057d9985fb8 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Serhiy Storchaka added the comment: Thank you for all commits, Benjamin. What is the peculiarity of 3.2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16597] file descriptor not being closed with context manager on IOError when device is full
Benjamin Peterson added the comment: 2012/12/20 Serhiy Storchaka rep...@bugs.python.org: Serhiy Storchaka added the comment: Thank you for all commits, Benjamin. What is the peculiarity of 3.2? Applying bugfixes is optional. It should move to security-fix mode soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8853] getaddrinfo should accept port of type long
Roundup Robot added the comment: New changeset 39803c20c9bf by Petri Lehtinen in branch '2.7': #8853: Allow port to be of type long for socket.getaddrinfo() http://hg.python.org/cpython/rev/39803c20c9bf -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8853] getaddrinfo should accept port of type long
Petri Lehtinen added the comment: Fixed. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16687] Fix small gramatical error and add reference link in hashlib documentation
Jeff Knupp added the comment: Previous patch had unintentional local changes. Uploaded correct patch. -- Added file: http://bugs.python.org/file28382/new_patch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16687] Fix small gramatical error and add reference link in hashlib documentation
Changes by Jeff Knupp jkn...@gmail.com: Removed file: http://bugs.python.org/file28318/patch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16718] Mysterious atexit fail
Richard Oudkerk added the comment: Perhaps the simplest thing would be to stop doing anything special when a module is garbage collected: the garbage collector can take care of any orphaned ref-cycles involving the module dict. Then at shutdown the remaining modules in sys.modules could have their dicts purged in the old way. This would be orthogonal to issue812369. In fact Armin's original post says that this is a change worth investigating, though his patch does not do it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4071] ntpath.abspath fails for long str paths
Changes by Serhiy Storchaka storch...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11383] compilation seg faults on insanely large expressions
Serhiy Storchaka added the comment: This bug does not reproduced on 3.3+ more as it was fixed in issue5765. But it is yet here in 2.7 and 3.2. -- versions: +Python 2.7, Python 3.2 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11383] compilation seg faults on insanely large expressions
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11383] compilation seg faults on insanely large expressions
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16740] Types created with PyType_FromSpec lack a __module__ attribute.
New submission from Bradley Froehle: Types created using PyType_FromSpec do not have a __module__ attribute by default. This caught me off guard. $ python3 Python 3.2.3 (default, Oct 19 2012, 20:10:41) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. import xxlimited xxlimited.Null.__module__ Traceback (most recent call last): File stdin, line 1, in module AttributeError: __module__ Do we expect module authors to set the __module__ attribute immediately after calling PyType_FromSpec? To refresh your memory, non-heap types determine the module/name combo according to something like:: try: __module__, __name__ = tp_name.rsplit('.', 1) except ValueError: __module__, __name__ = 'builtins', tp_name whereas heap types use something like:: __name__ = tp_name @property def __module__(self): return self.__dict__['__module__'] I think this is unnecessarily confusing, and, as far as I know, not documented anywhere. I see from reading the commit logs that it was felt that by allowing users to set __name__ (and therefore tp_name), it could have an unintended impact on the value __module__. If so, why didn't we just disallow setting __name__? There are likely some unintended impacts of this decision, for example weird error message in other library functions: import inspect inspect.getfile(xxlimited.Null) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.2/inspect.py, line 415, in getfile object = sys.modules.get(object.__module__) AttributeError: __module__ Is there anything we can do here? -- components: Interpreter Core messages: 177860 nosy: bfroehle priority: normal severity: normal status: open title: Types created with PyType_FromSpec lack a __module__ attribute. type: behavior versions: Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16740 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16740] Types created with PyType_FromSpec lack a __module__ attribute.
Bradley Froehle added the comment: For example, in PyType_FromSpec can we split the provided name into a module component and name component, and create the '__module__' entry in the dict? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16740 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16740] Types created with PyType_FromSpec lack a __module__ attribute.
Bradley Froehle added the comment: I see this has already been fixed in Python 3.3. My apologies. -- resolution: - invalid status: open - closed versions: -Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16740 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16741] `int()`, `float()`, etc think python strings are null-terminated
New submission from ganges master: I'm not sure if it's a bug or just an inconvenience, but when a string containing \x00 is passed to int/float/etc, they return a misleading exception: int(abc) Traceback (most recent call last): File stdin, line 1, in module ValueError: invalid literal for int() with base 10: 'abc' int(\x00abc) Traceback (most recent call last): File stdin, line 1, in module ValueError: invalid literal for int() with base 10: '' float(\x00abc) Traceback (most recent call last): File stdin, line 1, in module ValueError: could not convert string to float: I noticed the code does actually try to handle it: http://hg.python.org/cpython/file/39803c20c9bf/Objects/intobject.c#l1066 but still, the reported error is very misleading. -- components: Interpreter Core messages: 177863 nosy: gangesmaster priority: normal severity: normal status: open title: `int()`, `float()`, etc think python strings are null-terminated type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16741] `int()`, `float()`, etc think python strings are null-terminated
Changes by Benjamin Peterson benja...@python.org: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16687] Fix small gramatical error and add reference link in hashlib documentation
Changes by Benjamin Peterson benja...@python.org: -- versions: +Python 3.3, Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16687] Fix small gramatical error and add reference link in hashlib documentation
Roundup Robot added the comment: New changeset abfd3bc38b5d by Benjamin Peterson in branch '3.3': fix typo (#16687) http://hg.python.org/cpython/rev/abfd3bc38b5d New changeset 95cb2f09ac50 by Benjamin Peterson in branch 'default': merge 3.3 (closes #16687) http://hg.python.org/cpython/rev/95cb2f09ac50 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Zachary Ware added the comment: Here's v4, addressing Serhiy's comments on Reitveld. -- Added file: http://bugs.python.org/file28383/py_operator.v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip
Bohuslav Slavek Kabrda added the comment: Tried is_zipfile on /usr/bin/zip and it returns True, too, so it seems that this is a more general problem for zip-handling binaries... Anyway, thank you both, I agree that there is not much that can be done here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com