unitedstates / congressional-record

A parser for the Congressional Record.
Other
128 stars 40 forks source link

Converted code into python 3 #29

Closed napsternxg closed 6 years ago

napsternxg commented 6 years ago

Run the following command:

2to3 --output-dir=congressional-record-py3 \
-W -n -f all -f idioms \
congressional-record/

Fix a test case for test_content_length

Fixes #28

AlJohri commented 6 years ago

@napsternxg I don't think you can use 2to3 for this to maintain backward compatibility. For example, this PR is missing __future__ imports

napsternxg commented 6 years ago

Hi @AlJohri yes, thanks for pointing it out. I know that. I just needed support for python3. Adding compatibility will require some more work. But this branch can be a way to move forward from there. This was the best quick fix I could do right now to get my things running. Would you like to clean this up to include compatibility with python2 ?

AlJohri commented 6 years ago

sure, I'll give it a go. for future reference, this command should get you up and running with backward compatibility pretty quickly: futurize --both-stages --write --nobackups congressionalrecord

napsternxg commented 6 years ago

@AlJohri thanks. Is this a separate package or is it preinstalled with python ?

AlJohri commented 6 years ago

http://python-future.org/

napsternxg commented 6 years ago

Ya just had a look at it. Thanks this was helpful. I will try it out and make an update to this PR sometime later.

nclarkjudd commented 6 years ago

Thank you @AlJohri @napsternxg for these contributions. I will let this PR sit a few days to see if @napsternxg has a chance to do a little more wrt backward compatibility.

AlJohri commented 6 years ago

@nclarkjudd fixed in #32

napsternxg commented 6 years ago

This is great thanks @AlJohri. Do you think I should close this PR, since your PR is actually a better version of it ?

AlJohri commented 6 years ago

up to @nclarkjudd, but I think that makes sense. thanks for getting this started though!!