[ python-Bugs-1477450 ] test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

2006-04-27 Thread SourceForge.net
Bugs item #1477450, was opened at 2006-04-27 14:07
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=1477450&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: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: shashi (shashikala)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

Initial Comment:

 Hi ,

 Iam building Python-2.4.3 on HP-UX 11.2i , while 
testing its npt able import the _bsddb.sl module and 
hence that is skipped . In previous versions the test 
is passing. what can be done to pass the test?.


Thanks,
shashi
 


--

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



[ python-Bugs-1476216 ] Documentation date stuck on "5th April 2006"

2006-04-27 Thread SourceForge.net
Bugs item #1476216, was opened at 2006-04-25 12:05
Message generated for change (Settings changed) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1476216&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: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Mat Martineau (martineau)
Assigned to: Anthony Baxter (anthonybaxter)
Summary: Documentation date stuck on "5th April 2006"

Initial Comment:
My builds of the python documentation from the SVN
trunk have been stuck on "5th April 2006" for several
weeks now.

I've traced this to r43589, which hard-coded the date
in boilerplate.tex - this seems unusual, because
boilerplate.tex was not modified in this way for any
previous releases.

Seems like "\date{5th April 2006}" should be changed
back to "\date{\today}".

For some reason, the documentation at
http://docs.python.org/dev/ shows the correct date.


Mat


--

>Comment By: A.M. Kuchling (akuchling)
Date: 2006-04-27 08:26

Message:
Logged In: YES 
user_id=11375

Now that 2.5alpha2 is out, I've reverted boilerplate.tex to
use the current date.


--

Comment By: A.M. Kuchling (akuchling)
Date: 2006-04-26 08:19

Message:
Logged In: YES 
user_id=11375

This change was made for the 2.5alpha1 release.  Undoing the
change probably just slipped the release manager's mind. 
The freeze for alpha2 is very soon, so this will probably
get fixed after alpha2 is out.


--

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



[ python-Bugs-1477102 ] Missing import line in example

2006-04-27 Thread SourceForge.net
Bugs item #1477102, was opened at 2006-04-26 13:28
Message generated for change (Comment added) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1477102&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: Documentation
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Bruce Eckel (bruceeckel)
>Assigned to: A.M. Kuchling (akuchling)
Summary: Missing import line in example

Initial Comment:
11.22.9 Example of Client Usage 

Should include the following import line:
from xmlrpclib import ServerProxy

--

>Comment By: A.M. Kuchling (akuchling)
Date: 2006-04-27 08:34

Message:
Logged In: YES 
user_id=11375

fixed in SVN; thanks!


--

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



[ python-Bugs-1477140 ] Incorrect code in example

2006-04-27 Thread SourceForge.net
Bugs item #1477140, was opened at 2006-04-26 14:20
Message generated for change (Comment added) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1477140&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: Documentation
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Bruce Eckel (bruceeckel)
>Assigned to: A.M. Kuchling (akuchling)
Summary: Incorrect code in example

Initial Comment:
In
11.22.9 Example of Client Usage 
The line:
except Error, v:
should probably be:
except Exception, v:

--

>Comment By: A.M. Kuchling (akuchling)
Date: 2006-04-27 08:50

Message:
Logged In: YES 
user_id=11375

I think the code was intending to use xmlrpclib.Error, which
is the base class for both Fault and ProtocolError, but
there were two problems: the missing import didn't make that
clear, and the Error class wasn't mentioned in the
documentation.  I've fixed the import and added a
description of the Error exception.

Thanks!


--

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



[ python-Feature Requests-1474609 ] feature requests for logging lib

2006-04-27 Thread SourceForge.net
Feature Requests item #1474609, was opened at 2006-04-22 12:02
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1474609&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: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: blaize rhodes (blaize)
Assigned to: Nobody/Anonymous (nobody)
Summary: feature requests for logging lib

Initial Comment:


The logger module interface is a bit broken, I reckon.
 My problems specifically are:
 
i) It's hard to get access to the LogRecord classes
for customization.
ii) the semantics of the debug, log, info, etc calls
is a bit strange/confusing...



Here are my proposed fixes:

a)  Add a method 
   Logger.setLogRecordClass( myLogRecordSubClass )

which sets the class that is instantiated in the
makeRecord() fn/method (yes there are two of them).

This would make customizing the LogRecord easier... 
Otherwise (I believe) in order to subclass the
LogRecord you also have to overload the Logger and
possibly the root makeRecord() function as well?  This
bloke's writen up his approach to this (it's doable but
not as nice as it should be).
 
http://qix.it/~ludoo/archive/2004/05/python_logging_customization.html

Another problem is that LogRecords are instantiated in
Logger._log so it's difficult to customize __init__
behaviour for the LogRecord (and I argue that this is a
useful thing)..  

b) A second problem is that the semantics of the log,
info, debug, etc fns is a bit broken.  Currently the
defn looks like this:

  def debug(self, msg, *args, **kwargs):

this suggests to me that a call like this is OK...

  logger.debug("here we go %(foo)s", foo = 'bar')

but it's not.  This is discussed further here...

http://groups.google.com.au/group/comp.lang.python/browse_thread/thread/322919fcac0113ec/98ceaf6fc0c56881?lnk=st&q=python+logging+keywords&rnum=1#98ceaf6fc0c56881

Instead kwargs are used for customizing the behaviour
of the debug method (e.g. exc_info, and extra).  This
seems i) a bit incongrous with its definition and
therefore confusing, and ii) a bit of a hack (it's not
completely insane though when you think about what's
happening under the hood).  Instead I propose using a
couple of calls along the lines of printf/fprintf.  In
my world we'd have a simple printf-style function... 

  def debug(self, msg, *args):  

and a more complex, more easily customizable
fprintf-style one

  def x_debug(self, log_record, msg, *args):  

In these calls *args is a valid argument for the string
formatting operator %, either a tuple of the right
length or a dictionary.  Any customization of the
behaviour of the system can be done (using keyword args
if you wish) in the log_record initializer (an example
will follow).

(Having said that perhaps we can check whether the
first arg to the new simple debug() is a logrecord and
if it is call the (hidden) extended version - that's
more pythonic I imagine)


c) This is not so much a feature request but a
motivating mode of operation that I'd like to be able
to use...

Currently you can set up log filters.  What you can
filter is largely based on what information appears in
the log record.  It'd be nice to filter messages based
on metadata  that you add at log time (i.e. in the
logger.debug(...) method).  Currently it's quite
painfull to set this up.  This is because we can't
customize the initialization of the log_record.  The
call structure in ii) above allows us to setup nice
filtering mechanisms
eg..

class GUIFilter:
   "A filter that only lets messges with gui tags
