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

Enable some Python 3 testing. #768

Merged
merged 8 commits into from Feb 23, 2018

Conversation

Projects
None yet
3 participants
@jmchilton
Copy link
Member

jmchilton commented Feb 22, 2018

Lets see if these pass on Travis.

@jmchilton

This comment has been minimized.

Copy link
Member Author

jmchilton commented Feb 22, 2018

Well that found a bunch of Python 3 bugs at least...

@jmchilton jmchilton force-pushed the jmchilton:py3_quick branch from 4e1204e to cc3a95e Feb 22, 2018

@nsoranzo nsoranzo referenced this pull request Feb 22, 2018

Merged

Small Fixes #88

@nsoranzo nsoranzo force-pushed the jmchilton:py3_quick branch from 47927dc to deba8d6 Feb 22, 2018

@nsoranzo

This comment has been minimized.

Copy link
Member

nsoranzo commented Feb 22, 2018

Down to 2 failures! I have another commit ready that will fix the first once galaxyproject/galaxy-lib#89 is merged.

@jmchilton

This comment has been minimized.

Copy link
Member Author

jmchilton commented Feb 23, 2018

A freshly minted galaxy-lib 17.9.12 has been pushed to PyPI with your fix, thanks a bunch!

jmchilton and others added some commits Feb 22, 2018

Try enabling more Python 3 testing.
With corresponding fixes.

- Fix unneeded decode in test_shed_upload.
- Update to latest version of gxformat2 for Python 3 fixes (jmchilton/gxformat2#1).
Python3: unicodify subprocess stdout
Fix the following error:
```
File "/home/travis/build/galaxyproject/planemo/planemo/database/postgres.py", line 27, in list_databases
    identifiers.append(line.split("|")[0].strip())
TypeError: 'str' does not support the buffer interface
Fix conditionally_captured_io under Python3
Fix this failing test:
```
======================================================================
FAIL: Test :func:`planemo.io.conditionally_captured_io`.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/galaxyproject/planemo/.tox/py34-quick/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/galaxyproject/planemo/tests/test_io.py", line 12, in test_io_capture
    assert_equal(capture[0]["data"], "Problem...")
  File "/home/travis/build/galaxyproject/planemo/tests/test_utils.py", line 235, in assert_equal
    assert a == b, "%s != %s" % (a, b)
nose.proxy.AssertionError: Problem... != Problem...
    """Assert two things are equal."""
>>  assert '\x1b[31mProblem...\x1b[0m' == 'Problem...', "%s != %s" % ('\x1b[31mProblem...\x1b[0m', 'Problem...')
```

@nsoranzo nsoranzo force-pushed the jmchilton:py3_quick branch from deba8d6 to 215bcb5 Feb 23, 2018

@nsoranzo

This comment has been minimized.

Copy link
Member

nsoranzo commented Feb 23, 2018

Rebased and green!

@@ -300,7 +300,7 @@ def _build_galaxy(**kwds):
# process raw cite urls
cite_urls = kwds.get("cite_url", [])
del kwds["cite_url"]
citations = map(UrlCitation, cite_urls)
citations = list(map(UrlCitation, cite_urls))

This comment has been minimized.

@peterjc

peterjc Feb 23, 2018

Contributor

How about using a list comprehension here?

citations = [UrlCitation(url) for url in cite_urls]

Or, using the _ variable:

citations = [UrlCitation(_) for _ in cite_urls]

This comment has been minimized.

@nsoranzo

nsoranzo Feb 23, 2018

Member

Funnily we discussed this yesterday in a galaxy-lib PR: galaxyproject/galaxy-lib#88 (comment)

@jmchilton jmchilton merged commit e074e70 into galaxyproject:master Feb 23, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jmchilton

This comment has been minimized.

Copy link
Member Author

jmchilton commented Feb 23, 2018

Wonderful, wonderful - thanks so much @nsoranzo - this is amazing.

@jmchilton jmchilton changed the title Try enabling more Python 3 testing. Enabling some Python 3 testing. Feb 23, 2018

@jmchilton jmchilton changed the title Enabling some Python 3 testing. Enable some Python 3 testing. Feb 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment