[issue15482] __import__() change between 3.2 and 3.3

2012-08-05 Thread Brett Cannon

Brett Cannon added the comment:

I just realized my reply was unclear; I meant changing 
Doc/library/functions.rst, not the code.

And 3.3 already has a versionchanged note about no longer accepting negative 
indexes, but I will update it to mention the new default as well explicitly.

--

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



[issue15482] __import__() change between 3.2 and 3.3

2012-08-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3fe01f7520e2 by Brett Cannon in branch '3.2':
Issue #15482: Properly document the default 'level' parameter for
http://hg.python.org/cpython/rev/3fe01f7520e2

New changeset 05bec2e78a5c by Brett Cannon in branch 'default':
Issue #15482: Merge 78449:3fe01f7520e2 with a minor clarification.
http://hg.python.org/cpython/rev/05bec2e78a5c

--
nosy: +python-dev

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



[issue15482] __import__() change between 3.2 and 3.3

2012-08-05 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
resolution:  - fixed
status: open - closed

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



[issue15482] __import__() change between 3.2 and 3.3

2012-07-29 Thread Martin v . Löwis

Martin v. Löwis added the comment:

So should 3.2 be changed to adjust the default value to match the documentation?

--
nosy: +loewis

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



[issue15482] __import__() change between 3.2 and 3.3

2012-07-29 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue15482] __import__() change between 3.2 and 3.3

2012-07-29 Thread Brett Cannon

Brett Cannon added the comment:

On Jul 29, 2012 5:58 AM, Martin v. Löwis rep...@bugs.python.org wrote:


 Martin v. Löwis added the comment:

 So should 3.2 be changed to adjust the default value to match the
documentation?

It is probably safe to do so.

-brett


 --
 nosy: +loewis

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue15482
 ___

--

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



[issue15482] __import__() change between 3.2 and 3.3

2012-07-28 Thread Ronan Lamy

New submission from Ronan Lamy:

I noticed a change in the behaviour of __import__() between 3.2 and 3.3. It 
looks like in 3.2 __import__() does a Py2-style combo relative/absolute import. 
Here's a minimal test case:

$ ls foo
bar.py  __init__.py  __pycache__
$ cat foo/__init__.py
__import__('bar', globals(), locals())
$ python3.3 -c import foo
Traceback (most recent call last):
  File string, line 1, in module
  File ./foo/__init__.py, line 1, in module
__import__('bar', globals(), locals())
ImportError: No module named 'bar'
$ python3.2 -c import foo
$

I believe that 3.3 is correct and that 3.2 is wrong but can't be changed now, 
so I suppose that 3.2 should just document the actual behaviour of __import__() 
and 3.3 should document the change. 

(The context is that I encountered issue 15434. This looks related, but I'm not 
sure it is.)

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 166706
nosy: Ronan.Lamy, brett.cannon, docs@python, ncoghlan
priority: normal
severity: normal
status: open
title: __import__() change between 3.2 and 3.3
versions: Python 3.2, Python 3.3

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



[issue15482] __import__() change between 3.2 and 3.3

2012-07-28 Thread Eric Snow

Eric Snow added the comment:

See issue14592 (particularly msg158466).

--
nosy: +eric.snow

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



[issue15482] __import__() change between 3.2 and 3.3

2012-07-28 Thread Nick Coghlan

Nick Coghlan added the comment:

The specific bug is that, in 3.2, the claimed default (level=0) is not 
accurate: the default is actually (level=-1), as it was in 2.x. The import 
statement passes level=0 explicitly (as it does in 2.x when from __future__ 
import absolute_import is in effect).

The docstring in 3.2 is accurate, the prose documentation is incorrect.

In 3.3, the docstring is currently wrong, but the prose documentation is 
correct. However, it should have a versionchanged: 3.3 not added, indicating 
that the default import level has finally been brought into compliance with the 
documentation.

--

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



[issue15482] __import__() change between 3.2 and 3.3

2012-07-28 Thread Nick Coghlan

Nick Coghlan added the comment:

s/not added/note added/

--

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