through."""
def filter(self, log_record):
return hasattr(log_record, 'gui')

# set up a log, and a handler...
log = logging.getLogger(..)
file_handler = FileHandler(..)
log.addHandler(file_handler)
gui_msg_bar_handler = StreamHandler(..)
log.addHandler(gui_msg_bar_handler)
gui_msg_bar_handler.addFilter(GUIFilter())

# msg only goes to the file_handler
log.debug("here we go %s", "here's an arg")  

# msg goes to the file_handler and to the gui_handler.
log.x_debug(LogRecord(gui=True), "what you just tried
to do didn't work %s", "fool")


Change a) could be made with no backward compatability
problems (I can see), change b) could be made without
probs if you didn't overload the existing logging
methods with the new ones, and then deprecate the
existing ones  (though what you'd call the new fns I
don't know).

That said I quite like the logger lib and I use it. 
It's a lot better than anything I would have thought up.


cheers
blaize



--

>Comment By: Georg Brandl (gbrandl)
Date: 2006-04-27 12:59

Message:
Logged In: YES 
user_id=849994

Duplicate of #1474577.

--

[ python-Bugs-1472566 ] import module with .dll extension

2006-04-27 Thread SourceForge.net
Bugs item #1472566, was opened at 2006-04-18 20:06
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1472566&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: Wont Fix
Priority: 5
Submitted By: svenn (sven_nystrom)
Assigned to: Martin v. Löwis (loewis)
Summary: import module with .dll extension

Initial Comment:
In previous versions, extension modules with the file 
extension '.dll' could be imported using a 
single 'import' statement.

In 2.5a1 this seems to have changed - here's an 
example:

>>> import minx # Implemented in a .dll - fails 

Traceback (most recent call last): 
  File "", line 1, in  
ImportError: No module named minx 

>>> import imp# Workaround 
>>> import os 
>>> minx = imp.load_dynamic('minx', os.getcwd() 
+ '\\minx.dll') 


I would really like this to remain the same; if that's 
not possible, it would be helpful if the change itself 
and a suggested approach were to be included in the 
documentation.



/Sven



--

>Comment By: Georg Brandl (gbrandl)
Date: 2006-04-27 13:01

Message:
Logged In: YES 
user_id=849994

Closing as "Won't fix", then.

--

Comment By: svenn (sven_nystrom)
Date: 2006-04-22 16:25

Message:
Logged In: YES 
user_id=1504966

Hi loewis,

I', sure the .pyd extension will work fine - my original 
comment was due to the fact I didn't realise it would work 
as today if the file extension was changed; I was (wrongly) 
assuming I would have to use the approach indicated in my 
example, which seemed a little less intuitive than the 
simple "import".



--

Comment By: Martin v. Löwis (loewis)
Date: 2006-04-22 14:26

Message:
Logged In: YES 
user_id=21627

Tim mentions the rationale for the change; the Misc/NEWS
entry is now in r45574.

svenn, why do you need it to work that way? Could you change
your code/application/whatever so that it works with .pyd
files instead?

--

Comment By: Tim Peters (tim_one)
Date: 2006-04-19 17:16

Message:
Logged In: YES 
user_id=31435

Note that rev 43622 added a comment to dynload_win.c
explaining why it was done:

"""
/* Temporarily disable .dll, to avoid conflicts between
   sqlite3.dll and the sqlite3 package. If this needs to
   be reverted for 2.5, some other solution for the
   naming conflict must be found.
"""


--

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-04-19 07:13

Message:
Logged In: YES 
user_id=33168

I believe this was an intentional change in rev 43622.  I
don't see any doc associated with the change however.  I
also thought it was mentioned on python-dev.  Martin,
shouldn't this be documented at least in Misc/NEWS?  I
couldn't find anything.

--

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



[ python-Bugs-944394 ] No examples or usage docs for urllib2

2006-04-27 Thread SourceForge.net
Bugs item #944394, was opened at 2004-04-29 11:02
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=944394&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: Pending
Resolution: None
Priority: 5
Submitted By: Chris Withers (fresh)
Assigned to: Nobody/Anonymous (nobody)
Summary: No examples or usage docs for urllib2

Initial Comment:
Hi there,

I'm sure I reported this before, but it's a couple of
major releases later, and there's still no usage docs
for urllib2.

The examples given are too trivial to be helpful, but
I'm guessing people are using the module so there must
be some examples out there somewhere ;-)

With a bit o fhelp from Moshez, I found the docstring
in the module source. At the very least, it'd be handy
if that appeared somewhere at:

http://docs.python.org/lib/module-urllib2.html

But really, mroe extensive and helpful documentation on
this cool new module would be very handy.

Chris

--

>Comment By: Georg Brandl (gbrandl)
Date: 2006-04-27 13:06

Message:
Logged In: YES 
user_id=849994

Chris, I concur with jjlee that suggesting examples is the
best way to get something done. Perhaps, if you're using
urllib2, you could flesh out some examples from your code?

--

Comment By: John J Lee (jjlee)
Date: 2006-04-17 14:26

Message:
Logged In: YES 
user_id=261020

Do you have any specific suggestions for what is unhelpful
and/or missing?

Otherwise, nothing is likely to change.

Note that a little was added at the bottom of this page in
2.4, explaining how OpenerDirector uses the handlers to open
URLs:

http://docs.python.org/lib/opener-director-objects.html

Looking at the top-level page, I guess an introduction /
overview would help?  Did you have other stuff in mind too?


--

Comment By: Chris Withers (fresh)
Date: 2006-04-17 14:19

Message:
Logged In: YES 
user_id=24723

I still feel there could be more.

I guess the best course, for me, would be to leave this open
but at a really low priority.

However, I probably wouldn't scream too much if the issue
was closed.

--

Comment By: John J Lee (jjlee)
Date: 2006-04-15 18:49

Message:
Logged In: YES 
user_id=261020

They are here: http://docs.python.org/lib/urllib2-examples.html

--

Comment By: Chris Withers (fresh)
Date: 2006-04-15 18:07

Message:
Logged In: YES 
user_id=24723

Where are these examples you're referring to?

I don't see any at:
http://docs.python.org/lib/module-urllib2.html

I've already commented that the existing ones in the
docstring would be a start but still don't really much help
in taking full advantage of this module.

--

Comment By: John J Lee (jjlee)
Date: 2006-04-15 17:34

Message:
Logged In: YES 
user_id=261020

Examples for urllib2 were added some time ago, so I suggest
this bug is closed.

--

Comment By: Chris Withers (fresh)
Date: 2004-06-01 08:17

Message:
Logged In: YES 
user_id=24723

I'm certainly willing, but I am totally incapable :-S

The reason I opened this issue is because it would seem that
urllib2 is better the urllib, but seems to be severely
underdocumented, and hence I don't understand how to use it
and so can't provide examples.

As I said in the original submission, including the module's
docstring in the Python module documentation would be a
start, but doesn't cover what appears to be the full
potential of a great module...

--

Comment By: Martin v. Löwis (loewis)
Date: 2004-05-31 21:15

Message:
Logged In: YES 
user_id=21627

Are you willing to provide examples?

--

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



[ python-Bugs-764437 ] AF_UNIX sockets do not handle Linux-specific addressing

2006-04-27 Thread SourceForge.net
Bugs item #764437, was opened at 2003-07-02 07:13
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=764437&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: Platform-specific
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Pavel Pergamenshchik (ppergame)
Assigned to: Nobody/Anonymous (nobody)
Summary: AF_UNIX sockets do not handle Linux-specific addressing

Initial Comment:
As described in unix(7) manpage, Linux allows for 
special "kernel namespace" AF_UNIX sockets defined. 
With such sockets, the first byte of the path is \x00, 
and the rest is the address. These sockets do not show 
up in the filesystem.
socketmodule.c:makesockaddr (as called by recvfrom) 
uses code like
PyString_FromString(a->sun_path)
to retrieve the address. This is incorrect -- on Linux, if 
the first byte of a->sun_path is null, the function should 
use PyString_FromStringAndSize to retrieve the full 108-
byte buffer.
I am not entirely sure that this is the only thing that 
needs to be fixed, but bind() and sendto() work with 
these sort of socket paths just fine.


--

Comment By: Armin Rigo (arigo)
Date: 2006-04-13 20:03

Message:
Logged In: YES 
user_id=4771

I'm about to check in a slightly different patch
(also at 1062014) which tries to preserve the length
of the abstract namespace addresses (the kernel saves
this length even though it is not zero-terminated,
so that the names '\x00abc' and '\x00abc\x00' and
'\x00abc\x00\x00' are all different in theory).
The patch no longer exposes UNIX_PATH_MAX because
I'm not sure it's useful any more.  If anyone who
is relying on this Linux extension more than myself
has comments, now would be a good time :-)

--

Comment By: Irmen de Jong (irmen)
Date: 2004-11-08 11:03

Message:
Logged In: YES 
user_id=129426

Patch is at 1062014

The comments below state that UNIX_PATH_MAX is defined in
sys/un.h, but it isn't. The patch gets it in another
(hopefully portable) way (and also exposes it as a new
constant in the socket module)

--

Comment By: Aaron Brady (insomnike)
Date: 2004-07-07 14:39

Message:
Logged In: YES 
user_id=1057404

It should use UNIX_PATH_MAX, but it should also check that
the length of the buffer supplied is correct, my bad.

--

Comment By: Pavel Pergamenshchik (ppergame)
Date: 2004-07-07 14:37

Message:
Logged In: YES 
user_id=595126

"""The socket’s address in this namespace is given by the
rest of the bytes in sun_path.  Note that names in the 
abstract namespace are not zero‐terminated."""

The length would be UNIX_PATH_MAX in this case.


--

Comment By: A.M. Kuchling (akuchling)
Date: 2004-07-07 14:04

Message:
Logged In: YES 
user_id=11375

Should it use UNIX_PATH_MAX as the length of the string, or
1+ strlen(a->sun_path+1)?  (The leading null byte, plus the
following null-terminated string?)

--

Comment By: Aaron Brady (insomnike)
Date: 2004-06-05 19:16

Message:
Logged In: YES 
user_id=1057404

Also checks for "linux" to be defined, on Mondragon's
recommendation.

###
--- socketmodule.c  3 Jun 2004 09:24:42 -   1.291
+++ socketmodule.c  5 Jun 2004 18:17:51 -
@@ -942,6 +942,11 @@
case AF_UNIX:
{
struct sockaddr_un *a = (struct sockaddr_un
*) addr;
+#if defined(UNIX_PATH_MAX) && defined(linux)
+   if (*a->sun_path == 0) {
+   return
PyString_FromStringAndSize(a->sun_path, UNIX_PATH_MAX);
+   }
+#endif /* UNIX_PATH_MAX && linux */
return PyString_FromString(a->sun_path);
}
 #endif /* AF_UNIX */
