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

Python 3 support #6

Open
ejeschke opened this issue Apr 22, 2017 · 9 comments
Open

Python 3 support #6

ejeschke opened this issue Apr 22, 2017 · 9 comments

Comments

@ejeschke
Copy link

Just found this project and it looks very promising.

I am using the aggdraw module for one of my projects and I have fixed a couple bugs (path drawing) and added Python 3 support. You can find my version of aggdraw here.

I tried running a couple of your tests using python 3, but it looks like the code is still python 2 only (old style print statements, etc.). You might consider upgrading the code to be python-2 or 3 compatible. I found the modernize (aka python-modernize) package to be very useful for converting the files in my project, requiring only minimal fix ups afterwards. It uses the six module to achieve compatibility.

@karimbahgat
Copy link
Owner

You're right I havent yet thought about py3 support, but its probably time. Will look into modernize when i can, thanks. And your project looks really interesting as well!

What great news to hear you made aggdraw py3 compatible! I was actually wanting to do that myself at some point, to avoid aggdraw dying out with py2.

In fact, Ive noticed several have forked aggdraw and made many separate improvements. So one thing I've thought about is creating an official fork of aggdraw, and merging as many of these as possible. Sort of like what Pillow did for PIL, it could be called maybe Pillow-Case, as a complement to Pillow. Ive already started and merged a few such as adding line join and cap support. Your py3 support would be a great addition there. Would love to have another aggdrawer on the team that knows how to tweak the source code?

@ejeschke
Copy link
Author

ejeschke commented May 8, 2017

Ive already started and merged a few such as adding line join and cap support. Your py3 support would be a great addition there. Would love to have another aggdrawer on the team that knows how to tweak the source code?

Please take what you want from the fork, it would be good to keep aggdraw moving forward, even if slowly. I'm not an expert on the aggdraw code by any means, but it seems pretty well designed and somewhat straightforward to modify.

@karimbahgat
Copy link
Owner

I finally got around to it, and made a GitHub organization and new library with just a slightly tweaked name "aggdrawer", that can hopefully become the new home of future aggdraw improvements/forks. I started with the latest stable version and added your py3 support and path fix.

If you would like i could make you a comaintainer, otherwise feel free to just submit PRs if you make any future changes.

@djhoese
Copy link

djhoese commented Sep 9, 2018

@karimbahgat I have taken over the aggdraw project (just found this repository from your pycrs project) and have included the changes from @ejeschke. My group (pytroll) also got effbot (the original author) to give us permissions to the PyPI project so we've been able to make real releases. Also aggdraw is now available on conda-forge.

https://github.com/pytroll/aggdraw
https://github.com/conda-forge/aggdraw-feedstock

@djhoese
Copy link

djhoese commented Sep 9, 2018

Feel free to make any pull requests and I'll merge them. I'm a little hesitant to update the version of agg library used without some heavy unit tests being added.

@karimbahgat
Copy link
Owner

That is really great news @djhoese, especially that it is group-coordinated and you have permission to the official pypi project! Then I'll definitely drop my previous aggdrawer project, and do any future changes to the the pytroll repo instead.

Aggdraw is sufficiently lightweight and fast compared to Python rendering libs like matplotlib and cairo that it is definitely worth maintaining and expanding, and there is so much additional functionality that can be incorporated from the underlaying agg library, incl such things as gradients, line patterns, ++.

@karimbahgat
Copy link
Owner

Added some issues to your fork for things I would like to see in the future, and/or as points of discussion.

@djhoese
Copy link

djhoese commented Sep 12, 2018

@karimbahgat Much appreciated. If we keep this back and forth issue marathon going we're going to get a lot of work done 😉 . I think you can close this issue by the way as the "official" aggdraw on PyPI now supports python 3.

Edit: Nevermind, I guess aggdraw supports python 3 but your code in pyagg may not.

@karimbahgat
Copy link
Owner

@djhoese Hahah very true, it's always more motivating/effective when someone else is waiting for your answers/code.

And you're right, pyagg is just a wrapper around aggdraw, which still needs to upgrade to py3 at some point. At that point I would also need to update the underlaying aggdraw version (since these are provided precompiled) to your newest Py3-supporting official fork.

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

3 participants