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

DRAFT - DO NOT MERGE Convert python 3 - DO NOT MERGE #140

Open
wants to merge 181 commits into
base: master
Choose a base branch
from

Conversation

danstoner
Copy link
Contributor

A fair amount of manual testing left to do, and actually working out a deployment plan for Data API, etc. but this is ready for review.

Dan Stoner and others added 30 commits November 13, 2020 21:23
- change setup.py to stop install if trying to use python 2
- read config as "text" so json.loads does not complain about "bytes"
- "cPickle" should now be referenced via standard "pickle" import.
  See: https://docs.python.org/3.1/whatsnew/3.0.html#library-changes
    > A common pattern in Python 2.x is to have one version of a module implemented in pure Python,
    > with an optional accelerated version implemented as a C extension; for example, pickle and cPickle.
    > This places the burden of importing the accelerated version and falling back on the pure Python
    > version on each user of these modules. In Python 3.0, the accelerated versions are considered
    > implementation details of the pure Python versions. Users should always import the standard version,
    > which attempts to import the accelerated version and falls back to the pure Python version. The
    > pickle / cPickle pair received this treatment.
…unction

- change setup.py to stop install if trying to use python 2
- read config as "text" so json.loads does not complain about "bytes"
- "cPickle" should now be referenced via standard "pickle" import.
  See: https://docs.python.org/3.1/whatsnew/3.0.html#library-changes
    > A common pattern in Python 2.x is to have one version of a module implemented in pure Python,
    > with an optional accelerated version implemented as a C extension; for example, pickle and cPickle.
    > This places the burden of importing the accelerated version and falling back on the pure Python
    > version on each user of these modules. In Python 3.0, the accelerated versions are considered
    > implementation details of the pure Python versions. Users should always import the standard version,
    > which attempts to import the accelerated version and falls back to the pure Python version. The
    > pickle / cPickle pair received this treatment.
- use print function from __future__
- use correct format for date spec
…unction

- change setup.py to stop install if trying to use python 2
- read config as "text" so json.loads does not complain about "bytes"
- "cPickle" should now be referenced via standard "pickle" import.
  See: https://docs.python.org/3.1/whatsnew/3.0.html#library-changes
    > A common pattern in Python 2.x is to have one version of a module implemented in pure Python,
    > with an optional accelerated version implemented as a C extension; for example, pickle and cPickle.
    > This places the burden of importing the accelerated version and falling back on the pure Python
    > version on each user of these modules. In Python 3.0, the accelerated versions are considered
    > implementation details of the pure Python versions. Users should always import the standard version,
    > which attempts to import the accelerated version and falls back to the pure Python version. The
    > pickle / cPickle pair received this treatment.
- use print function from __future__
- use correct format for date spec
To resolve deprecation warnings about invalid escape sequences:

  DeprecationWarning: invalid escape sequence

which occur when trying to use single backslashes in string literals.
To resolve the following deprecation warning:

DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

1.3.0 seems to be the newest version of gevent that both eliminates the deprecation
warning and also does not cause other dependency issues (such as requiring a newer greenlet).
key.md5 returns a bytes object, not a string.  This leads to a mismatch when bytes are compared
to a str.

  boto.exception.S3DataError: BotoClientError:
    MD5 of downloaded did not match given MD5: b'bac1d6137adc8974f200173b6a4f05b8' vs. bac1d6137adc8974f200173b6a4f05b8

This seems to be caused by an interaction between 'boto' and 'six'.

We are already using the latest version of these libraries.
Also a comment cleanup (item already fixed).
From https://docs.python.org/3/library/json.html

  The json module always produces str objects, not bytes objects.
  Therefore, fp.write() must support str input.
Travis pipeline is failing with the following error:

E   ValueError: greenlet.greenlet has the wrong size, try recompiling. Expected 40, got 128

Possible fixes:

gevent/gevent#1260
travis_wait does not work with docker build as argument (triggers abort).

use travis db account when connecting

diff --git a/.travis.yml b/.travis.yml
index 5f55642..3e5fc60 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,10 +15,10 @@ git:
   depth: 1

 install:
-- travis_wait 20 docker build -t $BUILDING .
+- docker build -t $BUILDING .
 - echo "docker build complete!"
-- psql -U postgres -c 'create database test_idigbio;'
-- psql -U postgres -c "DROP SCHEMA public CASCADE;" test_idigbio
+- psql -U travis -c 'create database test_idigbio;'
+- psql -U travis -c "DROP SCHEMA public CASCADE;" test_idigbio
 - docker run -d --net host --name minio-test -e "MINIO_ACCESS_KEY=${ACCESS_KEY}" -e "MINIO_SECRET_KEY=${SECRET_KEY=}"  minio/minio:RELEASE.2017-07-24T18-27-35Z server /export

 script:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python3 for issues specific to python3 conversion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants