New submission from Lumír Balhar:

Hello.

I've found a really strange difference between Python 3.5 and 3.6 related to 
namespace packages and I cannot find any note in changelogs.

I've created a simple bash script which can reproduce my issue using virtual 
environments: http://pastebin.com/j3fXMtR4

This script creates a virtual environment, installs marrow.util from PyPI which 
is one part of namespace package and creates the other part (marrow.mailer) in 
the local folder. Then script tries to import marrow.util and marrow.mailer - 
and there is the difference.

In Python 3.5 - I can import marrow.util (installed via pip) but I cannot 
import local marrow.mailer module. I think that this is right behavior.
In Python 3.6 - I cannot import marrow.util (installed via pip) but I can 
import local marrow.mailer module.

Python versions are 3.5.2 (installed from Fedora repositories) and 3.6.0 
(compiled manually).

Why there is such a big difference? Am I missing something?

I tried to ask on IRC, stackoverflow etc. but without success. Could you please 
explain the reason for this behavior to me?

Thank you and have a nice day.
Lumír

Bash script attached

----------
files: test_namespace_package.sh
messages: 284587
nosy: frenzy
priority: normal
severity: normal
status: open
title: Implicit namespace packages in Python 3.6
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file46129/test_namespace_package.sh

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29144>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to