The Wayback Machine - https://web.archive.org/web/20201226024620/https://github.com/dpkp/kafka-python/pull/1614
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

Add python 3.7 support #1614

Merged
merged 18 commits into from Mar 13, 2019
Merged

Add python 3.7 support #1614

merged 18 commits into from Mar 13, 2019

Conversation

@jeffwidman
Copy link
Collaborator

@jeffwidman jeffwidman commented Oct 27, 2018

Add Python 3.7 to the tests.

Document 3.7 support on PyPi.


This change is Reviewable

@jeffwidman jeffwidman requested review from dpkp and tvoinarovskyi Oct 27, 2018
@jeffwidman jeffwidman force-pushed the add-python-37-support branch 3 times, most recently from 27497d8 to d96a45b Oct 27, 2018
@jeffwidman
Copy link
Collaborator Author

@jeffwidman jeffwidman commented Oct 27, 2018

This passes locally, but seems like it's always timing out on Travis, probably due to having to use the VM builds rather than the docker container builds for python 3.7. This is what sudo: yes is implicitly doing here:
https://github.com/dpkp/kafka-python/pull/1614/files#diff-354f30a63fb0907d4ad57269548329e3R21

I'm hesitant to merge if we're going to constantly hit timeouts because we don't want to be fighting travis trying to make PRs go green... I'll try again tomorrow and see if I continue to hit this.

@jeffwidman jeffwidman force-pushed the add-python-37-support branch from d96a45b to af1c32f Oct 27, 2018
@jeffwidman
Copy link
Collaborator Author

@jeffwidman jeffwidman commented Oct 29, 2018

See also #1549, this seems to be a valid issue but doesn't appear until 3.7.

@jeffwidman jeffwidman force-pushed the master branch from cdfbb95 to 4d13713 Oct 29, 2018
@tvoinarovskyi
Copy link
Collaborator

@tvoinarovskyi tvoinarovskyi commented Oct 30, 2018

I feel like we have a bit too many jobs for our test runners. The PR seems good, maybe lets run it on a more recent Kafka version (>=0.11), that may (maybe) help with timeouts.

@jeffwidman
Copy link
Collaborator Author

@jeffwidman jeffwidman commented Oct 30, 2018

I feel like we have a bit too many jobs for our test runners.

And we need to add the 2.X Kafka brokers, so it will only get worse... I have thought several times about cutting down, but I am hesitant to do so on the broker versions as many of those are in production and they do have significant differences... maybe we should drop 3.4/3.5 from the travis matrix as most folks on python 3 tend to stay reasonably up to date

a more recent Kafka version (>=0.11), that may (maybe) help with timeouts.

Oh, I hadn't thought of that, good idea

@tvoinarovskyi
Copy link
Collaborator

@tvoinarovskyi tvoinarovskyi commented Oct 30, 2018

In aiokafka I recently changed the matrics to only run all kafka versions with latest python and all python versions with latest kafka. Not sure if it fits for kafka-python, maybe just run all brokers for 2.7 and latest python + 1 broker per other python versions if needed.

@jeffwidman
Copy link
Collaborator Author

@jeffwidman jeffwidman commented Oct 31, 2018

run all brokers for 2.7 and latest python + 1 broker per other python versions.

That sounds reasonable to me. I may not get to it soon, so feel free to do it if you get time (and no worries if you don't).

Also, to put this in context... I typically look at the PR and then decide whether / which tests actually matter... ie, if it's straightforward and just needs to be tested against all brokers, then if some random python 3 version times out, I will often immediately merge.

So IMO it's not too bad to have exhaustive test matrix as long as we're not too hung up on retrying builds that timed out just to make them green if we're comfortable making the judgement call that the scope of the PR doesn't create an edge case that matters for it.

@dpkp
Copy link
Owner

@dpkp dpkp commented Nov 10, 2018

Test failure seems like there's a different java setup for this new test configuration and it is preventing Zookeeper (maybe also Kafka) from starting.

Error: A fatal exception has occurred. Program will exit.Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
@jeffwidman
Copy link
Collaborator Author

@jeffwidman jeffwidman commented Nov 12, 2018

Test failure seems like there's a different java setup for this new test configuration and it is preventing Zookeeper (maybe also Kafka) from starting.

That's probably because of the Travis workaround: https://github.com/dpkp/kafka-python/pull/1614/files#diff-354f30a63fb0907d4ad57269548329e3R11

I'm glad it at least got that far, IIRC (it's been a little while) originally I kept seeing timeouts before even getting to that point.

It'd probably be better to switch to the G1GC for all the Java builds that support it. But this isn't something I am focused on right now... first I want to get #1193 and then fix some bugs with the new KafkaAdmin... hopefully have some PRs inbound there in the next few days.

@cclauss
Copy link
Contributor

@cclauss cclauss commented Nov 16, 2018

Travis xenial is now official but not the default: https://blog.travis-ci.com/2018-11-08-xenial-release

That makes the workaround, less of a hack so why not try putting these lines at the top of the .travis.yml file:

dist: xenial    # required for Python >= 3.7 (travis-ci/travis-ci#9069)
sudo: required  # required for Python >= 3.7 (travis-ci/travis-ci#9069)

That way we could at least see if KAFKA_VERSION=1.0.1 gets any further than KAFKA_VERSION=0.8.2.2. Or if that is just too much then just reverse the sort order of the env:
section and re-enable the workaround so that KAFKA_VERSION=1.0.1 gets tested.

@dpkp dpkp force-pushed the master branch from c09bb5c to 45196e3 Nov 20, 2018
@dpkp dpkp force-pushed the add-python-37-support branch from af1c32f to e126a4e Jan 13, 2019
.travis.yml Outdated
@@ -1,10 +1,14 @@
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
sudo: required # required for Python >= 3.7 (travis-ci/travis-ci#9069)
@dpkp dpkp force-pushed the add-python-37-support branch from 3925900 to 21f5f77 Jan 13, 2019
@dpkp
Copy link
Owner

@dpkp dpkp commented Jan 13, 2019

I think we need to continue running tests w/ Java 8 (there are some strange failures on the older kafka versions when trying to run w/ Java 11). Unfortunately I haven't figured out how to get jdk8 installed with the new travis xenial image. I opened a forum post here: https://travis-ci.community/t/how-to-use-java8-in-a-python-non-java-project-on-xenial/1823

@dpkp dpkp force-pushed the add-python-37-support branch from 7f6ea22 to 0a73b18 Mar 13, 2019
@dpkp dpkp merged commit c0add71 into master Mar 13, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on add-python-37-support at 83.629%
Details
@jeffwidman jeffwidman deleted the add-python-37-support branch Mar 13, 2019
charettes added a commit to zapier/kafka-python that referenced this pull request Jun 26, 2019
* Use xenial dist for travis builds
* Use openjdk8 for all travis tests
* Update python build matrix -- add 3.7, drop 3.5/3.6 (keep 2.7, 3.4, pypy2.7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.