-
Notifications
You must be signed in to change notification settings - Fork 8
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 / Jython 2.2 support #1
base: master
Are you sure you want to change the base?
Conversation
json/js/node tests (with warning). NOTE options to implement pep8 and unittests (rather than asserts), could even reuse unittest from https://github.com/defunkt/pystache
…ng is now optional. The Bool tests are also optional (and are not ran under python 2.2). The reason for this is that the test suite hard fails (unlike a unittest based one) and does not complete if failure are detected. I attempted a Bool replacement but it didn't work and I'm unclear why. It appeared to raise the exception TypeError exception in the wrong place (could be a Jython 2.2 traceback bug). if sys.version_info < (2, 3): # version 2.2 # this kinda works BUT fails with this module's usage of len(Bool) # with Jython 2.2 :-( class MyBool: def __init__(self, is_true=None): self.is_true = is_true def __len__(self): raise TypeError('len() of unsized object') def __repr__(self): if self.is_true: return 'True' else: return 'False' True = MyBool(1) False = MyBool(0)
Let me think about it for a while. are the change in _tokenize for pep8? or is that a jython 2.2/python 2.4 issue? Also for the tests, running |
All the changes are 2.4/2.2 related. The _tokenize() was for 2.4 (and earlier). I've not (yet) made an attempt on pep8 formatting changes, I was thinking about it (hence the comment in the commit for clach04/stache@25d633b ) :-) The last time I tried nose it didn't work with 2.2. I may have to see if it is worth getting that working under 2.2. |
Merged Unicode branch and code now works on almost all versions of Python
Extracted code from SmithSamuelM@f2c591e NOTE this no longer passes test suite as test suite is white space sensitive, the test suite has not been updated. The test suite stops on failure, more testing needed.
Working test suite to match previous test, adds a new test for with and without white space.
py3 first, this avoids DeprecationWarning in older 3.x version (pre 3.8)
Any interest in Jython 2.2 support? There are few holes but it mostly works.
I've also added 2.2 support to pystache, have you considered re-using (some of) the pystache test suite?