Author terry.reedy
Recipients koobs, terry.reedy, vstinner
Date 2019-09-16.19:30:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568662258.9.0.0623443244927.issue38183@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-09-16 19:30:58terry.reedysetrecipients: + terry.reedy, vstinner, koobs
2019-09-16 19:30:58terry.reedysetmessageid: <1568662258.9.0.0623443244927.issue38183@roundup.psfhosted.org>
2019-09-16 19:30:58terry.reedylinkissue38183 messages
2019-09-16 19:30:58terry.reedycreate