###

--

Comment By: Aaron Brady (insomnike)
Date: 2004-06-05 19:06

Message:
Logged In: YES 
user_id=1057404

The below patch adds the functionality if UNIX_PATH_MAX is
defined (in Linux it's in sys/un.h).

###
--- socketmodule.c  3 Jun 2004 09:24:42 -   1.291
+++ socketmodule.c  5 Jun 2004 18:08:47 -
@@ -942,6 +942,11 @@
case AF_UNIX:
{
struct sockaddr_un *a = (struct sockaddr_un
*) addr;
+#if defined(UNIX_PATH_MAX)
+   if (*a->sun_path == 0) {
+   return
PyString_FromStringAndSize(a->sun_path, UNIX_PATH_MAX);
+   }
+#endif /* UNIX_PATH_MAX */
return PyString_FromString(a->sun_path);
}
 #endif /* 

[ python-Bugs-1229380 ] No struct.pack exception for some out of range integers

2006-04-27 Thread SourceForge.net
Bugs item #1229380, was opened at 2005-06-28 16:30
Message generated for change (Comment added) made by isandler
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1229380&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: Adal Chiriliuc (adalx)
Assigned to: Neal Norwitz (nnorwitz)
Summary: No struct.pack exception for some out of range integers

Initial Comment:
struct.pack("B", -1) generates an OverflowError
exception since the B format corresponds to the
"unsigned char" type which can have values between 0
and 255.

But struct.pack("I", -1) and struct.pack("L", -1) do
not generate these errors, even if struct.pack("I",
-1L) and struct.pack("L", -1L) do (notice the final L).


--

Comment By: Ilya Sandler (isandler)
Date: 2006-04-27 07:46

Message:
Logged In: YES 
user_id=971153


Also it appears that there is some kind of interference
between range checking and byte-order chars:

  import struct; struct.pack("H", 7)  #Exception

  import struct; struct.pack(">H", 7) # no exception

--

Comment By: Georg Brandl (gbrandl)
Date: 2006-02-20 12:52

Message:
Logged In: YES 
user_id=849994

Attaching patch, raises struct.error. Neal, please look over it.

Note that I find struct's error handling confusing: it's not
clear from the docs in which cases OverflowError is raised,
and in which struct.error.

--

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



[ python-Bugs-1250389 ] The -m option to python does not search zip files

2006-04-27 Thread SourceForge.net
Bugs item #1250389, was opened at 2005-08-02 17:55
Message generated for change (Comment added) made by pmoore
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1250389&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: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Paul Moore (pmoore)
Assigned to: Nobody/Anonymous (nobody)
Summary: The -m option to python does not search zip files

Initial Comment:
The -m option, to run a module from sys.path as a main 
program, does not work when the module is in a zip file. 
Here is an example demonstrating:

D:\Data>type zipmtest.py
def a():
print "Hello, world"

if __name__ == '__main__':
a()

D:\Data>python -m zipmtest
Hello, world

D:\Data>zip -9 zipm zipmtest.*
  adding: zipmtest.py (92 bytes security) (deflated 8%)

D:\Data>set PYTHONPATH=zipm.zip

D:\Data>del zipmtest.py
Deleting D:\Data\zipmtest.py
 1 file deleted

D:\Data>python -m zipmtest
python: module zipmtest not found

D:\Data>python -c "import zipmtest"

(note the last import - python can find the zipmtest 
module quite happily, but -m misses it).

This is a fairly severe limitation on -m, particularly as 
use of "egg" distributions (which are basically zipfiles) 
becomes more common.

--

>Comment By: Paul Moore (pmoore)
Date: 2006-04-27 17:43

Message:
Logged In: YES 
user_id=113328

I can confirm that this has been fixed in 2.5a2

--

Comment By: Paul Moore (pmoore)
Date: 2005-11-10 10:26

Message:
Logged In: YES 
user_id=113328

I assume you meant PEP 338. I'm completely in favour of 
that. I didn't give feedback simply because I had nothing 
constructive to add beyond "+1"...

(And I agree that PEP 338 is more important than this bug - 
but I'd like to see both sorted :-))

--

Comment By: Nick Coghlan (ncoghlan)
Date: 2005-11-10 09:05

Message:
Logged In: YES 
user_id=1038590

I agree this is a significant limitation on -m, although I
think it actually pales in comparison to the fact you can't
use modules inside packages.

So please take a look at PEP 328 and provide feedback on it.
I've had absolutely *zero* feedback on it since I wrote it,
and have had to assume that no-one else was bothered by the
current limitations.

--

Comment By: Paul Moore (pmoore)
Date: 2005-08-11 19:33

Message:
Logged In: YES 
user_id=113328

I have looked into this, and it appears that
_PyImportHooks_Init is getting called properly, and the
zipimport mechanism is getting initialised (python -v -m a
where a.py is in a zip file on sys.path shows this).

The problem seems to be that main.c calls, in Py_Main,
_PyImport_FindModule, with the "loader" argument set to
NULL, which disables handling of PEP 302 style import hooks.
This makes sense, to the extent that the current code needs
a real FILE* to call PyRun_AnyFileExFlags, it should be
possible (by calling PyRun_SimpleStringFlags instead,
maybe?) to execute a module loaded from a hook.

Unfortunately, I can't take this any further at present, as
I don't have the means to build Python in order to test a patch.

--

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



[ python-Feature Requests-1477968 ] Drop py.ico and pyc.ico

2006-04-27 Thread SourceForge.net
Feature Requests item #1477968, was opened at 2006-04-27 22:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1477968&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: None
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: Martin v. Löwis (loewis)
Assigned to: Martin v. Löwis (loewis)
Summary: Drop py.ico and pyc.ico

Initial Comment:
These files should be dropped from the Windows
distribution, as they duplication python_icon.exe, and
confuse tab completion.

--

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



[ python-Bugs-1477450 ] test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

2006-04-27 Thread SourceForge.net
Bugs item #1477450, was opened at 2006-04-27 00:07
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1477450&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: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: shashi (shashikala)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

Initial Comment:

 Hi ,

 Iam building Python-2.4.3 on HP-UX 11.2i , while 
testing its npt able import the _bsddb.sl module and 
hence that is skipped . In previous versions the test 
is passing. what can be done to pass the test?.


Thanks,
shashi
 


--

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-04-27 20:11

Message:
Logged In: YES 
user_id=33168

The test can't pass without being able to import _bsddb.sl.
 Why can't this file be imported?  When you build python it
should print out what version of bsddb is found.  It will
look something like this:

running build
running build_ext
db.h: found (4, 1) in /usr/include
db lib: using (4, 1) db-4.1

What version of bsddb was found on your box?  Are there
compile errors when building bsddb?

--

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



[ python-Bugs-1477450 ] test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

2006-04-27 Thread SourceForge.net
Bugs item #1477450, was opened at 2006-04-27 14:07
Message generated for change (Comment added) made by shashikala
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1477450&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: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: shashi (shashikala)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

Initial Comment:

 Hi ,

 Iam building Python-2.4.3 on HP-UX 11.2i , while 
testing its npt able import the _bsddb.sl module and 
hence that is skipped . In previous versions the test 
is passing. what can be done to pass the test?.


Thanks,
shashi
 


--

>Comment By: shashi (shashikala)
Date: 2006-04-28 11:35

Message:
Logged In: YES 
user_id=1506183

Hi,
 I am having db-4.4.20 installed, It looks like Python 
doesn't support 4.4.20 version , hence i built 4.2.52 , now 
I am getting segmentation fault (memory fault) and its 
dumping core . I want to know the versions of the  
dependent libraries Python-2.4.3 supports and also while 
testing the Python test_subprocess.py is also dumping core. 
I am sending out the outputs of test_bsddb and 
test_subprocess.

  Thanks,
   shashi

--

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-04-28 10:11

Message:
Logged In: YES 
user_id=33168

The test can't pass without being able to import _bsddb.sl.
 Why can't this file be imported?  When you build python it
should print out what version of bsddb is found.  It will
look something like this:

running build
running build_ext
db.h: found (4, 1) in /usr/include
db lib: using (4, 1) db-4.1

What version of bsddb was found on your box?  Are there
compile errors when building bsddb?

--

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



[ python-Bugs-1477450 ] test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

2006-04-27 Thread SourceForge.net
Bugs item #1477450, was opened at 2006-04-27 00:07
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1477450&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: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: shashi (shashikala)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_bsddb skipped -- Failed to load /home/shashi/Python-2.4

Initial Comment:

 Hi ,

 Iam building Python-2.4.3 on HP-UX 11.2i , while 
testing its npt able import the _bsddb.sl module and 
hence that is skipped . In previous versions the test 
is passing. what can be done to pass the test?.


Thanks,
shashi
 


--

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-04-27 21:45

Message:
Logged In: YES 
user_id=33168

Support for db-4.4 was added late.  I believe the only thing
you need to do to enable it is modify setup.py, line 496
(proabably that line) should be:
max_db_ver = (4, 4)

>From what I've seen, you are much better off with newer
versions of bdb.

As for the seg faults, I wonder if your ulimits are too low.
 What is the output of:  ulimit -a

Also, can you attach the output of ./python
Lib/test/regrtest.py -v -u bsddb test_subprocess

and do the same for test_bsddb3 (or test_bsddb whichever is
crashing).

--

Comment By: shashi (shashikala)
Date: 2006-04-27 21:35

Message:
Logged In: YES 
user_id=1506183

Hi,
 I am having db-4.4.20 installed, It looks like Python 
doesn't support 4.4.20 version , hence i built 4.2.52 , now 
I am getting segmentation fault (memory fault) and its 
dumping core . I want to know the versions of the  
dependent libraries Python-2.4.3 supports and also while 
testing the Python test_subprocess.py is also dumping core. 
I am sending out the outputs of test_bsddb and 
test_subprocess.

  Thanks,
   shashi

--

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-04-27 20:11

Message:
Logged In: YES 
user_id=33168

The test can't pass without being able to import _bsddb.sl.
 Why can't this file be imported?  When you build python it
should print out what version of bsddb is found.  It will
look something like this:

running build
running build_ext
db.h: found (4, 1) in /usr/include
db lib: using (4, 1) db-4.1

What version of bsddb was found on your box?  Are there
compile errors when building bsddb?

--

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