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

Make PyHive work with Python 3.7 async #232

Merged
merged 1 commit into from
Sep 6, 2018

Conversation

betodealmeida
Copy link
Contributor

@betodealmeida betodealmeida commented Aug 28, 2018

In Python 3.7 async became a keyword, breaking PyHive's execute method. This PR fixes it by allowing either async or async_ to be passed as a keyword argument, in order to preserve backwards compatibility.

This fixes #148.

@codecov-io
Copy link

Codecov Report

Merging #232 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #232      +/-   ##
==========================================
+ Coverage   93.92%   93.94%   +0.02%     
==========================================
  Files          14       14              
  Lines        1482     1487       +5     
  Branches      157      159       +2     
==========================================
+ Hits         1392     1397       +5     
  Misses         64       64              
  Partials       26       26
Impacted Files Coverage Δ
pyhive/hive.py 87.4% <100%> (+0.25%) ⬆️
pyhive/tests/test_hive.py 97.74% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e07ca8...d158cb4. Read the comment docs.

@betodealmeida
Copy link
Contributor Author

Ping @jingw

@gsilk
Copy link

gsilk commented Sep 6, 2018

Thanks for the fix! Apologies for the delay in merging.

@gsilk gsilk merged commit 2c2446b into dropbox:master Sep 6, 2018
@betodealmeida
Copy link
Contributor Author

Thanks, @gsilk! I signed the Dropbox Contributor License Agreement.

@gsilk
Copy link

gsilk commented Sep 10, 2018

New release is out: https://pypi.org/project/PyHive/0.6.1/

Let me know if there are any problems! Thanks

@freephys
Copy link

  1. from pyhive import presto
    async_ not found on latest pyhive
    How to solve it
  2. How to run multuple query in parallel with pyhive?
    share same cursor or create multiple cursor?

Thanks

@betodealmeida
Copy link
Contributor Author

1. from pyhive import presto
   async_ not found on latest pyhive
   How to solve it

2. How to run multuple query in parallel with pyhive?
   share same cursor or create multiple cursor?

@freephys do you mind creating issues for these? Also, can you give more details on (1)?

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

Successfully merging this pull request may close these issues.

async keyword in Python 3.7
4 participants