[ python-Bugs-1284928 ] logging module's setLoggerClass not really working

2005-09-08 Thread SourceForge.net
Bugs item #1284928, was opened at 2005-09-08 16:51
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=1284928&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: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rotem Yaari (rotem_ya)
Assigned to: Nobody/Anonymous (nobody)
Summary: logging module's setLoggerClass not really working

Initial Comment:
The logging package should be modified in a way which
would let users call the setLoggerClass API, and then
consistently get loggers only from that class. 

In the logging package as it is today, the root logger
will always be a logging.Logger instance, and not the
new class specified in the call to setLoggerClass.
These semantics are not clear.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1284928&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1285086 ] urllib.quote is too slow

2005-09-08 Thread SourceForge.net
Bugs item #1285086, was opened at 2005-09-08 12:37
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=1285086&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.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tres Seaver (tseaver)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib.quote is too slow

Initial Comment:
'urllib.quote' delegates to '_fast_quote' for the common
case that the user has passed no 'safe' argument.  However,
'_fast_quote' isn't really very fast, especially for
the case that
 it doesn't need to quote anything.

Zope (and presumably other web frameworks) can end up
calling 'quote' dozens, hundreds, even thousands of times
to render a page, which makes this a potentially big win
for them.

I will attach a speed test script which demonstrates the
speed penalty, along with a patch which implements the
speedup.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285086&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1281383 ] array.arrays are not unpickleable

2005-09-08 Thread SourceForge.net
Bugs item #1281383, was opened at 2005-09-03 16:16
Message generated for change (Comment added) made by tjreedy
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1281383&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.4
Status: Closed
Resolution: Invalid
Priority: 6
Submitted By: Reinhold Birkenfeld (birkenfeld)
Assigned to: Nobody/Anonymous (nobody)
Summary: array.arrays are not unpickleable

Initial Comment:
Credits to John Machin for discovering this.

"""
Googling for "pickle array" in comp.lang.python yields
old messages that 
show a PickleError -- plus one message where Alex
Martelli writes "I am 
but an egg" :O)
Looks like arrays are NOW (2.4.1) pickleable but not
unpickleable -- see 
below.
I appreciate that arrays are inherently not pickleable
because of the 
type code.
However:
(1) Anyone know why/when the world changed?
(2) If we had alternative constructors like
array.iarray(contents) in 
parallel to array.array('i', contents), those objects
could be 
pickled/unpickled -- yes/no?

Cheers,
John

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310
32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for
more information.
 >>> import pickle, array
 >>> class Foo(object):
...pass
...
 >>> foo = Foo()
 >>> foo.ia = array.array('i', [3,2,1])
 >>> foo.ia
array('i', [3, 2, 1])
 >>> s = pickle.dumps(foo, -1)
 >>> bar = pickle.loads(s)
Traceback (most recent call last):
  File "", line 1, in ?
  File "C:\Python24\lib\pickle.py", line 1394, in loads
return Unpickler(file).load()
  File "C:\Python24\lib\pickle.py", line 872, in load
dispatch[key](self)
  File "C:\Python24\lib\pickle.py", line 1097, in
load_newobj
obj = cls.__new__(cls, *args)
TypeError: array() takes at least 1 argument (0 given)
===
"""

--

>Comment By: Terry J. Reedy (tjreedy)
Date: 2005-09-08 15:39

Message:
Logged In: YES 
user_id=593130

http://python.org/sf/1281556 appears to be a duplicate.
You wish to close it too? (I won't, don't know enough here.)

--

Comment By: Raymond Hettinger (rhettinger)
Date: 2005-09-08 02:36

Message:
Logged In: YES 
user_id=80475

I think you're misunderstanding.  Direct pickling of arrays
does raise a TypeError.  It would be nice if it also did as
an object attribute; however, I'm not bothered by it enough
to spend development time tracing down the issue and then
altering otherwise correct Py2.4 code just to generate a
prettier message.  It is enough for me that the docs do not
promise pickling, that a message is generated by a direct
attempt to pickle, that the OP's buggy code eventually
errors out, and that everything works fine in Py2.5.

I have no objections to someone finding a way to generate a
better error message but think the time would better be
spent elsewhere.

>>> from array import array
>>> from pickle import dumps, loads
>>> ia = array('i', [3,2,1])
>>> ib = loads(dumps(ia))

Traceback (most recent call last):
 . . .
TypeError: can't pickle array objects

--

Comment By: Josiah Carlson (josiahcarlson)
Date: 2005-09-08 02:04

