Terry J. Reedy <tjre...@udel.edu> added the comment:

>From IDLE's viewpoint, the 2.7 failures are the same.  In current 3.x, 
>GetUserCfgDir has

    warn = ('\n Warning: unable to create user config directory\n' +
            userDir + '\n Check path and permissions.\n Exiting!\n')
    if not idlelib.testing:
        print(warn, file=sys.stderr)
    raise SystemExit

In 2.7. the conditional clause is not there because idlelib.testing does not 
exist.  It was added to avoid 3.x regrtest resource-changed checks that either 
were not backported to 2.7 or are not triggered by the smaller 2.7 set of IDLE 
tests.

The irony of the failures is that the tests are carefully written to pass 
regardless of user config values, if any, and never alter them.  Only 
test_config and test_configdialog actually *need* to access the config 
machinery.  Other tests could mock idleConf.

PR 16198 has a minimal fix that works on my Windows machine.  A 2.7 backport, 
which must be manual, will require the addition of idlelib.testing and its 
setting it test_idle.  I will wait for passes from buildbots, not just the CI.

Followup issues:

0. For 'other tests', mock idleConf and run a bit faster.

1. If ignoring .idlerc this way works, simplify some of the tests by setting 
idlelib.testing to True instead of duplicating what IdleConf will now  do.

2. Minimally implement "# TODO continue without userDIr instead of exit".  
Replace "raise SystemExit" with "return ''" and add warnings that configuration 
changes will disappear when exiting IDLE.

----------
stage: patch review -> commit review
type:  -> behavior
versions: +Python 2.7, Python 3.7, Python 3.8

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

Reply via email to