-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix some ResourceWarnings. #125
Conversation
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
+ Coverage 96.90% 96.92% +0.01%
==========================================
Files 6 6
Lines 388 390 +2
Branches 47 48 +1
==========================================
+ Hits 376 378 +2
Misses 4 4
Partials 8 8
Continue to review full report at Codecov.
|
Thanks for digging into that! I think we should wait for I realise we also weren't testing on 3.10 yet, it was due to other dependencies not yet supporting 3.10, but they do now. So let's also get #126 merged and included in here. If you like, you could also split out the |
Would you like to rebase/merge from And no rush, because I think it'll take a while for google-cloud-bigquery to release for 3.10. |
@@ -37,7 +37,7 @@ python_requires = >=3.6 | |||
install_requires = | |||
binary | |||
click | |||
google-cloud-bigquery >= 0.29.0 | |||
google-cloud-bigquery >= 2.11.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
google-cloud-bigquery 2.30.0 has just been released supporting Python 3.10:
google-cloud-bigquery >= 2.11.0 | |
google-cloud-bigquery >= 2.30.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need 2.30.0:
- In Python 3.9 we can use >=2.11.0.
- In Python 3.10 pip will choose 2.30.0 as it have no choice.
So >= 2.11.0
looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could run two tests in tox, one with the minimum version, and one with the maximum version of out dependencies, to ensure it works, like I'm trying to do here: https://github.com/JulienPalard/oeis/blob/7d6c314c02983c7a47f901d07d0fffc8b772155a/tox.ini#L36;L39 ? Maybe in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good point that 3.10 will pick the right one. I think we'll be fine keeping it simpler and testing just a single version. Thanks!
(closed/reopened to let the CI pick the new version in 3.10 so it passes) |
Thank you again! |
references: #123
So the issue with #123 is funny, I just forgot to bump google-cloud-bigquery minimum version in
setup.cfg
.Without bumping it to the release they introduced the context manager, it could have gone mostly right, there's tens of versions since then.
Sadly back then, they had
python_requires=">=3.6"
and now they havepython_requires=">=3.6, <3.10"
, so when we installgoogle-cloud-bigquery
with Python 3.10 it forces pip to crawl back to this old version not enforcing<3.10
, but not having__enter__
neither.I enforced the right version in
setup.cfg
but we may not want to merge this as it makespypinfo
uninstallable with 3.10 as there does not exist agoogle-cloud-bigquery
recent enough and compatible with py310 (the irony).