Message:
Logged In: YES 
user_id=341410

Raymond, they seem to be asking for Pickle and cPickle to
raise an exception when someone attempts to pickle arrays in
a future Python 2.4.2 release.  I don't think that is a new
feature.

As for 2.5, real pickle support seems reasonable.

--

Comment By: John Machin (sjmachin)
Date: 2005-09-04 06:41

Message:
Logged In: YES 
user_id=480138

Please fix the bug in Python 2.4: if array objects are not
pickleable in 2.4, then pickle and cPickle should raise a
PickleError [like they used to in earlier versions] --
instead of guessing wrongly and misleading callers into
thinking that the objects can be pickled.

--

Comment By: Raymond Hettinger (rhettinger)
Date: 2005-09-03 19:20

Message:
Logged In: YES 
user_id=80475

In Py2.4, array's became copyable, weak-referencable, and
got support for iterator arguments.  Real pickle support
wasn't added until Py2.5.  The above code fragment is a
by-product of pickle making an incorrect guess at how to
pickle arrays before real pickel support was added.  It is
not really a bug; rather, it begs for a feature that wasn't
added to later.

If it weren't a new feature, I would just backport the 2.5
pickle support. 

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=12813

[ python-Bugs-1285325 ] Call to cmd.exe fails

2005-09-08 Thread SourceForge.net
Bugs item #1285325, was opened at 2005-09-08 16:17
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=1285325&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: Windows
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex Luso (delenca)
Assigned to: Nobody/Anonymous (nobody)
Summary: Call to cmd.exe fails

Initial Comment:
A python script calling another program through cmd.exe
fails on one PC running Win XP but works fine in
another. Both computers are running Win XP Pro SP2 and
both were set up with the same versions of software
(Python 2.4.1) and have the same environmental
variables assigned. The specific error reported is:
---  ERROR Window
16 bit MS-DOS Subsystem
C:\Python24\python.exe
The NTVDM CPU has encountered an illegal instruction
CS:0552 IP:ad0d5 OP:8f 66 4c 8f 4f Choose 'Close' to
terminate application
---

  The script that causes the problem is:

import os
import sys

debug = 1

rd = os.environ['RIBBONS_HOME']

cmd = "python %s/elmo/ribbonsData.py" % rd

if debug:
print cmd
os.system(cmd)
while 1:
pass
-

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285325&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1285325 ] Call to cmd.exe fails

2005-09-08 Thread SourceForge.net
Bugs item #1285325, was opened at 2005-09-08 16:17
Message generated for change (Settings changed) made by delenca
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285325&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: Windows
Group: Python 2.4
>Status: Deleted
Resolution: None
Priority: 5
Submitted By: Alex Luso (delenca)
Assigned to: Nobody/Anonymous (nobody)
Summary: Call to cmd.exe fails

Initial Comment:
A python script calling another program through cmd.exe
fails on one PC running Win XP but works fine in
another. Both computers are running Win XP Pro SP2 and
both were set up with the same versions of software
(Python 2.4.1) and have the same environmental
variables assigned. The specific error reported is:
---  ERROR Window
16 bit MS-DOS Subsystem
C:\Python24\python.exe
The NTVDM CPU has encountered an illegal instruction
CS:0552 IP:ad0d5 OP:8f 66 4c 8f 4f Choose 'Close' to
terminate application
---

  The script that causes the problem is:

import os
import sys

debug = 1

rd = os.environ['RIBBONS_HOME']

cmd = "python %s/elmo/ribbonsData.py" % rd

if debug:
print cmd
os.system(cmd)
while 1:
pass
-

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285325&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1285440 ] Digest Authentication not working in all cases

2005-09-08 Thread SourceForge.net
Bugs item #1285440, was opened at 2005-09-08 22:31
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=1285440&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.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Jakob Simon-Gaarde (jsgaarde99)
Assigned to: Nobody/Anonymous (nobody)
Summary: Digest Authentication not working in all cases

Initial Comment:
I feel I better report this as a bug, since urllib2's
digest authentication handler fails where others
succeed. I have been trying to authenticate against an
IIS server at Microsoft hosting MapPoint SOAP services.
The host requres Digest authentication but urllib2
fails to authenticate with the credentials I have
recieved. When I authenticate using firefox the browser
I imediately succeed and gain access to a browsable
service API. C# dotnet's SOAP client also succeeds in
authenticating. Therefore I have made my own conclusion
that urllib.HTTPDigestAuthHandler must be doing
something wrong. I can provide the authentication
credentials needed to test and correct the bug, but
this would have to be through an email, so I don't
break to many laws.

In the attached file is the script I have used to
provoke the digest challenge.

Jakob Simon-Gaarde

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285440&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1285086 ] urllib.quote is too slow

2005-09-08 Thread SourceForge.net
Bugs item #1285086, was opened at 2005-09-08 11:37
Message generated for change (Comment added) made by jepler
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285086&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.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tres Seaver (tseaver)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib.quote is too slow

Initial Comment:
'urllib.quote' delegates to '_fast_quote' for the common
case that the user has passed no 'safe' argument.  However,
'_fast_quote' isn't really very fast, especially for
the case that
 it doesn't need to quote anything.

Zope (and presumably other web frameworks) can end up
calling 'quote' dozens, hundreds, even thousands of times
to render a page, which makes this a potentially big win
for them.

I will attach a speed test script which demonstrates the
speed penalty, along with a patch which implements the
speedup.

--

Comment By: Jeff Epler (jepler)
Date: 2005-09-08 20:01

Message:
Logged In: YES 
user_id=2772

Tested on Python 2.4.0.  The patch fails on the first chunk
because the list of imports don't match.

The urllib_fast_quote_speed_test.py doesn't run once urllib
has been patched.

I reverted the patch to urllib.py and re-ran.  I got
"faster" values from 0.758 to 0.964.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285086&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1285086 ] urllib.quote is too slow

2005-09-08 Thread SourceForge.net
Bugs item #1285086, was opened at 2005-09-08 12:37
Message generated for change (Comment added) made by tseaver
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285086&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.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tres Seaver (tseaver)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib.quote is too slow

Initial Comment:
'urllib.quote' delegates to '_fast_quote' for the common
case that the user has passed no 'safe' argument.  However,
'_fast_quote' isn't really very fast, especially for
the case that
 it doesn't need to quote anything.

Zope (and presumably other web frameworks) can end up
calling 'quote' dozens, hundreds, even thousands of times
to render a page, which makes this a potentially big win
for them.

I will attach a speed test script which demonstrates the
speed penalty, along with a patch which implements the
speedup.

--

>Comment By: Tres Seaver (tseaver)
Date: 2005-09-08 22:30

Message:
Logged In: YES 
user_id=127625

I'm attaching a patch against 2.4's version

--

Comment By: Jeff Epler (jepler)
Date: 2005-09-08 21:01

Message:
Logged In: YES 
user_id=2772

Tested on Python 2.4.0.  The patch fails on the first chunk
because the list of imports don't match.

The urllib_fast_quote_speed_test.py doesn't run once urllib
has been patched.

I reverted the patch to urllib.py and re-ran.  I got
"faster" values from 0.758 to 0.964.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285086&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1285086 ] urllib.quote is too slow

2005-09-08 Thread SourceForge.net
Bugs item #1285086, was opened at 2005-09-08 12:37
Message generated for change (Comment added) made by tseaver
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285086&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.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tres Seaver (tseaver)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib.quote is too slow

Initial Comment:
'urllib.quote' delegates to '_fast_quote' for the common
case that the user has passed no 'safe' argument.  However,
'_fast_quote' isn't really very fast, especially for
the case that
 it doesn't need to quote anything.

Zope (and presumably other web frameworks) can end up
calling 'quote' dozens, hundreds, even thousands of times
to render a page, which makes this a potentially big win
for them.

I will attach a speed test script which demonstrates the
speed penalty, along with a patch which implements the
speedup.

--

>Comment By: Tres Seaver (tseaver)
Date: 2005-09-08 22:35

Message:
Logged In: YES 
user_id=127625

Note that the speed test script shows equivalent speedups for
both 2.3 and 2.4, ranging from 90% (for the empty string) down
to 73% (for a string with a single character).  The more
"normal"
cases range from 82% to 89% speedups.

--

Comment By: Tres Seaver (tseaver)
Date: 2005-09-08 22:30

Message:
Logged In: YES 
user_id=127625

I'm attaching a patch against 2.4's version

--

Comment By: Jeff Epler (jepler)
Date: 2005-09-08 21:01

Message:
Logged In: YES 
user_id=2772

Tested on Python 2.4.0.  The patch fails on the first chunk
because the list of imports don't match.

The urllib_fast_quote_speed_test.py doesn't run once urllib
has been patched.

I reverted the patch to urllib.py and re-ran.  I got
"faster" values from 0.758 to 0.964.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1285086&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com