-
Notifications
You must be signed in to change notification settings - Fork 418
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
python driver psycopg3 #1793
python driver psycopg3 #1793
Conversation
Hi @mhmaguire, can you specify what have been changed and/or added for your needs? |
Wow! Thank you so much this is great. |
@aked21 I attempted to change as little as possible and swap psycopg2 for v3. That being said some changes were necessary as psycopg3 introduces a new type adaptation system, no longer has an
|
@mhmaguire I pulled down your changes to take a look, and the test files are complaining with the line: AttributeError: 'TestAgeBasic' object has no attribute 'args' Granted I just took a cursory glance, but I wanted to ask, do the tests work on your machine? Thanks for your time. |
@mhmaguire scratch my previous comment-- User error on my part! I'll continue reviewing this when I find a moment |
Lol okay actually sorry to walk back my comment again, but when I run the unittests via "python -m unittest -v test_age_.py" and python -m unittest -v test_networkx.py as stated in the documentation, they throw an attribute error as follows: Traceback (most recent call last): The unit tests still run fine if I call them directly, but I think it'd be a relatively easy fix to get this error to disappear. Would you mind amending your commit so that they work with these unit test commands? Otherwise it looks great and I appreciate what you've done here. I think after that change, I'll give it another once over and probably good to go. @mhmaguire |
…that argparse is bypassed.
@dehowef I set a default prefilled namespace so tests won't fail when bypassing argparse.
|
@mhmaguire Yeah, that way of testing was written by the original author of the python driver, been thinking of updating/removing that section of the documentation. I just looked over everything, and it looks great! We usually want to bring all updates to the main branch down to previous versions, from PG16 down til PG13. If you want to create the PRs for those branches as well, feel free to, otherwise I might just go ahead and do that within the next few days!! Thank you so much for your contribution 🙂 |
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed.
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Co-authored-by: Matt <[email protected]>
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Resolved - Conflicts: drivers/python/requirements.txt
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Resolved - Conflicts: drivers/python/requirements.txt
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Resolved - Conflicts: drivers/python/requirements.txt
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Resolved - Conflicts: drivers/python/requirements.txt
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Resolved - Conflicts: drivers/python/requirements.txt Co-authored-by: Matt <[email protected]>
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Resolved - Conflicts: drivers/python/requirements.txt Co-authored-by: Matt <[email protected]>
* update for psycopg3 * set a default argparse namespace in case tests are run in such a way that argparse is bypassed. Resolved - Conflicts: drivers/python/requirements.txt Co-authored-by: Matt <[email protected]>
Updated python driver code to psycopg 3 for my own purposes and figured you all might like to do the same sometime.