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

Fix dependency for kerberos-sspi on Windows; else use pykerberos. (Fixes #51, #38) #56

Merged

Conversation

carsonyl
Copy link
Collaborator

This change fixes the dependency issue in the whl. Now the metadata.json in the whl looks like:

"run_requires": [
   {"environment": "sys_platform==\"win32\"", "requires": ["kerberos-sspi (>=0.2)"]}, 
   {"environment": "sys_platform!=\"win32\"", "requires": ["pykerberos (>=1.1.1,<2.0.0)"]}, 
   {"requires": ["requests (>=1.1.0)"]}
]

For PY3 support, I took the liberty of changing the *nix dependency to use pykerberos instead of kerberos, but I'm not able to test against a real Kerberos-authenticating server on *nix. I fixed the version based on the discussion in #38.

I set kerberos-sspi to >= 0.2 because 0.2 is the one that claims PY3 support, and based on the discussion in #34. It's also the only version that I've been using. In the highly unlikely (AFAIK) event that someone on Windows wants to install requests-kerberos and doesn't want to use requests-sspi because they have access to (py)kerberos, they can use pip install --no-deps...

…t_wheel.

On Windows, use kerberos-sspi because it's much easier to get installed.
On other platforms, use pykerberos instead of kerberos for Python 3 support.
@carsonyl
Copy link
Collaborator Author

@02strich It looks like we need a release of pykerberos that includes 02strich/pykerberos#5 to make Travis happy. 💥

@Lukasa
Copy link
Member

Lukasa commented Aug 24, 2015

Agreed, looks like we have to wait for this for a little bit. @rbcarson are you going to be able to keep an eye on the release of that project?

@AnthonyTruchet
Copy link

May I ask why (after reading issue #38) you decided for pykerberos instead of a recent version of kerberos (the 1.2.2) ? Thanks for you reactivity by the way :-)

@Lukasa
Copy link
Member

Lukasa commented Aug 24, 2015

Again, I'm going to let @rbcarson express a preference here =)

@02strich
Copy link

@rbcarson just cut a release (1.1.8) of it

It includes handling for krb5 version numbers with string suffixes, which happens to be the case on Travis CI.
@carsonyl
Copy link
Collaborator Author

Thanks, @02strich - looks like it works!

@Lukasa, can we also have Travis test Python 3.4?

@AnthonyTruchet: I just noticed that the comments in #52 make a case for keeping kerberos at 1.2.2 due to added Python 3 support, but it still doesn't quite support it yet: its setup.py calls file(), which isn't in Python 3. And I don't know how to propose a change to fix that. @02strich's pykerberos, however, looks promising. I ruled out python-gssapi for this PR because it exposes a completely different API vs (py)kerberos. Do you have any preference here?

@AnthonyTruchet
Copy link

I do not have any preference as I'm just discovering the Kerberos realm. I simply wanted to be sure the pieces of information in issue #52 had been taken into account. I tend to favor well established libraries when they are still maintained wrt to promising libraries with uncertain status. But I'm not sure the case is so clean here.
By the way I have access to Python 2 and 3 on Windows (and Darwin with macports), let me know if I can help in any way.

@Lukasa
Copy link
Member

Lukasa commented Aug 25, 2015

@rbcarson I've added 3.4 to the travis testing matrix on the master branch. For obvious reasons we won't release until it passes. ;)

@Lukasa Lukasa mentioned this pull request Sep 9, 2015
@mkomitee
Copy link
Collaborator

FWIW, I just pulled this in and tested it. It works in my kerberos environment (mit/linux), so pykerberos seems to be sufficient for the base-case.

@carsonyl
Copy link
Collaborator Author

👏 I think this is good to go, then. What do you think, @Lukasa?

@sigmavirus24
Copy link
Contributor

Closing and reopening to hopefully trigger travis to run against python 3.4

@sigmavirus24
Copy link
Contributor

So I'm going to merge this, but we learned over on urllib3 that older versions of setuptools and pip will totally explode on having the extras defined this way for platform-specific dependencies. I'll fix these up such that they work well for Wheels and all versions of setuptools/pip.

sigmavirus24 added a commit that referenced this pull request Oct 31, 2015
…cy-51

Fix dependency for kerberos-sspi on Windows; else use pykerberos. (Fixes #51, #38)
@sigmavirus24 sigmavirus24 merged commit 27e5d00 into requests:master Oct 31, 2015
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.

6 participants