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

Add support to Python 2.7.x #1

Open
lmar76 opened this issue Nov 22, 2017 · 4 comments
Open

Add support to Python 2.7.x #1

lmar76 opened this issue Nov 22, 2017 · 4 comments

Comments

@lmar76
Copy link

lmar76 commented Nov 22, 2017

Hi Daniel,

I have successfully used julian package with Python>=3.5. Now I would need to use it with Python 2.7 but unfortunately it is not possible to import it:

>>> import julian
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mmfi/.local/lib/python2.7/site-packages/julian/__init__.py", line 1, in <module>
    from julian.julian import to_jd, from_jd
  File "/home/mmfi/.local/lib/python2.7/site-packages/julian/julian.py", line 5
    def __to_format(jd: float, fmt: str) -> float:
                      ^
SyntaxError: invalid syntax

I guess this is due to the annotations. Could it be possible to update the code to support also Python>=2.7 ?

Thank you.

Regards,

Luca

@vikingsraven
Copy link

this would be handy on 2.7

@forest-jiang
Copy link

same need

@Ericwonne
Copy link

The same error from the import statement. Does it seem there is no solution till now?

@Ericwonne
Copy link

Well if there is urgent need of the Julian to the Gregorian date conversion, a gist could be possibly referred: https://gist.github.com/jiffyclub/1294443#file-jdutil-py.

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

No branches or pull requests

4 participants