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

Python3 support #317

Merged
merged 52 commits into from
Feb 17, 2016
Merged

Python3 support #317

merged 52 commits into from
Feb 17, 2016

Conversation

sn6uv
Copy link
Member

@sn6uv sn6uv commented Feb 14, 2016

Summary

  • ported to python3 in part using the six module (with python-modernize, python2 -3, and manually)
  • various str/byte fixes
  • fixed some unicode bugs
  • a few division bugs (/ vs //)
  • minor change to asymptote number formatting (reducing output size)
  • dropped interruptingcow as it's no longer maintained (implemented a signal based interrupt)
  • TravisCI tests for python versions 3.2, 3.3, 3.4, 3.5, pypy3

TODO

  • Website under Py3
  • Documentation building
  • Unicode input under Py2
  • ListLinePlot[{{-2, -1}, {-1,-1}}] regression
  • django views encoding bug

Performance

There's a major performance regression that appeared in the benchmarks (needs fix):

Expand[(a1+a2)^200]

e.g. 13.1s vs 1.6s on my machine. Affects both py2 and py3.
Fixed. It's even slightly faster now, 1.3s.

Other benchmarks seem unchanged, python3 seems about 10% faster on average.

# TODO fix this ugly hack
# import codecs
# writer = codecs.getwriter("utf-8")
# sys.stdout = writer(sys.stdout)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was an ugly hack to get unicode input working. I'm not sure if there's a better approach.

@sn6uv sn6uv added the bug label Feb 14, 2016
@sn6uv sn6uv added this to the 0.9 milestone Feb 14, 2016
@sn6uv sn6uv removed the bug label Feb 14, 2016
@sn6uv sn6uv mentioned this pull request Feb 14, 2016
4 tasks
sn6uv added a commit that referenced this pull request Feb 17, 2016
@sn6uv sn6uv merged commit e7422f4 into mathics:master Feb 17, 2016
@sn6uv sn6uv deleted the py3 branch February 17, 2016 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant