[issue20899] Nested namespace imports do not work inside zip archives

2014-03-12 Thread Andrey Antsut

New submission from Andrey Antsut:

Importing modules from subdirectories as implicit namespace packages (PEP 
420) inside a ZIP archive only works one level deep. Imports from within nested 
namespaces fail with ImportError: No module named 'XXX'.

I am attaching an archive with example directory/file structure. To reproduce 
the problem, run the following from where you unzipped it:

python
 import sys
 sys.path += ['project1', 'project2.zip', 'project3', 'project4.zip']
 import parent.child.hello1
Hello 1
 import parent.child.hello2
ImportError: No module named 'parent.child.hello2'
 import parent.child.hello3
Hello 3
 import parent.child.hello4
ImportError: No module named 'parent.child.hello4'
 import boo
boo!
 import parent.boo
boo!

Tested on WinXP SP3 with Python 3.3.5 and 3.4.0rc3.

--
files: reproduce.zip
messages: 213290
nosy: Andrey.Antsut
priority: normal
severity: normal
status: open
title: Nested namespace imports do not work inside zip archives
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file34380/reproduce.zip

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



[issue20852] Embedding with zipped standard library is broken in 3.3.4 (Windows)

2014-03-04 Thread Andrey Antsut

New submission from Andrey Antsut:

When embedding Python into C++, Py_Initialize() crashes with following errors 
if the standard library (python33\lib) is in a zip archive (e.g. python33.zip):

Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

This seems to be specific to Python 3.3.4: works fine with 3.3.2 and 3.3.3, not 
tested with other versions. Tested only on Windows.

More details with code examples can be found here:

http://stackoverflow.com/questions/22174760/embedding-python-3-3-in-c-from-zipped-standard-library-on-windows-xp

--
messages: 212744
nosy: Andrey.Antsut
priority: normal
severity: normal
status: open
title: Embedding with zipped standard library is broken in 3.3.4 (Windows)
type: crash
versions: Python 3.3

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



[issue20852] Embedding with zipped standard library is broken in 3.3.4 (Windows)

2014-03-04 Thread Andrey Antsut

Andrey Antsut added the comment:

Just checked - confirming that it works with 3.3.5rc2.

--
status: pending - open

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