[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3c39413d277f by Terry Jan Reedy in branch '2.7':
Issue #24199: Add stacklevel to deprecation warning call.
https://hg.python.org/cpython/rev/3c39413d277f

New changeset 048fce602bcd by Terry Jan Reedy in branch '3.4':
Issue #24199: Add stacklevel to deprecation warning call.
https://hg.python.org/cpython/rev/048fce602bcd

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I get it now: the last line should be 'import idlelib.idlever' instead of the 
redundant line from idlever itself.  Will change, and thanks for correcting 
this before I so the same in multiple other modules.

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-18 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

> Since I am not wrapping the warning, the default stacklevel seems to work on 
> all versions.

The purpose of stacklevel=2 here would be to make warning message indicate 
which file contains import of deprecated module.

See below example, which shows that stacklevel=2 in formatter.py and imp.py 
results in message pointing to bbb.py as containing imports of deprecated 
modules:

$ cat aaa.py
import bbb
$ cat bbb.py
import formatter
import imp
import idlelib.idlever
$ python3.5 -Wd -c 'import aaa'
/tmp/bbb.py:1: DeprecationWarning: the formatter module is deprecated and will 
be removed in Python 3.6
  import formatter
/tmp/bbb.py:2: PendingDeprecationWarning: the imp module is deprecated in 
favour of importlib; see the module's documentation for alternative uses
  import imp
/usr/lib64/python3.5/idlelib/idlever.py:10: DeprecationWarning: 
The separate Idle version was eliminated years ago;
idlelib.idlever is no longer used by Idle
and will be removed in 3.6 or later.  Use
from sys import version
IDLE_VERSION = version[:version.index(' ')]

  w.warn(__doc__, DeprecationWarning)
$

--
nosy: +Arfrever

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 55b62e2c59f8 by Terry Jan Reedy in branch '2.7':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/55b62e2c59f8

New changeset c51514826126 by Terry Jan Reedy in branch '3.4':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/c51514826126

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks, Brett. Since I am not wrapping the warning, the default stacklevel 
seems to work on all versions.

Still to do: 1. Something in the docs (all branches), but with an eye toward 
other deprecations coming later.

2. Actually remove file in 3.6 branch, but only after ImportError does not 
crash Python when running without a console (ie, with sys.stderr == None)).  An 
future issue to fix this will be a dependency.

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

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Re-opening because there is still the issue of adding a deprecation warning on 
import.  Brett, can you either point me toward or post here the code you are 
planning to use for other stdlib modules?

--
nosy: +brett.cannon
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Brett Cannon

Brett Cannon added the comment:

Typically it's warnings.warn(message, DeprecationWarning, stacklevel=2), but 
that stack level is wrong for Python 3.3 - 3.4 (fixed in 3.5.0). If this is 
purely for Python 3.6 I might be adding a nicer API for module deprecations, 
but if this is for other versions then the call above is the right one except 
for Python 3.3/3.4.

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 117af4bc0513 by Benjamin Peterson in branch '2.7':
make idlever.py self-updating (closes #24199)
https://hg.python.org/cpython/rev/117af4bc0513

--
resolution:  - fixed
stage: needs patch - resolved
status: open - closed

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

To answer my question, I checked test___all__.py. The check_all helper has this:
with support.check_warnings(
(.* (module|package), DeprecationWarning),
(, ResourceWarning),
quiet=True):
I presume this means that DeprecationWarnings raised by the following import 
are suppressed.  (There is also a  blacklist.)

--

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c473ac171041 by Terry Jan Reedy in branch '2.7':
Issue #24199: Stop using idelver in aboutdialog.
https://hg.python.org/cpython/rev/c473ac171041

New changeset c862166060ed by Terry Jan Reedy in branch '3.4':
Issue #24199: Make idlever module self updating. Syop using it in aboutDialog.
https://hg.python.org/cpython/rev/c862166060ed

--
nosy: +python-dev

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Benjamim, I made idlever update from sys.version until removed, so remove it 
from release process.

Serhiy, yes there are extensions which might possibly use this private api, 
even if they really should not.  I want to bring Nick (PEP 434 approver) into 
the discussion of the timing of removal.

Is there any problem with respect to buildbots of raising a DeprecationWarning 
when a module is imported?  Is so, can a module be excluded from the import all 
test?

--

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Are there third-party IDLE plugins? If yes, this change can break them.

--
nosy: +serhiy.storchaka

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-14 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Once upon a time, Idle was versioned separately from Python, though updated in 
lockstep with Python (#1515164, Martin's comment). The version was kept in 
idlever.py, with one line
IDLE_VERSION = m.n.p

Several years ago, the separate versioning was dropped (or decreed to be the 
same as the Python version -- no issue for this). idlever.py was kept and made 
to contain the initial part of sys.version (sys.version.split()[0]).  It gets 
patched as part of the version bump process,  Most recently 80ccce248ba2 
(Benjamin) and 413e0e0004f4 (Larry). Is that part of an automated script?

The only current use of idlever is for the About Idle box (aboutDialog.py), 
which prints two lines with redundant information:
'Python version:  ' + sys.version.split()[0]
'IDLE version:   ' + idlever.IDLE_VERSION

idlever.py is not needed and I intend to remove it.  But before or as I do, its 
patching needs to be removed from the version bump process.

I would also like to remove IDLE version ... from the dialog box, but even if 
not, idlever.py is not needed.

--
assignee: terry.reedy
components: IDLE
messages: 243237
nosy: benjamin.peterson, larry, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Idle: remove idlelib.idlever.py and its use in About dialog
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-05-14 Thread Benjamin Peterson

Benjamin Peterson added the comment:

That's fine. Just delete idlever.py, and I'll deal with it.

--

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