[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file22411/9e367c8fd949.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Removed file: http://bugs.python.org/file22290/marshal-patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Removed file: http://bugs.python.org/file22314/marshal-patch2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12371] datetime.now() bug
New submission from olrait martinmaque...@gmail.com: Hello Everybody. I write you because I found a bug in datetime.now(). (tested in Python 2.6.6 -r266:84297, Aug 24 2010, 18:46:32-win32) This bug is that sometime doesn´t return milliseconds. The code to reproduce the bug is: you have to wait a lot of time (from 20 minutes to 2 hours) from datetime import datetime while True: a=str(datetime.now()) try: b=a.split(.)[1] print b except: print exception a=%s (if you see in this case there are not the milliseconds) % (str(a)) break I new in this . Programing and python specially. Best Regards Martin Maqueira -- files: unnamed messages: 138689 nosy: olrait priority: normal severity: normal status: open title: datetime.now() bug Added file: http://bugs.python.org/file22412/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12371 ___p class=MsoNormalfont face=Times New Roman size=3span style=FONT-SIZE: 12pt /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: ArialHello Everybody./span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: ArialI write you because I found a bug in datetime.now(). (tested in Python 2.6.6 -r266:84297, Aug 24 2010, 18:46:32-win32) This bug is that sometime doesn´t return milliseconds./span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: ArialThe code to reproduce the bug is: you have to wait a lot of time (from 20 minutes to 2 hours)/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arialfrom datetime import datetime/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arialwhile True:/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial           a=str(datetime.now())/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial           try:/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial                       b=a.split(quot;.quot;)[1]/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial                       print b/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial           except:/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial                       print quot;exception a=%s (if you see in this case there are not the milliseconds) quot; % (str(a))/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial                       break/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: ArialI new in this . Programing and python specially./span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: ArialBest Regards/span/font/pp class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arialbr/span/font/pp class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: ArialMartin Maqueira/span/font/p p class=MsoNormalfont face=Arial size=2span style=FONT-SIZE: 10pt; FONT-FAMILY: Arial /span/font/p ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12365] URLopener should support context manager protocol
Senthil Kumaran sent...@uthcode.com added the comment: well, urlopen does return an file like object for socket connection which closes itself when it goes out of scope, as you raised this bug, I think a more explicit context manager like behavior can be tried. But I am afraid that it would complex to implement with the module than it sounds. I see some example illustrated like this: http://stackoverflow.com/questions/1522636/should-i-call-close-after-urllib-urlopen import contextlib with contextlib.closing(urllib.urlopen(u)) as x: ...use x at will here... But it would be good to have this ticket as a feature request open. -- assignee: - orsenthil nosy: +orsenthil status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data
Senthil Kumaran sent...@uthcode.com added the comment: We had support for chunked transfer encoding for POST method recently, which is exposed via urllib2 wrapper function. PUT is not exposed via urllib2 and users should use httplib. This feature of chunked transfer can be added to PUT by taking the body of the message as iterable. -- assignee: - orsenthil stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12327] in HTTPConnection the are len(body) and TypeError catch exception to detect if body is file like object, this hack do work with StringIO object
Senthil Kumaran sent...@uthcode.com added the comment: Hello Stephane, I use HTTPConnection to simulate Apple Finder WebDAV client. When this WebDAV client do PUT request, it transmit data in chunked encoding mode and not set Content-Length HTTP field. Do you understand my context ? Is the server at fault in not returning Content-Length? Can you provide a full working snippet which demonstrates the bug you are facing? I fear, if I am lacking some information to completely determine what needs to be fixed (I understand the code change you suggested, but also need to know why and under what practical situation would code flow through that). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12327 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12372] semaphore errors on AIX 7.1
New submission from reshmi george reshmi...@gmail.com: The same problem that was reported in issue 9700 is appearing on AIX 7.1. The following message has been seen when running multi-process python program: sem_trywait: Permission denied sem_post: Permission denied sem_wait: Permission denied sem_post: Permission denied It can be easily corrected by defining HAVE_BROKEN_POSIX_SEMAPHORES for AIX 7, like it is done for AIX 6. -- messages: 138693 nosy: reshmi.george priority: normal severity: normal status: open title: semaphore errors on AIX 7.1 versions: Python 2.6, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12372 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12359] tutorial: Module search path description is incorrect
anatoly techtonik techto...@gmail.com added the comment: On Mon, Jun 20, 2011 at 3:42 AM, Roundup Robot rep...@bugs.python.org wrote: New changeset bf8b4c43fb94 by Senthil Kumaran in branch '3.2': Fix closes Issue12359 - Minor update to module import description. http://hg.python.org/cpython/rev/bf8b4c43fb94 1. There is a typo 'thecurrent' in this commit 2. The interpreter doesn't search current directory. The first item appended to sys.path is the directory of the importing script. -- resolution: fixed - remind status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12359] tutorial: Module search path description is incorrect
anatoly techtonik techto...@gmail.com added the comment: I attach file for testing import if anybody needs it. Move module.py to your current directory, but out of the dir with script.py and execute script.py using relative path from there. -- Added file: http://bugs.python.org/file22413/portable-test.7z ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12373] Duplicate packets in Multicast Receiver
New submission from Aleksey Zhurbitsky zhurbit...@gmail.com: I use http://svn.python.org/projects/python/trunk/Demo/sockets/mcast.py to receive multicast stream. When i run one instance of this script to receive certain multicats stream all is fine, but when i run two instance of this script simultaneously to join different multicats stream whith same port - starts mess. Each script gets his packets and packets from other multicast group. Examples of multicast groups: rtp://224.1.1.1:1234 rtp://224.1.1.2:1234 I also try to use other code to recive multicast but got the same result - http://stackoverflow.com/questions/6387535/duplicate-packets-in-python-multicast-receiver -- components: Demos and Tools, Library (Lib) messages: 138696 nosy: Aleksey Zhurbitsky priority: normal severity: normal status: open title: Duplicate packets in Multicast Receiver type: behavior versions: Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12371] datetime.now() bug
STINNER Victor victor.stin...@haypocalc.com added the comment: str(datetime object) doesn't contain a dot if obj.microsecond equals zero. You can use obj=obj.replace(microsecond=0) to create a new datetime object using microsecond=0. Or just test that str(obj) contains a dot or not. It is not a bug in Python. -- nosy: +haypo resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12371 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12367] select.error has no errno attribute
STINNER Victor victor.stin...@haypocalc.com added the comment: select_errno.patch: select.error now inherits from OSError and so have an errno attribute. I only ran the unit test on Linux, it should be tested on Windows. -- keywords: +patch Added file: http://bugs.python.org/file22414/select_errno.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12367 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11439] subversion keyword breakage
Stefan Krah stefan-use...@bytereef.org added the comment: Building matplotlib with the 2.7.2 release fails due to this issue: Traceback (most recent call last): File setup.py, line 162, in module if check_for_tk() or (options['build_tkagg'] is True): File /home/stefan/src/matplotlib-1.0.1/setupext.py, line 832, in check_for_tk (Tkinter.__version__.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion)) IndexError: list index out of range Python 2.7.2 (default, Jun 20 2011, 13:19:22) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. import Tkinter Tkinter.__version__ '$Revision$' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11439 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12367] select.error has no errno attribute
Antoine Pitrou pit...@free.fr added the comment: You can't do this outside of a PEP (see PEP 3151). -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12367 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12337] Need real TextIOWrapper for stdin/stdout
STINNER Victor victor.stin...@haypocalc.com added the comment: so there really was a bug. If fixed in 3.2.1, this issue could be closed. This issue is a duplicate of #11272: upgrade to Python 3.2.1. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12337 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11873] test_regexp() of test_compileall fails occassionally
STINNER Victor victor.stin...@haypocalc.com added the comment: What about Windows? tempfile.mkdtemp(prefix='bar') can generate ...\tmpxxbaxx\... Or compileall does first normalize the path? @r.david.murray: You reopened the issue, but you didn't answer to this question. And, is there a bug in your regex or not? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12090] 3.2: build --without-threads fails
STINNER Victor victor.stin...@haypocalc.com added the comment: Yes, this is fixed in 3.2. I just left the issue open as a reminder for the release branch. The issue is still open, can it be closed? What do you mean by release branch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12090] 3.2: build --without-threads fails
Stefan Krah stefan-use...@bytereef.org added the comment: STINNER Victor rep...@bugs.python.org wrote: Yes, this is fixed in 3.2. I just left the issue open as a reminder for the release branch. The issue is still open, can it be closed? What do you mean by release branch? This one: http://hg.python.org/releasing/3.2.1/ The issue isn't fixed there yet. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6697] Check that _PyUnicode_AsString() result is not NULL
Roundup Robot devnull@devnull added the comment: New changeset b87eac0369b5 by Victor Stinner in branch 'default': Issue #6697: _lsprof: normalizeUserObj() doesn't encode/decode (UTF-8) the http://hg.python.org/cpython/rev/b87eac0369b5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6697] Check that _PyUnicode_AsString() result is not NULL
STINNER Victor victor.stin...@haypocalc.com added the comment: I wrote a similar patch to add PyModule_GetNameObject() (I am working on another huge patch, to fix #3080) Issue #3080 added the PyModule_GetNameObject() function, so it simplify your patch. I commited your issue6697-lsprof.diff patch, I just fixed a refleak (if modname is builtins). I want to close this generic issue. I think that we fixed enough code. If you still see code not checking that _PyUnicode_AsString() result is not NULL, please open a new specific issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6697] Check that _PyUnicode_AsString() result is not NULL
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py
STINNER Victor victor.stin...@haypocalc.com added the comment: import_directory-py3k.patch: find_module_path_list() ignores silently directories matching requested filename pattern (like module_name + .py). I don't think that it is useful to emit a warning (or raise an error) here, the code checks for various file extensions, not only .pyc: .so, .pyd, ... -- Added file: http://bugs.python.org/file22415/import_directory-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12373] Duplicate packets in Multicast Receiver
Charles-François Natali neolo...@free.fr added the comment: This is normal. You're binding twice to the same port thanks to SO_REUSEADDR, but in case of multiple binds to the same UDP port, all packets received are duplicated by the kernel to every socket. Closing as invalid. -- nosy: +neologix resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12373] Duplicate packets in Multicast Receiver
Charles-François Natali neolo...@free.fr added the comment: Note that the duplication is mandatory for multicast, but with unicast the kernel is free to do whatever he wants, most of the time only one socket will receive it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12369] Revised core mentorship section of help.rst
Nick Coghlan ncogh...@gmail.com added the comment: Added (with further adjustments) to devguide in http://hg.python.org/devguide/rev/63f3521fe8f8 -- resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12356] more argument error improving
Changes by Benjamin Peterson benja...@python.org: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12356 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'
Charles-François Natali neolo...@free.fr added the comment: However, it appears to me that vast majority of them is broken anyway, because what they really mean to check is That's exactly my point. Code checking sys.platform against 'linux2' is already broken, there's no point in complicating the code further, or adding a new constant. If you want to check for a specific operating system, there's already platform.system(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12370] Use of super overwrites use of __class__ in class namespace
Nick Coghlan ncogh...@gmail.com added the comment: And to record the workaround for 3.1 and 3.2 (courtesy of Michael): Adding a _super = super alias at the module level and using the Python 2.x style long form invocation on _super() in affected methods will avoid the compiler games played when using super() directly. That is:: _super = super class X(object): def __init__(self): _super(self, X).__init__() @property def __class__(self): return int print (isinstance(X(), int)) -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12370] Use of super overwrites use of __class__ in class namespace
Barry A. Warsaw ba...@python.org added the comment: That work around seems ugly. Why not back port the fix? It doesn't seem like it could break anything and it's not even arguably a new feature, right? -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12370] Use of super overwrites use of __class__ in class namespace
Benjamin Peterson benja...@python.org added the comment: One reason is that it bumps the pyc magic number. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
vincent.chute vincent.ch...@onelan.co.uk added the comment: Since the module predates unicode strings (it is in 1.5) and since the locale string is passed to a C function, 'string' in the doc can just as well be taken to mean ascii byte string only, as the code requires. My only comment is that generally it doesn't seem reasonable to me that developer should need to investigate the history and implementation of a function in order to understand the documentation correctly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py
STINNER Victor victor.stin...@haypocalc.com added the comment: pyfile_fromfile_close.patch: patch based on issue7732_find_module_v2.diff, fixing this issue in Python 2.7 - PyFile_FromFile() closes the file on PyString_FromString() failure (note: unlikely failure) - call_find_module() doesn't close the file anymore, PyFile_FromFile() closes already the file on failure (e.g. if the path is a directory) - update PyFile_FromFile() doc to simplify that the file is closed on error -- Added file: http://bugs.python.org/file22416/pyfile_fromfile_close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11873] test_regexp() of test_compileall fails occassionally
R. David Murray rdmur...@bitdance.com added the comment: I reopened the issue because I don't know the answer to your question but suspect that it is an issue. So it needs to be checked. And the regex should be cleaned up regardless, for clarity's sake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
STINNER Victor victor.stin...@haypocalc.com added the comment: On Py3, locale.setlocale() should allow only unicode strings and reject byte strings. I agree and it is the current behaviour (of Python 3.3). I don't see any use case of a byte strings in locale.setlocale() with Python 3.3, so I remove Python 3 from the versions of this issue. -- versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
Roundup Robot devnull@devnull added the comment: New changeset d370d609d09b by Victor Stinner in branch '2.7': Close #3067: locale.setlocale() accepts a Unicode locale. http://hg.python.org/cpython/rev/d370d609d09b -- nosy: +python-dev resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12370] Use of super overwrites use of __class__ in class namespace
Barry A. Warsaw ba...@python.org added the comment: Ah okay, I didn't see that in the changeset. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
STINNER Victor victor.stin...@haypocalc.com added the comment: I fixed locale.setlocale() of Python 2.7 to accept Unicode string because it helps porting to Python 3... But I think that the commit is just useless because we will have to wait until Python 2.7.3 is released, and if you want to support older Python versions, we will have to encode the locale explicitly to ASCII. Anyway, you should move to Python 3 (3.2 or later if possible) if you want a better Unicode support. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5905] strptime fails in non-UTF locale
STINNER Victor victor.stin...@haypocalc.com added the comment: I close the issue because I am unable to reproduce it. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12359] tutorial: Module search path description is incorrect
Roundup Robot devnull@devnull added the comment: New changeset a57134dd8688 by Senthil Kumaran in branch '3.2': Fix closes Issue12359 - Removing a confusing sentence from the previous change. http://hg.python.org/cpython/rev/a57134dd8688 New changeset 18ebc7809cb2 by Senthil Kumaran in branch 'default': merge from 3.2 - Fix closes Issue12359 - Removing a confusing sentence from the previous change. http://hg.python.org/cpython/rev/18ebc7809cb2 New changeset 51ad2d4390bc by Senthil Kumaran in branch '2.7': merge 3.2 - Fix closes Issue12359 - Removing a confusing sentence from the previous change. http://hg.python.org/cpython/rev/51ad2d4390bc -- resolution: remind - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4841] io's close() not handling errors correctly
STINNER Victor victor.stin...@haypocalc.com added the comment: fileio_close.patch (for Python 3.3): Fix FileIO.__init__() to not close the file if closefd=False and the constructor is called twice (or more). -- Added file: http://bugs.python.org/file22417/fileio_close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4841] io's close() not handling errors correctly
STINNER Victor victor.stin...@haypocalc.com added the comment: fileio_close.patch should maybe use os.open() (to create the fd) and os.fstat() (to check that the fd is not closed). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12365] URLopener should support context manager protocol
Jeff McNeil j...@jmcneil.net added the comment: Isn't that snippet (contextlib.closing(...)) passing the result of urllib.urlopen to closing? The urlopen call is a factory function of sorts, so there's really no context to manage on its part? Maybe it's just a matter of making that clear? If you can share what you've got in mind, I'd love to give it a go. The urllib stuff I've done thus far has been a great way to get my feet wet! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4841] io's close() not handling errors correctly
STINNER Victor victor.stin...@haypocalc.com added the comment: Status of this issue: - io.FileIO.close() raises IOError with Python 2.7, 3.1, 3.2 and 3.3 (e.g. if the underlying file descriptor has been closed), it doesn't with Python 2.6 - If FileIO constructor is called twice, the file is closed at the second call even if closefd was False at the first call: bug in Python 2.6-3.3: fileio_close.patch fixes this bug So except fixing FileIO constructor (using fileio_close.patch) in Python 2.7, 3.2 and 3.3, there is nothing more to do. -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12374] Execution model should explain compile vs definition vs execution time
New submission from Nick Coghlan ncogh...@gmail.com: The current execution model documentation in the Language Reference doesn't clearly explain the multiple phases of code execution: 1. Compilation time (statement by statement in the main module and at the interactive prompt, all at once for module import and the exec() and compile() builtins) 2. Definition time for function statements (i.e. when the function statement itself is executed) 3. Execution time for function and generator bodies (i.e. when a function is called and when next() is invoked on a generator) -- messages: 138728 nosy: ncoghlan priority: normal severity: normal status: open title: Execution model should explain compile vs definition vs execution time ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12090] 3.2: build --without-threads fails
Georg Brandl ge...@python.org added the comment: It doesn't need to; this branch is inactive at the moment. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'
Ross Lagerwall rosslagerw...@gmail.com added the comment: That's exactly my point. Code checking sys.platform against 'linux2' is already broken, there's no point in complicating the code further, or adding a new constant. If you want to check for a specific operating system, there's already platform.system(). I would agree with this. Perhaps the documentation for sys.platform could be changed to mention that platform.system() should maybe be used instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure when prefix matches /site
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: -haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12289] http.server.CGIHTTPRequestHandler doesn't check if a Python script is executable
Senthil Kumaran sent...@uthcode.com added the comment: Both the changes suggested in the patch are fine. I think, it is okay to remove the executable function. It is undocumented as it is, and have not seen any standalone use of it. A note in NEWS can help. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6584] gzip module has no custom exception
Éric Araujo mer...@netwok.org added the comment: Ezio has found a few other things to improve (follow the “review” link to the right of the patch link). -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12374] Execution model should explain compile vs definition vs execution time
R. David Murray rdmur...@bitdance.com added the comment: Isn't 'definition time' vs 'execution time' an artificial distinction? I'm surprised that the main module is compiled differently than a regular module. Is that an artifact of the CPython implementation or a part of the language? If the latter it should certainly be documented. What are the concrete differences between 'execution time' and 'defintion time' that are missing from the language specification? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12289] http.server.CGIHTTPRequestHandler doesn't check if a Python script is executable
Roundup Robot devnull@devnull added the comment: New changeset ecef74419d55 by Victor Stinner in branch 'default': Close #12289: Fix is executable? test in the CGI server http://hg.python.org/cpython/rev/ecef74419d55 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12285] Unexpected behavior for 0 or negative processes in multiprocessing.pool()
Roundup Robot devnull@devnull added the comment: New changeset 1f171dd21bdb by Victor Stinner in branch '3.2': Issue #12285: multiprocessing.Pool() raises a ValueError if the number of http://hg.python.org/cpython/rev/1f171dd21bdb New changeset 1861683793d9 by Victor Stinner in branch 'default': (merge 3.2) Issue #12285: multiprocessing.Pool() raises a ValueError if the http://hg.python.org/cpython/rev/1861683793d9 New changeset 815263546757 by Victor Stinner in branch '2.7': Issue #12285: multiprocessing.Pool() raises a ValueError if the number of http://hg.python.org/cpython/rev/815263546757 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12285] Unexpected behavior for 0 or negative processes in multiprocessing.pool()
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write
STINNER Victor victor.stin...@haypocalc.com added the comment: My patch tries to fix interlaced read-write by always calling flush(), Why do you need to call flush()? Can't you read from the buffer? Hum, my patch does not always call flush of the reader and the writer. On read, it flushs the writer. On write, it flushes the reader (undo readahead). It is maybe possible to do better (do something faster), but there should be some tricky cases with seek(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12213 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12375] Add packages_root to sys.path for hooks
New submission from Erik Bray erik.m.b...@gmail.com: I just saw issue11637 [Add cwd to sys.path for hooks] and was reminded that this would also be useful (and in fact necessary if hook code is in a package that's under some root other than cwd). On a related matter, the current use of Distribution.package_dir is confusing. Sometimes it's assumed to be a string, though in other parts of the code it's assumed to be a dict to support multiple package dirs--something which I thought was going away. -- assignee: tarek components: Distutils2 messages: 138737 nosy: alexis, eric.araujo, erik.bray, tarek priority: normal severity: normal status: open title: Add packages_root to sys.path for hooks versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12375 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9998] find_library should search LD_LIBRARY_PATH on linux
Brian Larsen balar...@gmail.com added the comment: Hey I have this problem too. I would love to see this fixed. -- nosy: +Brian.Larsen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12213 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +amaury.forgeotdarc, belopolsky -theller title: find_library should search LD_LIBRARY_PATH on linux - ctypes find_library should search LD_LIBRARY_PATH on linux ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
Terry J. Reedy tjre...@udel.edu added the comment: Victor, the issue for 3.x, which remains, is to improve the error message. I also suggested a doc change, though I would like Mark or Martin's comments before I would make it. But I think that the commit is just useless because we will have to wait until Python 2.7.3 is released, and if you want to support older Python versions, we will have to encode the locale explicitly to ASCII. Exactly. 'Older versions' includes older versions of 2.7. This is why I suggested that making the change to 2.7 would be a feature addition, which is not permitted for the very reason you give. I think the commit should be reverted. Certainly, when a another developer says This patch should be rejected and not committed' after careful review, you should discuss, possibly on pydev, before committing. -- resolution: fixed - status: closed - open versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
Nicolas Estibals nicolas.estib...@gmail.com added the comment: Hi, Treating this as a bug is a good news, if we don't user of the function will ask for python 3.3 I also think the part concerning the Sender header is pretty clear and we can fix it easily. About the Resent-* fields, I'm not sure of the right thing to do. But I haven't found the mention of no automatic processing for them but I found that RFC 2822 specify more exactly how to use them. Contrary to the other fields, they have to be in block and the more recent block have to be at the beginning of the mail, moreover they must not be reordered during transfer. Thus I think we have to consider the first block of Resent-* fields if present. (cf. RFC 2822 third paragraph in section 3.6 and appendix A.3) However perhaps we have to wait for an answer from email-sig. I have one more concern about the send_mesage method: if the Bcc field is present this one is deleted, thus we lose information if we copy it in a sent directory for instance. What do you think about the idea that send_message method should not modify the message ? (The sent message should get rid of the Bcc header but not the one the user keep after using the method.) Best regards. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12352] multiprocessing.Value() hangs
Charles-François Natali neolo...@free.fr added the comment: Thanks for reporting this. There's indeed a bug which can lead to this deadlock. Relevant code in Lib/multiprocessing/heap.py - the BufferWrapper class uses a single Heap() shared among instances, protected by a mutex (threading.Lock), from which blocks are allocated - when a BufferedWrapper is allocated, a multiprocessing.Finalizer is installed to free the corresponding block allocated from the Heap - if another BufferedWrapper is garbage collected while the mutex protecting the Heap is held (in your case, while a new BufferedWrapper is allocated), the corresponding finalizer will try to free the block from the heap - free tries to lock the mutex - deadlock The obvious solution is to use a recursive lock instead. Could you try your application after changing: class Heap(object): _alignment = 8 def __init__(self, size=mmap.PAGESIZE): self._lastpid = os.getpid() self._lock = threading.Lock() to class Heap(object): _alignment = 8 def __init__(self, size=mmap.PAGESIZE): self._lastpid = os.getpid() - self._lock = threading.RLock() One could probably reproduce this by allocating and freeing many multiprocessing.Values, preferably with a lower GC threshold. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
R. David Murray rdmur...@bitdance.com added the comment: Section 3.6.6 says: Resent fields are strictly informational. They MUST NOT be used in the normal processing of replies or other such automatic actions on messages. Further, since there is no specified order for the headers within a block, there is no deterministic algorithmic way to determine where one block ends and the next begins. A human (or a well thought out set of heuristics) can almost always figure it out, but it isn't guaranteed to be non-ambiguous. The conclusion on the email-sig is that we should do the right thing when it is unambiguous (no or only one set of Resent- headers), and throw a ValueError if there are two copies of any Resent- header (refuse to guess). For 3.3 we could implement heuristics and provide an option to turn them on, but that is an API change and so can't go into the 3.2 fix. You have a good point about the method mutating the object passed to it. This will probably come as a surprise even if documented, so it is indeed probably better to ensure that the object is unchanged after the call. This can be done by mutating and restoring the object, but that would (I presume) not be thread safe. Better would be a generator option to skip bcc fields, but that again is an API change. I suppose that making a shallow copy of the Message object will be safe and not too inefficient. Hopefully it will work :) There are unresolved release blockers for the 3.2.1 RC, so we have at least a week to get this fixed and still make 3.2.1. Do you want to update your patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
R. David Murray rdmur...@bitdance.com added the comment: Note that that RFC language is clearly directed at automatic processing on *receipt*, not during sending. The RFC doesn't address automatic processing during sending, it leaves that the to the SMTP RFC. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12376] unittest.TextTestResult.__init__ breaks under complex __mro__
New submission from Ben Ranker bran...@emory.edu: TextTestResult.__init__(...) calls super(TextTestResult, self).__init__() with no args. If a custom TextTestResult descendant has a complex inheritance hierarchy that puts another class between TextTestResult and TestResult in the __mro__, then that class doesn't receive the common stream, descriptions, and verbosity args. If it needs them to function then the __init__ chain explodes. See attached breakunit.py for an example of this. -- components: Library (Lib) files: breakunit.py messages: 138744 nosy: branker priority: normal severity: normal status: open title: unittest.TextTestResult.__init__ breaks under complex __mro__ type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file22418/breakunit.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12376] unittest.TextTestResult.__init__ breaks under complex __mro__
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
Nicolas Estibals nicolas.estib...@gmail.com added the comment: I wasn't aware of the problem of guessing which are the correct Resent-* field, tthis does not seem to be that easy, however taking only the first one should be a good heuristic for next release. I think we now agree on the automatic processing part, this only for the receipt part and section 3.6.6 mostly means that From, To, ... fields schould be considered (not the Resent-* fields) while sending an answer for example. For our case it schould be ok to use them as long as ther is no ambiguity (only one Resent-* block). I'm ok for modifying my patch to reflect our discussion. You'll heard some news from it very soon. I'll also add the patch for not mutating the original message. After 3.2.1, I'll work on implementing the few api change you discuss this will make the code very usable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5231] Change format of a memoryview
Changes by John O'Connor tehj...@gmail.com: -- nosy: +jcon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12361] Memory Leak in File Logging
Changes by Éric Araujo mer...@netwok.org: -- versions: +Python 2.7 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12361 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12374] Execution model should explain compile vs definition vs execution time
Changes by Éric Araujo mer...@netwok.org: -- assignee: - docs@python components: +Documentation nosy: +docs@python, eric.araujo stage: - needs patch versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12375] Add packages_root to sys.path for hooks
Éric Araujo mer...@netwok.org added the comment: +1. About packages_root usage: please file another bug. I think new code to deal with packages_root was added, but internally packages_dir was not cleaned up. Another problem is that these arguments affect all modules, not only packages, and are thus misnamed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12375 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Changes by John O'Connor tehj...@gmail.com: -- nosy: +jcon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12377] Clean up packages_root option
New submission from Erik Bray erik.m.b...@gmail.com: This issue was first mentioned in issue12375. The Distribution.package_dir attribute (which also appears in a few commands) is not used in a consistent manner. Some code expects it to be a string, while other code expects it to be a dict. I believe the correct behavior now is for it to be a string, since only one root directory for Python packages is allowed in packaging. Eric Araujo also points out that packages_root and the associated package_dir attribute are misnamed: They also point to the root for any Python modules. I'm not sure what a better name would be though--I'm tempted to suggest source_dir, but that seems a little broad since it doesn't necessarily include C extension source. -- assignee: tarek components: Distutils2 messages: 138747 nosy: alexis, eric.araujo, erik.bray, tarek priority: normal severity: normal status: open title: Clean up packages_root option versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12375] Add packages_root to sys.path for hooks
Erik Bray erik.m.b...@gmail.com added the comment: Added issue12377 for packages_root/package_dir cleanup. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12375 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12377] Clean up use of packages_root/package_dir
Éric Araujo mer...@netwok.org added the comment: I would rename it modules_root, but a related discussion last summer showed that using “modules” to refer to pure Python modules, extension modules and Python packages was not 100% ideal for 100% of users. -- assignee: tarek - eric.araujo stage: - needs patch title: Clean up packages_root option - Clean up use of packages_root/package_dir ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11637] Add cwd to sys.path for hooks
Éric Araujo mer...@netwok.org added the comment: See also #12375. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11637 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12240] Allow multiple setup_hooks
Éric Araujo mer...@netwok.org added the comment: The tests were failing on builbots with an ASCII locale. The config files have to be opened with an explicit encoding='utf-8' argument. Let’s remember it for the future :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12240] Allow multiple setup_hooks
Erik Bray erik.m.b...@gmail.com added the comment: Good to know! The majority of my development is still on 2.x so it's easy to forget things like that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error
New submission from Joe Shaw js...@itasoftware.com: Start a non-SSL server on port 2525: $ python -m smtpd -n -c DebuggingServer localhost:2525 In another terminal, fire up a python interpreter and run the following code: import smtplib s = smtplib.SMTP_SSL(localhost, 2525) [...] ssl.SSLError: [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol The underlying socket connection is still open, but you can't access it or close it: $ lsof -P -p 76318 | grep 2525 Python 76318 joeshaw3u IPv4 0x09a9fb18 0t0 TCP localhost:64328-localhost:2525 (ESTABLISHED) This wreaks havoc if you're trying to write a unit test using the smtpd module and asyncore in a thread and try to clean up after yourself. The code inside SMTP_SSL looks something like this (on 2.6.5 anyway): def _get_socket(self, host, port, timeout): if self.debuglevel 0: printstderr, 'connect:', (host, port) new_socket = socket.create_connection((host, port), timeout) new_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile) self.file = SSLFakeFile(new_socket) return new_socket Something like: new_socket = socket.create_connection((host, port), timeout) try: new_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile) except: new_socket.close() raise self.file = SSLFakeFile(new_socket) return new_socket I think will do the trick. -- components: Library (Lib) messages: 138753 nosy: joeshaw priority: normal severity: normal status: open title: smtplib.SMTP_SSL leaks socket connections on SSL error type: resource usage versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12378 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error
Joe Shaw js...@itasoftware.com added the comment: From some experimentation, closing the underlying socket isn't enough. You also need to close the SSL socket, so you'd need to do something like: new_socket = socket.create_connection((host, port), timeout) ssl_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile, do_handshake_on_connect=False) try: ssl_socket.do_handshake() except: ssl_socket.close() new_socket.close() raise self.file = SSLFakeFile(ssl_socket) return ssl_socket -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12378 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12379] build outside source fail in head
New submission from Roumen Petrov bugtr...@roumenpetrov.info: correct is -I$(srcdir)/Include -- components: Build messages: 138755 nosy: rpetrov priority: normal severity: normal status: open title: build outside source fail in head versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
Roundup Robot devnull@devnull added the comment: New changeset e72a2a60316f by Victor Stinner in branch '2.7': Revert d370d609d09b as requested by Terry Jan Reedy: http://hg.python.org/cpython/rev/e72a2a60316f -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'
Martin v. Löwis mar...@v.loewis.de added the comment: So people who say sys.platform shouldn't be used: what do you propose to do with Lib/plat-linux2 (or, more generally, Lib/plat-*)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9436] test_sysconfig failure: build a 32-bit Python a 64-bit OS
Roumen Petrov bugtr...@roumenpetrov.info added the comment: The test case is bogus. Until is removed you could use CC='gcc -m32'. -- nosy: +rpetrov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9436 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'
STINNER Victor victor.stin...@haypocalc.com added the comment: what do you propose to do with Lib/plat-linux2 (or, more generally, Lib/plat-*)? What are these directories? Are they still used? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11610] Improved support for abstract base classes with descriptors
Daniel Urban urban.dani...@gmail.com added the comment: I've posted some comments on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4
Charles-François Natali neolo...@free.fr added the comment: The patch looks good to me. In the subprocess, why not use the standard 0 exit code in case of success? Also, points 1 and 3 could be handled simply by having the parent process send a signal to the child (but this wouldn't address the timeout issue). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12363 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4
Roundup Robot devnull@devnull added the comment: New changeset 968b9ff9a059 by Victor Stinner in branch 'default': Close #12363: fix a race condition in siginterrupt() tests http://hg.python.org/cpython/rev/968b9ff9a059 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12363 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4
STINNER Victor victor.stin...@haypocalc.com added the comment: In the subprocess, why not use the standard 0 exit code in case of success? Something outside my code may exit Python with the code 0. Even if it unlikely, I prefer to use uncommon exit codes, to ensure that the child process executed correctly my code. A better check would be to write a specific pattern to stdout, and check stdout, but it would be overkill. Also, points 1 and 3 could be handled simply by having the parent process send a signal to the child (but this wouldn't address the timeout issue). (Hum, points 1 and 3: have only one thread and not touch signal handling of the parent process.) True, but I would like to write a more reliable test, and I don't know how to synchronize two processes for this test case. Because your first sentence was The patch looks good to me., let's try this new test in our buildbots. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12363 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error
R. David Murray rdmur...@bitdance.com added the comment: 2.6 is in security-fix-only mode. By inspection the 2.7 and 3.x code have the same issue (though the 3.x code is very different, there still appears to be a lack of error recovery logic. Joe, do you have any interest in writing a unit test for this? I believe the necessary infrastructure already exists in test_smtpnet, though I'm not sure. -- nosy: +kasun, pitrou, r.david.murray stage: - needs patch versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12378 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x
STINNER Victor victor.stin...@haypocalc.com added the comment: Message on a stackoverflow thread: I have suffered from the same problem, even if connecting on localhost in python 2.7.1. After a day of debugging i found the cause and a workaround: Cause: BaseProxy class has thread local storage which caches the connection, which is reused for future connections causing broken pipe errors even on creating a new Manager Workaround: Delete the cached connection before reconnecting if address in BaseProxy._address_to_local: del BaseProxy._address_to_local[self.address][0].connection http://stackoverflow.com/questions/3649458/broken-pipe-when-using-python-multiprocessing-managers-basemanager-syncmanager/5884967#5884967 --- See also maybe the (closed) issue #11663: multiprocessing doesn't detect killed processes -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x
STINNER Victor victor.stin...@haypocalc.com added the comment: Connection._send_bytes() has a comment about broken pipes: def _send_bytes(self, buf): # For wire compatibility with 3.2 and lower n = len(buf) self._send(struct.pack(=i, len(buf))) # The condition is necessary to avoid broken pipe errors # when sending a 0-length buffer if the other end closed the pipe. if n 0: self._send(buf) But the OSError(32, Broken pipe) occurs on sending the buffer size (a chunk of 4 bytes: self._send(struct.pack(=i, len(buf, not on sending the buffer content. See also maybe the (closed) issue #9205: Parent process hanging in multiprocessing if children terminate unexpectedly -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x
STINNER Victor victor.stin...@haypocalc.com added the comment: Ah, submit a new task after the manager shutdown fails with OSError(32, 'Broken pipe'). Example: --- from multiprocessing.managers import BaseManager class MathsClass(object): def foo(self): return 42 class MyManager(BaseManager): pass MyManager.register('Maths', MathsClass) if __name__ == '__main__': manager = MyManager() manager.start() maths = manager.Maths() maths.foo() manager.shutdown() try: maths.foo() finally: manager.shutdown() --- This example doesn't hang, but this issue is about concurrent.futures, not multiprocessing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I think that I found a deadlock (or something like that): import concurrent.futures import faulthandler import os import signal import time def work(n): time.sleep(0.1) def main(): faulthandler.register(signal.SIGUSR1) print(pid: %s % os.getpid()) with concurrent.futures.ProcessPoolExecutor() as executor: for number, prime in executor.map(work, range(100)): print(shutdown) executor.shutdown() print(shutdown--) if __name__ == '__main__': main() Trace: Thread 0x7fbfc83bd700: File /home/haypo/prog/HG/cpython/Lib/threading.py, line 237 in wait File /home/haypo/prog/HG/cpython/Lib/multiprocessing/queues.py, line 252 in _feed File /home/haypo/prog/HG/cpython/Lib/threading.py, line 690 in run File /home/haypo/prog/HG/cpython/Lib/threading.py, line 737 in _bootstrap_inner File /home/haypo/prog/HG/cpython/Lib/threading.py, line 710 in _bootstrap Thread 0x7fbfc8bbe700: File /home/haypo/prog/HG/cpython/Lib/multiprocessing/queues.py, line 101 in put File /home/haypo/prog/HG/cpython/Lib/concurrent/futures/process.py, line 268 in _queue_management_worker File /home/haypo/prog/HG/cpython/Lib/threading.py, line 690 in run File /home/haypo/prog/HG/cpython/Lib/threading.py, line 737 in _bootstrap_inner File /home/haypo/prog/HG/cpython/Lib/threading.py, line 710 in _bootstrap Current thread 0x7fbfcc2e3700: File /home/haypo/prog/HG/cpython/Lib/threading.py, line 237 in wait File /home/haypo/prog/HG/cpython/Lib/threading.py, line 851 in join File /home/haypo/prog/HG/cpython/Lib/concurrent/futures/process.py, line 395 in shutdown File /home/haypo/prog/HG/cpython/Lib/concurrent/futures/_base.py, line 570 in __exit__ File y.py, line 17 in main File y.py, line 20 in module There are two child processes, but both are zombies (displayed as defunct by ps). Send SIGUSR1 signal to the frozen process to display the traceback (thanks to faulthandler). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12380] bytearray center, ljust, rjust don't accept a bytearray as the fill character
New submission from py.user port...@yandex.ru: bytearray(b'abc').rjust(10, b'*') bytearray(b'***abc') bytearray(b'abc').rjust(10, bytearray(b'*')) Traceback (most recent call last): File stdin, line 1, in module TypeError: must be a byte string of length 1, not bytearray -- components: Interpreter Core messages: 138769 nosy: py.user priority: normal severity: normal status: open title: bytearray center, ljust, rjust don't accept a bytearray as the fill character type: behavior versions: Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12380 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character
Changes by py.user port...@yandex.ru: -- title: bytearray center, ljust, rjust don't accept a bytearray as the fill character - bytearray methods center, ljust, rjust don't accept a bytearray as the fill character ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12380 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12381] bytearray methods count, find, index don't support None as in slice notation
New submission from py.user port...@yandex.ru: bytearray(b'abc').count(bytearray(b''), None) Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must be integers or None or have an __index__ method bytearray(b'abc').find(bytearray(b''), None) Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must be integers or None or have an __index__ method bytearray(b'abc').index(bytearray(b''), None) Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must be integers or None or have an __index__ method and duplicate issues (endswith and startswith): bytearray(b'abc').endswith(bytearray(b''), None) Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must be integers or None or have an __index__ method bytearray(b'abc').startswith(bytearray(b''), None) Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must be integers or None or have an __index__ method -- components: Interpreter Core messages: 138770 nosy: py.user priority: normal severity: normal status: open title: bytearray methods count, find, index don't support None as in slice notation type: behavior versions: Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12381 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com