[issue30166] Import command-line parsing modules only when needed

2020-09-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
stage: backport needed -> 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



[issue30166] Import command-line parsing modules only when needed

2020-09-19 Thread Irit Katriel


Irit Katriel  added the comment:

Looks like the backport was done and this issue can be closed.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue30166] Import command-line parsing modules only when needed

2017-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset c0ef607c52e58e94693fbedb27f2813bc3fed8fa by terryjreedy in branch 
'3.6':
[3.6] bpo-30166: backport pyshell changes (GH 1293) (#2098)
https://github.com/python/cpython/commit/c0ef607c52e58e94693fbedb27f2813bc3fed8fa


--

___
Python tracker 

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



[issue30166] Import command-line parsing modules only when needed

2017-06-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2154

___
Python tracker 

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



[issue30166] Import command-line parsing modules only when needed

2017-05-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I want to backport the idlelib.pyshell change.  I have been told that even a 
partial backport, even if done by hand, is a backport and the result a 
cherry-pick.

--
assignee: serhiy.storchaka -> terry.reedy
nosy: +terry.reedy
stage: resolved -> backport needed
status: closed -> open
versions: +Python 3.6 -Python 3.7

___
Python tracker 

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



[issue30166] Import command-line parsing modules only when needed

2017-05-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
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



[issue30166] Import command-line parsing modules only when needed

2017-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 7e4db2f253c68d56177c2fd083bcf8f88d34 by Serhiy Storchaka in 
branch 'master':
bpo-30166: Import command-line parsing modules only when needed. (#1293)
https://github.com/python/cpython/commit/7e4db2f253c68d56177c2fd083bcf8f88d34


--

___
Python tracker 

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



[issue30166] Import command-line parsing modules only when needed

2017-04-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +aronacher, berker.peksag, bethard

___
Python tracker 

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



[issue30166] Import command-line parsing modules only when needed

2017-04-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1400

___
Python tracker 

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



[issue30166] Import command-line parsing modules only when needed

2017-04-26 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Berker suggested to move this part from issue30152 to its own PR.

When the file can be imported as a module and run as a script it is worth to 
make command-line parsing modules (getopt, optparse, argparse) be imported only 
when they are used, i.e. when the file is ran as a script. Most of the stdlib 
modules already do this.

Proposed patch moves imports of command-line parsing modules and some other 
modules used only when the module is ran to the main() function or to the 
branch executed only if __name__ == "__main__". It doesn't change scripts and 
files that are purposed to be used only for running (__main__.py, main.py).

--
components: Library (Lib)
messages: 292319
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Import command-line parsing modules only when needed
type: enhancement
versions: Python 3.7

___
Python tracker 

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