Skip to content

Conversation

@blizzz
Copy link
Contributor

@blizzz blizzz commented Jul 27, 2016

Rebase of #146, keep fingers crossed, if successful all kudos to @ethifus

@blizzz blizzz mentioned this pull request Jul 27, 2016
setup.py Outdated
'Environment :: Web Environment',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3.4',
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder whether we need to provide two versions for pip now, one for Python 2 and one for Python 3

@PVince81
Copy link
Contributor

PVince81 commented Aug 8, 2016

Looks good, great work ! 👍

My only concern is about packaging, need to find out how other projects that support both Python 2 and Python 3 do it.

@blizzz
Copy link
Contributor Author

blizzz commented Aug 8, 2016

I have no insights there unfortunately. However, pyhn has a package that is 2 and 3 compatible: https://pypi.python.org/pypi/pyhn/0.3.7, apparently it boils down to specify the supported python versions by a classifier (cf. http://www.diveintopython3.net/packaging.html, here a list https://pypi.python.org/pypi?:action=list_classifiers), i.e. adjusting setup.py. Currently it just says "Python", so it shows up with pip3:

$ pip3 search pyocclient
pyocclient (0.2)  - Python client library for ownCloud

I suggest adding Programming Language :: Python :: 2 and Programming Language :: Python :: 3 with this pull request. Then it should work as usual (i have no idea how to push this to pypi, but I guess you figured it out). Do you want me to add these classifiers?

@PVince81
Copy link
Contributor

PVince81 commented Aug 8, 2016

@blizzz sounds good, please add the classifiers 😄

@PVince81 PVince81 added this to the 0.3 milestone Aug 8, 2016
@SergioBertolinSG
Copy link
Contributor

Tests running with python3 fails:

 File "owncloud/test/test.py", line 5, in <module>
    from unittest_data_provider import data_provider
ImportError: No module named 'unittest_data_provider'

unittest module is not available in pip3, I have installed unittest2.

@blizzz
Copy link
Contributor Author

blizzz commented Aug 8, 2016

@SergioBertolinSG works for me:

$ pip3 search unittest | grep data
…
unittest-data-provider (1.0.1)     - PHPUnit-like @dataprovider decorator for unittest
…

The Travis tests with 3.5 also succeed.

@SergioBertolinSG
Copy link
Contributor

SergioBertolinSG commented Aug 8, 2016

@blizzz yes that works, thanks.

Tried with both python2 and python3, there is one failure but not related with this changes.

Also, there is a warning .owncloud/test/test.py:472: DeprecationWarning: Please use assertEqual instead.

👍

@blizzz
Copy link
Contributor Author

blizzz commented Aug 9, 2016

@blizzz sounds good, please add the classifiers 😄

done 🐍

@PVince81
Copy link
Contributor

Weird, now the unit tests have failures

setup.py Outdated
'Programming Language :: Python',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 2'
'Programming Language :: Python :: 3'
Copy link
Contributor

Choose a reason for hiding this comment

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

you missed the commas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😱

@blizzz
Copy link
Contributor Author

blizzz commented Aug 10, 2016

Now, still failing. This is strange, isn't it.

@PVince81
Copy link
Contributor

Yeah, strange. Maybe Travis updated their Python version or changed the warning flags ?

The error seems about a file that did not get closed properly. Maybe we're missing a fclose statement somewhere ?

@blizzz
Copy link
Contributor Author

blizzz commented Aug 10, 2016

Yeah, strange. Maybe Travis updated their Python version or changed the warning flags ?

The last ones passing where also 2.7.10 and 3.5.0. Maybe some module got an update.

The error seems about a file that did not get closed properly. Maybe we're missing a fclose statement somewhere ?

Maybe on 3. On 2.7 it's just InvalidHeader: Header value 1 must be of type str or bytes, not <type 'int'> deep in the requests module.

@SergioBertolinSG
Copy link
Contributor

Yes the error happens after the upgrade to requests-2.11.0, I tested this with requests-2.10.0 and it worked fine.

@blizzz
Copy link
Contributor Author

blizzz commented Aug 11, 2016

Woohoo 👍 @SergioBertolinSG

@PVince81 PVince81 merged commit 141bbf7 into master Aug 11, 2016
@PVince81 PVince81 deleted the py3_compat_ii branch August 11, 2016 17:43
@PVince81
Copy link
Contributor

@blizzz wanna add this thing to the changelog with credits yourself ? Else I'll do it later at release time.

@blizzz
Copy link
Contributor Author

blizzz commented Aug 11, 2016

the credits should go to @ethifus really

@PVince81
Copy link
Contributor

Ok, added 7af7a5a

@blizzz
Copy link
Contributor Author

blizzz commented Aug 12, 2016

thx 🎩

@PVince81 PVince81 mentioned this pull request Oct 20, 2016
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

Successfully merging this pull request may close these issues.

4 participants