[issue8400] zipimporter find_module fullname mis-documented

2020-01-24 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2019-05-16 Thread Brett Cannon


Brett Cannon  added the comment:

Actually find_module() should be deprecated and find_spec() should be defined 
instead (and the same goes for load_module(); see bpo-9699). So I'm personally 
fine w/ making this a doc problem w/ the plan to eventually deprecate the 
method.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2019-05-15 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This still exists after zipimport rewrite in Python with 3.8 . Is this a 
documentation issue or an enhancement to be made as noted in msg109467 ?

--
nosy: +serhiy.storchaka, xtreak
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2015-08-05 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +brett.cannon, gregory.p.smith, superluser

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2015-08-05 Thread Eric Snow

Changes by Eric Snow :


--
versions: +Python 3.4, Python 3.5, Python 3.6 -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2012-11-14 Thread Te-jé Rodgers

Te-jé Rodgers added the comment:

It gets worse. Even though find_module works with the path separator, 
load_module fails.


>>> zi.find_module("lib\\ui")

>>> zi.load_module("lib\\ui")
Traceback (most recent call last):
  File "", line 1, in 
  File "dist/Test_Editor-1.0-py3.2.zip\lib\ui\__init__.py", line 9, in 
  File "dist\Test_Editor-1.0-py3.2.zip\lib\ui\texteditorwindow.py", line 5, in 

  File "dist\Test_Editor-1.0-py3.2.zip\lib\ui\designer\__init__.py", line 5, in 

ValueError: Attempted relative import beyond toplevel package

--
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2012-11-14 Thread Te-jé Rodgers

Te-jé Rodgers added the comment:

Disregard the last...error on my part (so embarrassing!)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2012-11-13 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2012-11-13 Thread Te-jé Rodgers

Te-jé Rodgers added the comment:

I have also just been bitten by this. Is there anyway that this can be updated 
to support the dotted notation?

--
nosy: +tjd.rodgers

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2011-04-27 Thread Ram Rachum

Ram Rachum  added the comment:

I was bitten now as well...

--
nosy: +cool-RR

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2010-08-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> unit test needed
versions: +Python 3.2 -Python 2.5, Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2010-07-07 Thread Ryan Kelly

Ryan Kelly  added the comment:

Was also just bitten by this, trying to muck with PEP-302-style import hooks.  
Note that the documented behaviour of zipimporter is also the behaviour 
required by PEP 302, i.e. full dotted module name.

--
nosy: +rfk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8400] zipimporter find_module fullname mis-documented

2010-04-14 Thread Karen Tracey

New submission from Karen Tracey :

The fullname parameter to zipimporter find_module is documented to be a "fully 
qualified (dotted) module name". (From 
http://docs.python.org/library/zipimport.html#zipimport.zipimporter.find_module.)
 However, passing a fully-qualified dotted module appears to never work. Rather 
it appears that you must use the file system path separator instead of dots. 
For example on Windows:

C:\>echo %pythonpath%
\tmp\blah-1.0-py2.6.egg

C:\>python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from blah.models import speak
>>> speak.__file__
'C:\\tmp\\blah-1.0-py2.6.egg\\blah\\models\\speak.pyc'
>>> speak.sayhi()
Hi from blah.models.speak sayhi function.

The egg has top-level blah package and under it models, it appears to work fine 
for normal use.  But zipimport zipimporter find_module won't find the models 
sub-module using dotted path notation:

>>> import sys
>>> sys.path[1]
'C:\\tmp\\blah-1.0-py2.6.egg'
>>> import zipimport
>>> zi = zipimport.zipimporter(sys.path[1])
>>> zi.find_module('blah')

>>> zi.find_module('blah.models')
>>> zi.find_module('blah/models')
>>> zi.find_module('blah\\models')

>>>

On Linux, the 'blah/models' version is the one that works.

Tested as far back as Python2.3 and as far forward as 2.7a3.

--
messages: 103132
nosy: kmtracey
severity: normal
status: open
title: zipimporter find_module fullname mis-documented
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com