[issue20021] "modernize" makeopcodetargets.py

2016-03-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Victor.

--
resolution:  -> fixed
stage:  -> 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



[issue20021] "modernize" makeopcodetargets.py

2016-03-25 Thread STINNER Victor

STINNER Victor added the comment:

> Or does it matter to be able to use an external python program?

Oh wait, I misunderstood how the script is used. I understood that the script 
must be run manually only when a new opcode is added and so is rarely used and 
only used with the built Python program.

In fact, the script is part of the build process! I completely missed that, 
sorry. I searched how it was used but I missed the build process.

So yes, it matters to support Python 2 and Python 3 in 
Python/makeopcodetargets.py.

I pushed Serhiy's patch issue20021_2.diff.

--

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2016-03-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6ceceb052394 by Victor Stinner in branch 'default':
makeopcodetargets.py: we need to import Lib/opcode.py
https://hg.python.org/cpython/rev/6ceceb052394

--
nosy: +python-dev

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2016-03-25 Thread STINNER Victor

STINNER Victor added the comment:

issue20021_2.diff looks good to me.

--

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2016-03-25 Thread STINNER Victor

STINNER Victor added the comment:

> Victor went with a different solution in f682b620c64d.

Oh sorry, I wasn't aware of this old issue. My motivation was to get ride of 
the deprecated imp module, this script looks to be the latest part of the 
Python which uses the imp module (except of deliberate unit tests on the imp 
module).


> f682b620c64d looks incorrect to me. It makes makeopcodetargets.py to use the 
> opcode module of Python that executes the script. Instead the script should 
> use the opcode module from the same source tree as the script.

Ah, this was unclear to me. It looks overcomplicated code to just import a 
module. Can't we simply use import, but ensure that the running python 
executable belongs to the current source tree?

Or does it matter to be able to use an external python program?


> I think f682b620c64d should be reverted.

Don't hesitate to rework the code to importlib if you want to ensure that 
Lib/opcode.py is imported.

But please don't revert the whole change, I changed other things.

--

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2016-03-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

f682b620c64d looks incorrect to me. It makes makeopcodetargets.py to use the 
opcode module of Python that executes the script. Instead the script should use 
the opcode module from the same source tree as the script.

I think f682b620c64d should be reverted.

--
priority: low -> high
resolution: out of date -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2016-03-25 Thread Berker Peksag

Berker Peksag added the comment:

Victor went with a different solution in f682b620c64d.

--
nosy: +haypo
resolution:  -> out of date
stage: patch review -> 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



[issue20021] "modernize" makeopcodetargets.py

2015-10-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Some of the buildbots have Python 2.5 as their system Python.

Here is a patch that is compatible with older Python versions.

--
nosy: +serhiy.storchaka
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file40670/issue20021_2.diff

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2015-10-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2015-04-09 Thread Berker Peksag

Berker Peksag added the comment:

I think makeopcodetargets.py should still be compatible with Python 2 (2.6 or 
2.7 at least) since it uses the system Python.

I'd suggest closing this as "rejected" (or just commit the ``with open(...):`` 
part of the patch and update the outdated comment).

--

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2015-04-09 Thread R. David Murray

R. David Murray added the comment:

The comment about staying compatibler with 2.3 is now clearly out of date :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2014-09-27 Thread Berker Peksag

Berker Peksag added the comment:

Here's a patch.

--
keywords: +patch
nosy: +berker.peksag, brett.cannon
stage: needs patch -> patch review
Added file: http://bugs.python.org/file36745/issue20021.diff

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2014-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +easy
stage:  -> needs patch

___
Python tracker 

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



[issue20021] "modernize" makeopcodetargets.py

2013-12-18 Thread Eric Snow

New submission from Eric Snow:

Python/makeopcodetargets.py uses deprecated imp APIs.  It should be refactored 
to use newer import-related APIs.

--
components: Library (Lib)
messages: 206577
nosy: eric.snow
priority: low
severity: normal
status: open
title: "modernize" makeopcodetargets.py
type: enhancement
versions: Python 3.5

___
Python tracker 

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