[ python-Bugs-1516184 ] inspect.py: still infinite recursion inspecting frames
Bugs item #1516184, was opened at 2006-07-03 10:39
Message generated for change (Comment added) made by dq_searchlores
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1516184&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Don Quijote (dq_searchlores)
Assigned to: Phillip J. Eby (pje)
Summary: inspect.py: still infinite recursion inspecting frames
Initial Comment:
Using python 2.5 beta 1 on Windows XP, and py2exe 0.6.5.
After packing and compressing a project via py2exe,
there's still an infinite recursion involving functions
getsourcefile, getmodule and getabsfile in module
inspect.py.
I was able to fix this infinite recursion by
1) changing the declaration of getabsfile & getmodule to:
def getabsfile(object, filename=None):
def getmodule(object, filename=None):
2) including the "filename" parameter in all calls to
getabsfile inside of function getmodule.
3) having getabsfile return the absolute and normalized
filename if not null.
Perhaps this change helps to clean up the 'ugliness'
introduced in version 45822.
Kind regards,
Don Quijote
--
>Comment By: Don Quijote (dq_searchlores)
Date: 2006-07-20 14:36
Message:
Logged In: YES
user_id=1118684
A possible simple fix:
In function getabsfile(), test _filename explicitly with:
...abspath(_filename is not None or getsourcefile...
In your case, _filename is ''. This is the value returned
from getfile(), when using attribute .co_filename from the
code object.
--
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-07-20 08:59
Message:
Logged In: YES
user_id=33168
Confirmed this is bad:
inspect.getmodule(compile('a=10','','single'))
--
Comment By: Connelly (connelly)
Date: 2006-07-20 08:40
Message:
Logged In: YES
user_id=1039782
I tried pje's Revision 50526 and this still causes infinite recursion with:
>>> inspect.getmodule(compile('a=10','','single'))
--
Comment By: Phillip J. Eby (pje)
Date: 2006-07-10 21:05
Message:
Logged In: YES
user_id=56214
Fixed in revision 50526.
--
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-07-05 03:53
Message:
Logged In: YES
user_id=33168
Phillip any comments?
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1516184&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1525866 ] Bug in shutil.copytree on Windows
Bugs item #1525866, was opened at 2006-07-20 13:00 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525866&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mike Foord (mjfoord) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in shutil.copytree on Windows Initial Comment: The problem is that the call to 'copystat(src, dst)' was added to the shutil.copytree function, in svn r38363 probably. It will fail always on Windows, since os.utime does not work on directories. I guess that a patch similar to this one should fix it: Index: shutil.py === --- shutil.py (Revision 50710) +++ shutil.py (Arbeitskopie) @@ -127,7 +127,12 @@ # continue with other files except Error, err: errors.extend(err.args[0]) -copystat(src, dst) +try: +copystat(src, dst) +except WindowsError: +pass +except OSError, err: +errors.extend(err.args[0]) if errors: raise Error, errors -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525866&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1525919 ] email package quoted printable behaviour changed
Bugs item #1525919, was opened at 2006-07-20 16:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525919&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Arendsen Hein (thomas_ah)
Assigned to: Nobody/Anonymous (nobody)
Summary: email package quoted printable behaviour changed
Initial Comment:
from email.Message import Message
from email.Charset import Charset, QP
text = "="
msg = Message()
charset = Charset("utf-8")
charset.header_encoding = QP
charset.body_encoding = QP
msg.set_charset(charset)
msg.set_payload(text)
print msg.as_string()
Gives
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
=3D
With the email package from python2.4.3 and 2.4.4c0 the
last '=3D' becomes just '=', so an extra
msg.body_encode(text) is needed.
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525919&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1525919 ] email package quoted printable behaviour changed
Bugs item #1525919, was opened at 2006-07-20 16:22
Message generated for change (Settings changed) made by thomas_ah
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525919&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Arendsen Hein (thomas_ah)
>Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email package quoted printable behaviour changed
Initial Comment:
from email.Message import Message
from email.Charset import Charset, QP
text = "="
msg = Message()
charset = Charset("utf-8")
charset.header_encoding = QP
charset.body_encoding = QP
msg.set_charset(charset)
msg.set_payload(text)
print msg.as_string()
Gives
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
=3D
With the email package from python2.4.3 and 2.4.4c0 the
last '=3D' becomes just '=', so an extra
msg.body_encode(text) is needed.
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525919&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1516184 ] inspect.py: still infinite recursion inspecting frames
Bugs item #1516184, was opened at 2006-07-03 08:39
Message generated for change (Comment added) made by pje
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1516184&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Don Quijote (dq_searchlores)
Assigned to: Phillip J. Eby (pje)
Summary: inspect.py: still infinite recursion inspecting frames
Initial Comment:
Using python 2.5 beta 1 on Windows XP, and py2exe 0.6.5.
After packing and compressing a project via py2exe,
there's still an infinite recursion involving functions
getsourcefile, getmodule and getabsfile in module
inspect.py.
I was able to fix this infinite recursion by
1) changing the declaration of getabsfile & getmodule to:
def getabsfile(object, filename=None):
def getmodule(object, filename=None):
2) including the "filename" parameter in all calls to
getabsfile inside of function getmodule.
3) having getabsfile return the absolute and normalized
filename if not null.
Perhaps this change helps to clean up the 'ugliness'
introduced in version 45822.
Kind regards,
Don Quijote
--
>Comment By: Phillip J. Eby (pje)
Date: 2006-07-20 15:56
Message:
Logged In: YES
user_id=56214
Added a test for the new issue and fixed in revision 50719.
--
Comment By: Don Quijote (dq_searchlores)
Date: 2006-07-20 12:36
Message:
Logged In: YES
user_id=1118684
A possible simple fix:
In function getabsfile(), test _filename explicitly with:
...abspath(_filename is not None or getsourcefile...
In your case, _filename is ''. This is the value returned
from getfile(), when using attribute .co_filename from the
code object.
--
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-07-20 06:59
Message:
Logged In: YES
user_id=33168
Confirmed this is bad:
inspect.getmodule(compile('a=10','','single'))
--
Comment By: Connelly (connelly)
Date: 2006-07-20 06:40
Message:
Logged In: YES
user_id=1039782
I tried pje's Revision 50526 and this still causes infinite recursion with:
>>> inspect.getmodule(compile('a=10','','single'))
--
Comment By: Phillip J. Eby (pje)
Date: 2006-07-10 19:05
Message:
Logged In: YES
user_id=56214
Fixed in revision 50526.
--
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-07-05 01:53
Message:
Logged In: YES
user_id=33168
Phillip any comments?
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1516184&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1525919 ] email package quoted printable behaviour changed
Bugs item #1525919, was opened at 2006-07-20 16:22
Message generated for change (Comment added) made by thomas_ah
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525919&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Arendsen Hein (thomas_ah)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email package quoted printable behaviour changed
Initial Comment:
from email.Message import Message
from email.Charset import Charset, QP
text = "="
msg = Message()
charset = Charset("utf-8")
charset.header_encoding = QP
charset.body_encoding = QP
msg.set_charset(charset)
msg.set_payload(text)
print msg.as_string()
Gives
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
=3D
With the email package from python2.4.3 and 2.4.4c0 the
last '=3D' becomes just '=', so an extra
msg.body_encode(text) is needed.
--
>Comment By: Thomas Arendsen Hein (thomas_ah)
Date: 2006-07-20 18:01
Message:
Logged In: YES
user_id=839582
One program which got hit by this is MoinMoin, see
http://moinmoin.wikiwikiweb.de/MoinMoinBugs/ResetPasswordEmailImproperlyEncoded
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525919&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1525866 ] Bug in shutil.copytree on Windows
Bugs item #1525866, was opened at 2006-07-20 15:00 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525866&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mike Foord (mjfoord) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in shutil.copytree on Windows Initial Comment: The problem is that the call to 'copystat(src, dst)' was added to the shutil.copytree function, in svn r38363 probably. It will fail always on Windows, since os.utime does not work on directories. I guess that a patch similar to this one should fix it: Index: shutil.py === --- shutil.py (Revision 50710) +++ shutil.py (Arbeitskopie) @@ -127,7 +127,12 @@ # continue with other files except Error, err: errors.extend(err.args[0]) -copystat(src, dst) +try: +copystat(src, dst) +except WindowsError: +pass +except OSError, err: +errors.extend(err.args[0]) if errors: raise Error, errors -- >Comment By: Martin v. Löwis (loewis) Date: 2006-07-20 18:14 Message: Logged In: YES user_id=21627 Can you also come up with a patch to the test suite? -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525866&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1519816 ] urllib2 proxy does not work in 2.4.3
Bugs item #1519816, was opened at 2006-07-10 09:29 Message generated for change (Comment added) made by jjlee You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1519816&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Michal Niklas (mniklas) Assigned to: Nobody/Anonymous (nobody) Summary: urllib2 proxy does not work in 2.4.3 Initial Comment: My python app had to retrieve some web pages and while our network environment requires proxy it uses urllib2 opener (source is in attachment). It worked very well on older Python interpreters: ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on win32 It works on linux with 2.3 and 2.4.1: Python 2.4.1 (#2, May 5 2005, 11:32:06) [GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2 But it does not work with newest 2.4.3 on Linux: Python 2.4.3 (#1, Jul 10 2006, 09:57:52) [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2 Desired result: isof-mark:~# python2.3 proxy_bug.py trying http://www.python.org ... OK. We have reply from http://www.python.org. Size: 13757 [b] http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd"> http://www.w3.org/ 1999/xhtml"> design by pollenation Copyright ÃÅ 1990-2006, Python Software Foundation Legal Statements isof-mark:~# /usr/local/bin/python proxy_bug.py trying http://www.python.org ... Traceback (most recent call last): File "proxy_bug.py", line 37, in ? get_page() File "proxy_bug.py", line 27, in get_page f = urllib2.urlopen(request) File "/usr/local/lib/python2.4/urllib2.py", line 130, in urlopen return _opener.open(url, data) File "/usr/local/lib/python2.4/urllib2.py", line 364, in open response = meth(req, response) File "/usr/local/lib/python2.4/urllib2.py", line 471, in http_response response = self.parent.error( File "/usr/local/lib/python2.4/urllib2.py", line 402, in error return self._call_chain(*args) File "/usr/local/lib/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/local/lib/python2.4/urllib2.py", line 480, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 407: Proxy Authentication Required I have raported it on ActiveState bug list (http:// bugs.activestate.com/show_bug.cgi?id=47018) while I first spot this bug on their destribution but it seems that bug is in others distributions too. Regards, Michal Niklas -- Comment By: John J Lee (jjlee) Date: 2006-07-20 19:09 Message: Logged In: YES user_id=261020 You're sure you didn't copy over the urllib2.py from 2.5b2 also? That might make the bug appear to go away, when really it's still there. The way to be sure is to try it on a different machine. Thanks for your report. -- Comment By: Michal Niklas (mniklas) Date: 2006-07-19 12:12 Message: Logged In: YES user_id=226518 I have checked that the last wersion my script works with is 2.4.2 and copied that version urllib2.py to 2.4.3 Lib directory. It works again. The only change in urllib2.py is in retry_http_basic_auth(), line 723: 2.4.2 user,pw = self.passwd.find_user_password(realm, host) 2.4.3 user, pw = self.passwd.find_user_password(realm, req.get_full_url()) So "host" is replaced by "req.get_full_url()". Checked again with 2.5b2 and it works! Probably I destroyed my test environment and tested it wrong way :( So the problem is only with 2.4.3. Previous versions and 2.5b works well. Regards, Michal Niklas -- Comment By: Michal Niklas (mniklas) Date: 2006-07-13 11:09 Message: Logged In: YES user_id=226518 2.5b2 does not work any better: Python 2.5b2 (r25b2:50512, Jul 11 2006, 10:16:14) [MSC v.1310 32 bit (Intel)] on win32 Result is the same as in 2.5b1 :( -- Comment By: Michal Niklas (mniklas) Date: 2006-07-11 07:27 Message: Logged In: YES user_id=226518 Tried it with 2.5 beta 1 and it is not better :( c:\tools\pyscripts\scripts>c:\python25\python2.5 Python 2.5b1 (r25b1:47027, Jun 20 2006, 09:31:33) [MSC v.1310 32 bit (Intel)] on win32 c:\tools\pyscripts\scripts>c:\python25\python2.5 proxy_bug.py trying http://www.python.org ... Traceback (most recent call last): File "proxy_bug.py", line 37, in get_page() File "proxy_bug.py", line 27, in get_page f = urllib2.urlopen(request) File "c:\python25\lib\urllib2.py", line 121, in urlopen return _opener.open(url, data) File "c:\python25\lib\urllib2.py", l
[ python-Bugs-1346874 ] httplib simply ignores CONTINUE
Bugs item #1346874, was opened at 2005-11-03 12:23 Message generated for change (Comment added) made by jjlee You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1346874&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Mike Looijmans (cdwave) Assigned to: Nobody/Anonymous (nobody) Summary: httplib simply ignores CONTINUE Initial Comment: I bumped into this code in httplib.py HTTPConnection, begin(): # read until we get a non-100 response while True: version, status, reason = self._read_status() if status != CONTINUE: break # skip the header from the 100 response while True: skip = self.fp.readline().strip() if not skip: break if self.debuglevel > 0: print "header:", skip This basically silently eats any 100-continue response that the server may send to us. This is not according to the spec - the client should WAIT for the 100-continue, and then post the data. Because of this code snippet, it is impossible for a client to wait for a 100-continue response, since it is silently eaten by this code. A correct implementation would be: - Check the outgoing headers for "Expect: 100-continue" - If that is present, set an "expectcontinue" flag. - If the client tries to send data to the connection, or if the data member was set in the request, wait for the server to send the 100 response BEFORE sending out any data at all, if the flag is set. - If the server fails to send it, the connection will eventually time out. I'd be happy to provide an implementation myself, as it doesn't seem hard to implement and would really help my project. -- Comment By: John J Lee (jjlee) Date: 2006-07-20 19:22 Message: Logged In: YES user_id=261020 I don't see any violation of RFC 2616 here. Which part of the spec., precisely, do you claim is violated? Still, implementing better 100 Continue handling would be useful, if done correctly, so go ahead and write that patch! -- Comment By: Neal Norwitz (nnorwitz) Date: 2005-11-04 02:17 Message: Logged In: YES user_id=33168 It's much easier to get a patch integrated since there should be less work than a bug. I encourage you to work on a patch. Don't forget that a patch, must do many things: 1) fix the code, 2) fix (or add!) tests, 3) fix the documentation with an appropriate \versionchanged (or \versionadded) tag, and finally 4) update Misc/NEWS. The old behaviour should generally be backwards compatible by default when adding new functionality. If it's a bug, it may still be desirable to maintain backwards compatibility. I don't know enough about HTTP to provide any guidance here. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1346874&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1524081 ] logging using the SysLog handler fails if locale is set
Bugs item #1524081, was opened at 2006-07-17 19:33
Message generated for change (Settings changed) made by vsajip
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1524081&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Mihai Ibanescu (misa)
Assigned to: Nobody/Anonymous (nobody)
Summary: logging using the SysLog handler fails if locale is set
Initial Comment:
This affectes b2 and python 2.4 too.
Initially reported here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=198971
Looking at logging/handlers.py:
Line 635:
self.encodePriority(self.facility,
string.lower(record.levelname)), msg)
Line 611 in encodePriority:
priority = self.priority_names[priority]
priority_names is declared on line 527:
priority_names = {
"alert":LOG_ALERT,
"crit": LOG_CRIT,
...
"info": LOG_INFO,
...
Now, if one initializes the locale (i.e.
locale.setlocale(locale.LC_ALL, "")
and then tries to use the logging module, it will fail
with an exception looking kinda like:
File "/usr/lib64/python2.4/logging/handlers.py", line
627, in encodePriority
priority = self.priority_names[priority]
KeyError: 'Info'
if they choose LANG=tr_TR.UTF-8
This happens because in that particular locale,
"INFO".lower() != "info"
--
>Comment By: Vinay Sajip (vsajip)
Date: 2006-07-20 23:27
Message:
Logged In: YES
user_id=308438
Fixed by using a dict to map logging level names to syslog
priority level names. This also facilitates usage when
custom logging levels are present.
Fix is checked into Subversion.
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1524081&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1526203 ] Win32: subprocess.Popen() w/o "pipe" throws an exception
Bugs item #1526203, was opened at 2006-07-21 00:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1526203&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Larry Hastings (lhastings)
Assigned to: Nobody/Anonymous (nobody)
Summary: Win32: subprocess.Popen() w/o "pipe" throws an exception
Initial Comment:
This is under Windows (XP).
I have a script which calls subprocess.Popen without
the "pipe=" argument, as so:
--
from subprocess import *
Popen("cmd.exe /c dir")
--
If I run that with Python 2.5, it throws the following
exception:
Exception exceptions.AttributeError: "'NoneType' object
has no attribute 'append'" in > ignored
The same script run under Python 2.4(.2) does not throw
any exceptions.
Note that this happens with any call to
subprocess.Popen; what process you invoke seems irrelevant.
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1526203&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1526203 ] Win32: subprocess.Popen() w/o "pipe" throws an exception
Bugs item #1526203, was opened at 2006-07-21 00:10
Message generated for change (Comment added) made by tcdelaney
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1526203&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Larry Hastings (lhastings)
Assigned to: Nobody/Anonymous (nobody)
Summary: Win32: subprocess.Popen() w/o "pipe" throws an exception
Initial Comment:
This is under Windows (XP).
I have a script which calls subprocess.Popen without
the "pipe=" argument, as so:
--
from subprocess import *
Popen("cmd.exe /c dir")
--
If I run that with Python 2.5, it throws the following
exception:
Exception exceptions.AttributeError: "'NoneType' object
has no attribute 'append'" in > ignored
The same script run under Python 2.4(.2) does not throw
any exceptions.
Note that this happens with any call to
subprocess.Popen; what process you invoke seems irrelevant.
--
Comment By: Tim Delaney (tcdelaney)
Date: 2006-07-21 00:47
Message:
Logged In: YES
user_id=603121
Kevin Jacobs reported it to python-dev with a possible
patch in:
http://mail.python.org/pipermail/python-dev/2006-
July/067311.html
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1526203&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1525589 ] Malloc, memory error, failmalloc, low memory.
Bugs item #1525589, was opened at 2006-07-19 16:28 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525589&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Rene Dudfield (illume) >Assigned to: Neal Norwitz (nnorwitz) Summary: Malloc, memory error, failmalloc, low memory. Initial Comment: The failmalloc library can be used to simulate high load, low memory conditions. http://www.nongnu.org/failmalloc/ It reports that python segfaults under some conditions when memory allocation fails. " $ LD_PRELOAD=libfailmalloc.so FAILMALLOC_INTERVAL=10 python Fatal Python error: Can't initialize 'type' Aborted $ LD_PRELOAD=libfailmalloc.so FAILMALLOC_INTERVAL=100 python Segmentation fault " -- >Comment By: Neal Norwitz (nnorwitz) Date: 2006-07-20 22:41 Message: Logged In: YES user_id=33168 Committed revision 50743. Committed revision 50742. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525589&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1229788 ] Bus error in extension with gcc 3.3
Bugs item #1229788, was opened at 2005-06-29 08:43
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1229788&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gary Robinson (garyrob)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bus error in extension with gcc 3.3
Initial Comment:
This text contains a c module with 4 versions of the same
extremely simple function. All they do is return a float double to
python.
On Windows I have received a report from someone who can built
the module, imported it into Python, and ran it successfully.
It has also been reported that there is no problem when the
extension is compiled with gcc 4.0 on OS X.
However, on OS X, if the extension is compiled with gcc 3.3, the 4th
of the 4 function results in a bus error:
>>> from check import *
fun0()
411.0
>>> fun1()
534.37
>>> fun2()
411.0
>>> fun3()
Bus error
I originally reported this on the C++ sig's mail list. They suggested I
try dev-python. Scott David Daniels on that list helped me refine
some
test cases and verified that they all worked on Windows.
Along the way it was suggested that I post a bug report. So this is it.
The code follows:
#include "Python.h"
static double value = 411.0;
static PyObject *
fun0(PyObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, "", NULL)) return NULL;
return Py_BuildValue("d", value);
}
static PyObject *
fun1(PyObject *self, PyObject *args)
{
return Py_BuildValue("d", 1.3*value);
}
static PyObject *
fun2(PyObject *self, PyObject *args)
{
return PyFloat_FromDouble(value);
}
static PyObject *
fun3(PyObject *self, PyObject *args)
{
return Py_BuildValue("d", value);
}
static PyMethodDef TestMethods[] = {
{"fun0", fun0, METH_VARARGS, "Read args and return value"},
{"fun1", fun1, METH_VARARGS, "Return value multiplied inline
by
1.3"},
{"fun2", fun2, METH_VARARGS, "Return value using
PyFloat_FromDouble"},
{"fun3", fun3, METH_VARARGS, "Return value using
Py_BuildValue
without reading args -- causes bus error on OS X Panther with
XCode 1.5
installed"},
{NULL, NULL, 0, NULL}/* Sentinel */
};
PyMODINIT_FUNC
initcheck(void)
{
PyObject *module;
module = Py_InitModule3("check", TestMethods,
"extension module with three functions.");
if (module) {
PyModule_AddStringConstant(module, "__version__", "0.02");
}
}
--
>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-07-20 22:56
Message:
Logged In: YES
user_id=33168
Gary, care to comment? It's possible there was a bug fix or
two related to alignment of floats. But if we can't
reproduce this bug, we will have to close it. Please
respond if you still have this problem within a week or two.
--
Comment By: Darryl Dixon (esrever_otua)
Date: 2005-07-12 21:36
Message:
Logged In: YES
user_id=567623
Bus errors are generally caused by unaligned memory
accesses, or by attempts to read past the end of a
file-descriptor (or something along those lines). This
sounds like a gcc bug rather than a Python bug. Can I
suggest changing your compiler flags and experimenting with
things like different -O levels? (-O3, -O1, etc) to see if
it makes a difference... Also, you may want to raise a bug
with gcc (although I've no idea how seriously they would
take it :( ). Finally, what version of gcc is Python
compiled with on Panther? There may be a conflict there
(once again, different optimisations might be the problem).
Anyhow, just my random thoughts,
D
--
Comment By: Terry J. Reedy (tjreedy)
Date: 2005-07-01 20:13
Message:
Logged In: YES
user_id=593130
I understand that you got advice to post, but I strongly doubt that
core Python code is involved for three reasons.
1. On the Unix I used, bus errors were much rarer and esoteric
than segmentation violations (from bad pointers). But maybe
BSD-derived OSX is different.
2. The only difference between fun1 that works and fun3 that
doesn't, seems to be how the arg in computed. The receiving
function only gets a value (which it copies) and does not know its
history.
3. You report that upgrading the compiler fixes the problem. (So
why not just do that?)
If you want to experiment more, redo fun1 and fun3 with 'value'
replaced by its literal value. Then redo again with value =
534.37 instead of 411 and change arg in fun1 to
value/1.3 instead of 1.3*value.
About stack trace: On unix (of 15 years ago), program crashes
[ python-Bugs-1526203 ] Win32: subprocess.Popen() w/o "pipe" throws an exception
Bugs item #1526203, was opened at 2006-07-21 00:10
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1526203&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Larry Hastings (lhastings)
Assigned to: Nobody/Anonymous (nobody)
Summary: Win32: subprocess.Popen() w/o "pipe" throws an exception
Initial Comment:
This is under Windows (XP).
I have a script which calls subprocess.Popen without
the "pipe=" argument, as so:
--
from subprocess import *
Popen("cmd.exe /c dir")
--
If I run that with Python 2.5, it throws the following
exception:
Exception exceptions.AttributeError: "'NoneType' object
has no attribute 'append'" in > ignored
The same script run under Python 2.4(.2) does not throw
any exceptions.
Note that this happens with any call to
subprocess.Popen; what process you invoke seems irrelevant.
--
>Comment By: Georg Brandl (gbrandl)
Date: 2006-07-21 06:00
Message:
Logged In: YES
user_id=849994
This was fixed in rev. 50720.
--
Comment By: Tim Delaney (tcdelaney)
Date: 2006-07-21 00:47
Message:
Logged In: YES
user_id=603121
Kevin Jacobs reported it to python-dev with a possible
patch in:
http://mail.python.org/pipermail/python-dev/2006-
July/067311.html
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1526203&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
