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

Support Python 3 #225

Open
tvalentyn opened this issue May 31, 2018 · 7 comments
Open

Support Python 3 #225

tvalentyn opened this issue May 31, 2018 · 7 comments

Comments

@tvalentyn
Copy link
Contributor

What is the status of Python 3 support for google-apitools?

We do not list any language classifiers here:

classifiers=[

Do we know if any extra work is required to make the package Python3-compatible?

@kevinli7
Copy link
Contributor

The tests currently run under multiple python versions including python 3 versions.

https://github.com/google/apitools/blob/master/tox.ini

@tvalentyn
Copy link
Contributor Author

tvalentyn commented May 31, 2018

That's great! Do we have any concerns about adding a Python3 language classifiers to setup.py to explicitly state Python3 support?

@tvalentyn
Copy link
Contributor Author

Actually looks like Codebase is not fully Python3-complient, and there are some PRs in flight, for example: #214.

@kevinli7
Copy link
Contributor

There may be a few bugs related, but this code base is largely python3 compliant. #214 looks to be a PR made by a non-contributor and the changes in that pull are no longer relevant.

@cclauss
Copy link

cclauss commented Jun 13, 2018

Some remaining issues... Fixed in #228, #229, #230, #231

flake8 testing of https://github.com/google/apitools on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./ez_setup.py:94:41: E999 SyntaxError: invalid syntax
    except pkg_resources.VersionConflict, e:
                                        ^
./apitools/base/protorpclite/messages.py:482:20: F821 undefined name 'cmp'
            return cmp(self.number, other.number)
                   ^
./apitools/base/protorpclite/messages_test.py:132:48: F821 undefined name 'long'
            self.assertEquals(Color.RED, Color(long(20)))
                                               ^
./apitools/base/protorpclite/messages_test.py:1041:47: F821 undefined name 'long'
            messages.IntegerField(10, default=long(10))
                                              ^
./samples/storage_sample/downloads_test.py:174:31: E999 SyntaxError: invalid syntax
            print 'Progress %s' % download_object.progress
                              ^
2     E999 SyntaxError: invalid syntax
3     F821 undefined name 'cmp'
5

@tvalentyn
Copy link
Contributor Author

tvalentyn commented Oct 31, 2018

FYI: BEAM-5788 shows that GCS api calls in google-apitools don't work on Python 3. Based on the feedback I've received so far, google-apitools is not officially supported, and google-api-python-client or something in the google-cloud family of libraries should be used instead, so I don't have an expectation that this issue will be fixed.

@cclauss
Copy link

cclauss commented Nov 1, 2018

Despite BEAM's readiness, can #228, #229, #230, #231 still be reviewed?

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

No branches or pull requests

3 participants