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

remove use of sudo in Travis config #11

Closed
wants to merge 1 commit into from
Closed

remove use of sudo in Travis config #11

wants to merge 1 commit into from

Conversation

dougxc
Copy link
Member

@dougxc dougxc commented Jan 26, 2016

No description provided.

@gilles-duboscq
Copy link
Member

Interesting error in the 2.6 Travis job. from mx import DateTime is really code from optik_ext.py that is used by pylint.

@dougxc
Copy link
Member Author

dougxc commented Jan 26, 2016

Rather than figure out why this is happening, I say we leave the sudo usage in.

@dougxc dougxc closed this Jan 27, 2016
@dougxc dougxc deleted the no-sudo branch January 27, 2016 14:51
@gilles-duboscq
Copy link
Member

I noticed that in fact this is actually showing that we are not 2.6 compatible: on the non-sudo infrastructure we really get python 2.6 and we have syntax problems.
All the other travis builds that seem to be using 2.6 are actually running on 2.7: the mx script is picking up a 2.7 install which, while not default, is present on the sudo-enabled builders.

@dougxc
Copy link
Member Author

dougxc commented Jan 29, 2016

Currently, mx is not 2.6 compatible. The few uses of multi-context-manager with statements and single use of OrderedDict can be replaced with 2.6 compatible code. However, the argparse module was only introduced in 2.7. A workaround for this is to simply place argparse.py on PYTHONPATH.
The bigger question is whether we really need to worry about 2.6 compatibility?

@mbrantner
Copy link
Member

Oracle Linux 6.5 comes with Pyton 2.6.6. It would be great if that was supported.

@dougxc
Copy link
Member Author

dougxc commented Jan 29, 2016

I can make mx parse with 2.6 fairly easy by making the changes mentioned above. However, usages of certain 2.7 features will only be caught dynamically. The biggest offender I know of is "Changed in version 2.7: The positional argument specifiers can be omitted, # so '{} {}' is equivalent to '{0} {1}'.".

@gilles-duboscq
Copy link
Member

The {} can easily be grepped.
In any case, we should either make it 2.6 compatible or stop testing using 2.6.
Regarding argparse, that would be an other advantage of being a python package with a setup.py: we could just require argparse as a dependency.
One problem there is that there is already a python package called mxon pypi...

@dougxc
Copy link
Member Author

dougxc commented Jan 31, 2016

Grepping for the pattern "[^"\n]+\{\} shows 39 hits and "[^"\n]+\{\} shows 106 hits in the mx related Python files I have open in Eclipse. These will have to be converted. Unfortunately, I can't see a pylint check to prevent them creeping back in.

@dougxc
Copy link
Member Author

dougxc commented Feb 1, 2016

I've further investigated the work required to make mx 2.6 compatible and enforce this compatibility on all mx extensions and it's not exactly trivial due to the issue with {} in format specifiers mentioned above. One can use the ast Python module to parse for string constants containing {} but it's hard to know whether they're used as format strings. Also, there's nothing preventing a format string being non-constant. In any case, until there's a more compelling reason to support 2.6, I'm going to disable 2.6 testing.

dougxc pushed a commit that referenced this pull request Apr 6, 2016
…x:topic/flaky-success to master

* commit 'aaf81e9e723992d7478ed9f7d473eb84fac645a6':
  Replace `is` with `==` in variable name matching, fix interpolation.
  Change format of the output file to have a top-level object.
  Override exit code if a `flakySuccessPattern` matches.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants