Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_checkconfig: always create different config dir #2704

Merged
merged 2 commits into from Feb 1, 2017

Conversation

tardyp
Copy link
Member

@tardyp tardyp commented Feb 1, 2017

fix for python3

It looks like python3 added some optimization for the import method.

both tests are importing files from _trialtemp/configdir , but between the two tests, the list available modules actually change.

In the second test however, if you run from within the same python runtime, then python won't look again at the directory, and thus wont see it has changed since last time.
So it will not find the new module. If we change 'configdir' with mkstemp, then it will work.

also remove a warning from https://twistedmatrix.com/trac/ticket/9023#ticket

fix for python3

It looks like python3 added some optimization for the import method.

both tests are importing files from _trialtemp/configdir , but between the two tests, the list available modules actually change.

In the second test however, if you run from within the same python runtime, then python won't look again at the directory, and thus wont see it has changed since last time.
So it will not find the new module. If we change 'configdir' with mkstemp, then it will work.

also remove a warning from https://twistedmatrix.com/trac/ticket/9023#ticket
@@ -119,3 +119,6 @@

# FIXME: needs to be sorted out (#3666)
warnings.filterwarnings('ignore', "Invalid utf8 character string")

# twisted.compat.execfile is using 'U' https://twistedmatrix.com/trac/ticket/9023
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is triggering lint errors. Not sure what you want to do here, but I say to waste less time,
leave it out, and for now only test Py3 against Twisted from trunk.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is important to keep the comment. the spellcheck linter must not encourage us to write less comments! @rutsky

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@rodrigc rodrigc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this patch on Python 2.7 and Python 3.6, and it works and solves the problem I saw.

Eliminate the lint warning somehow. My recommendation is just to nuke the comment, since the problem in twisted is fixed upstream.

@tardyp tardyp merged commit 85faaca into buildbot:master Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants