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
Modernize code for Python 3 #4
Conversation
In Python 3 string literals are str, and not bytes, so `DictAttribute.__set___` would pass the wrong type of argument to the C functino `drmaa_set_vector_attribute`. This simple change encodes strings to bytes with the system default encoding. Since you can called `.encode()` on byte strings in Python 2.x without side-effect, this simple change should work with both.
Python 3 compatability fix
Switch to using new style format strings instead of old ones.
…ding to pass bytes in the first place.
… all functions that take strings take unicode strings.
… come up in install_sge.sh.
…is up and running before exec gets installed
…o steps seems to solve those problems.
I'll test this out over the next couple days. Thanks!
|
Did you discover any issues with this? |
Oh jeez. I did nothing with this. Many apologies. I'll take it up on Monday! On Fri, Oct 25, 2013 at 9:46 AM, Dan Blanchard notifications@github.comwrote:
|
Still looking, sorry for the delay. :) |
You know, as I'm testing this out, it occurred to me that you've done far more work on drmaa-python than I have. Would you like to be added as a maintainer? (you don't have an email listed on your public profile, or I would have emailed it to you) |
Sure, I'd be happy to be a maintainer. After all that work I do feel a bit of an attachment to it. 😄 |
Hello again. 😄 I just wanted to see how things with this are going. For some deployment things I'm working on, I'd prefer to be able to point to PyPI to install drmaa-python instead of my fork. Thanks! |
Hello again, Any progress on this front? I'm trying to create a conda recipe for drmaa to possibly get it added to the Anaconda distribution someday, but until this is merged, that's impossible (because it doesn't support Python 3). Thanks, |
I understand that this doesn't appear to be a priority for you, but this is something I need available on PyPI, so unless I hear back in the next couple days, I'll just go ahead and create a new PyPI package called |
Heh. I'm really sorry about that. I was out of the country for a few weeks, On Monday, November 25, 2013, Dan Blanchard wrote:
|
It's okay. I totally understand that sometimes life gets in the way. My PyPI username is |
I think everything is fixed now. Sorry again and welcome. May you continue On Tuesday, November 26, 2013, Dan Blanchard wrote:
|
Cool. Thanks for making me part of the team. Are you okay with me merging this and creating a new release on PyPI? I don't want to just come in and usurp things. 😄 |
Go for it! It seems to work for me. You won't do a worse job than me. :) On Tuesday, November 26, 2013, Dan Blanchard wrote:
|
Modernize code for Python 3
This is a fairly substantial set of changes, but the main changes are:
session.py
module that contains most of the code that was in__init__.py
before, and__init__
just imports things and sets__all__
and__version__
, as is typically recommended now.setup.cfg
.When/if you merge this PR, please update the badge URL in
README.rst
to usedrmaa-python/drmaa-python
instead ofdan-blanchard/drmaa-python
. You'll also want to setup a free Travis-CI account and enable building for the main drmaa-python project.