-
Notifications
You must be signed in to change notification settings - Fork 102
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 2.7 and 3.7 compatibility #18
base: master
Are you sure you want to change the base?
Conversation
@@ -18,7 +18,7 @@ def subdir_contents(path): | |||
|
|||
setup( | |||
name = "gitosis", | |||
version = "0.2", | |||
version = "0.3", |
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.
is this project still maintained? |
I think it's safe to say it isn't, sadly. |
True. |
I've been considering forking the project completely, but I'd like to get @tv42's blessing first. Just haven't had the time. |
@kgaughan You are welcome to fork and maintain a more up-to-date version, but please use a different name. I have a slow-burn desire to write a Gitosis v2, with lessons learned in the intervening years. |
(I'm pulling my previous #17 into this PR, which fixes up
setup.py
.)This PR adds a small compatibility layer to gitosis that allows it to run on both Python 2.7 and Python 3 (though I've only tested it with 3.7 so far), along with porting the code to use that layer, and to use syntax that works on both Python 2.7 and Python 3.
Additionally, I took advantage of a few things, such as using the
file
object returned byopen()
as a context manager to simplify and clean-up some of the file-handling code, and removed the test for the standard templates, as more modern versions of git don't install these by default.I threw in a tox configuration file to aid with running the test suite.