-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Py3 upgrade and Pacer Refactoring (#171)
* lots of changes to bring into line for Python 3.6 using six and other tricks. added tox for testing. still an issue with the title case function due to how python handles unicode strings now. * found a possible fix for the unicode issue in py3. bit of a hack...but tries to see if a string starts with unicode or not. * added python 3.5 and 3.6 to travis file. * turning off Debug in the title case test. * refixing the requirements to be exact versions for now. put a py2/3 compatability wrapper function around calls to the requests response objects. * set requests to new version that works locally. fixed an issue with the mock not closing a connection. removed my stupid broken non-fix for test_pacer.py * refactored cookie creation so be a bit more explicit in setting a cookie jar instance. refactored out posts to PACER as it turns out you need some black magick voodoo to form the post body into something it will enjoy. * bumped requests version back down to same version as CL for now. added mocks dependency for unit tests (to tox.ini and requirements-dev.txt start refactoring some of the Pacer stuff into a PacerSession class that extends requests.Session to handle PACER nuances tests passing locally with tox using free login. * cleaned up setup.py and moved some test requirements out of base requirements.txt file. still need to update README.rst about changes. refactored the BadLoginException into the juriscraper.pacer.http module as it fits better next to the place that raises it. added default timeout value of 300 to pacer sessions since it seemed commonly set elsewhere * relaxing error condition for logins * attempt to refactor PACER login to use central auth service while still supporting the legacy test site that does not seem supported at the moment. * slimming down the tests to focus on key functionality vs. breadth of courts. * changes to README.rst, minor tweaks related to code review. * segregated python2 and python3 specific regex due to issues with unicode raw string literals. minor tweaks per code review. * added new exception class to distinguish bad pacer credentials, changed login to test site based on "psc" court_id instead of username of tr1234
- Loading branch information
Showing
34 changed files
with
642 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.