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

replace file constructors with context managers for python 3 compatibility #67

Merged
merged 2 commits into from
Jun 20, 2017

Conversation

wpercy
Copy link
Contributor

@wpercy wpercy commented Feb 26, 2017

file() was removed in Python 3 - replace all calls with open() and use with statements for closing. Resolves #66

print("Done")
with open(out_name, 'wb') as out:
cal.serialize(out)
print("Done")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguable this line should not be part of the with block.

prettyDiff(cal1, cal2)
with open(ics_file1) as f, open(ics_file2) as g:
cal1 = readOne(f)
cal2 = readOne(g)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f and g are not used below, so the with-block should end here.

@wpercy wpercy merged commit fb49f6b into master Jun 20, 2017
@wpercy wpercy deleted the file-constructors branch June 20, 2017 19:40
@lucc
Copy link
Contributor

lucc commented Jun 21, 2017

Any chance this will be released as 0.9.4.2 or 0.9.5? I saw that there are some milestones for the next releases but they are all done already.

@wpercy
Copy link
Contributor Author

wpercy commented Jun 21, 2017

This will be released as part of 0.9.5

@wpercy wpercy modified the milestone: 0.9.5 Jun 27, 2017
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.

3 participants