Lukasa / requests-ftp

An FTP transport adapter for use with the Python Requests library.
Other
69 stars 25 forks source link

Fix an issue with Python 3 #2

Closed asmeurer closed 10 years ago

asmeurer commented 10 years ago

The code in ftplib checks port > 0. This works with port = None in Python 2 because it allows such comparisons, but Python 3 is more strict. The solution (I think) is to just use the default port, 0, in this case.

The README says to add tests, but I have no idea where.

Lukasa commented 10 years ago

@asmeurer Haha, wow, I genuinely didn't think anyone used this project! There aren't any tests because I don't actually advocate what this library does as "a good idea", it was really intended as a proof of concept.

That said, I'm glad you found a bug in it, and I'm happy to take it! Thanks so much!

asmeurer commented 10 years ago

Well if you know of anything better, I'm all ears. This is just what comes up if you Google "requests FTP".

asmeurer commented 10 years ago

And anyway, it isn't actually working for me :frowning:: https://github.com/Lukasa/requests-ftp/issues/3

Lukasa commented 10 years ago

Haha, yeah, to be clear, there isn't going to be anything better. =P

The bigger problem is that this has languished un-used for a long time. I could in principle be encouraged to support this if it's really needed, but it's missing a whole chunk of functionality. If it's really something you're interested in, drop into #python-requests and we can chat about how this should work.

asmeurer commented 10 years ago

Sure, I'll drop in in an hour or so.