rolandshoemaker / CommonMark-py

Depreciated in favor of rtfd/CommonMark-py
Other
125 stars 12 forks source link

Fix for python 2.6 (set syntax change) #25

Open njvack opened 8 years ago

njvack commented 8 years ago

Python 2.6 doesn't support {}-style set literals; replace it with the semantically-identical set([]) syntax.

This seems to fix CommonMark-py on Python 2.6

Addresses #24.

ericholscher commented 8 years ago

Looks good at first glance. If we want to commit to supporting 2.6 in the future, it should be added to the Travis configuration to test against going forward.

I'm +0 on officially supporting Python 2.6, as most of the ecosystem has moved on from this version. For instance, Django dropped 2.6 support in 1.7, which was released over a year ago. However, this is a pretty simple repo that likely won't need advanced features, so having broad version support isn't a huge issue.

njvack commented 8 years ago

Totally your call; I'm good either way as I'm packaging my own copy of this in my project:

https://github.com/njvack/markdown-to-json

... though until our center's servers all get upgraded, I do need to support 2.6.

nikolas commented 8 years ago

This change looks good, set() is supported in python3: https://docs.python.org/3/library/functions.html#func-set, so we should see no change in behavior, with the benefit of supporting another python version. I agree with Eric about 2.6 - I'm not willing to put much work into supporting python 2.6 because it is deprecated.

You can make a pull request here: https://github.com/rtfd/CommonMark-py since rolandshoemaker's repository isn't being maintained.

njvack commented 8 years ago

OK, I've made a pull request at the new home.

It would be cool to somehow indicate prominently that this is not the canonical CommonMark-py repo.

nikolas commented 8 years ago

Yeah, I'm waiting on PR #23.. we should change the header at the top of this repo as well.

Unfortunately the maintainer here doesn't have the mental space to deal with any of this at the moment, so there's not much we can do.