Thanks to visit codestin.com
Credit goes to github.com

Skip to content

"uritemplate.py" conflicts with "uritemplate" package #14

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

Closed
sloria opened this issue Feb 23, 2015 · 7 comments
Closed

"uritemplate.py" conflicts with "uritemplate" package #14

sloria opened this issue Feb 23, 2015 · 7 comments

Comments

@sloria
Copy link

sloria commented Feb 23, 2015

There is a package called uritemplate on the PyPI whose name conflicts with this package. Both packages require you to import uritemplate.

I ran into this issue because our project requires both github3.py (which depends on uritemplate.py) and google-python-api-client (which depends on uritemplate), which led to the following error:

from uritemplate import URITemplate
ImportError: cannot import name URITemplate

I'm not sure what the best solution for this would be. Just thought I'd report it for record-keeping and to see if anyone had any workarounds.

@sigmavirus24
Copy link
Collaborator

It's a known issue. This library has been made API compatible with the uritemplate package, so this one can wholly replace the other. That said, there had been an issue where there was discussion of merging the two, but uritemplate's maintainers were as unresponsive then as when I pinged them about adding a URITemplate class.

@sloria
Copy link
Author

sloria commented Feb 24, 2015

Thanks for the reply. I didn't realize this library was API-compatible with the other library.

+1 to a merge of the projects--that would definitely avoid a lot of confusion in the future. Best of luck!

@jklukas
Copy link

jklukas commented Mar 31, 2016

Is there an established way to make sure uritemplate.py "wins" over uritemplate when both are pulled into your project as dependencies?

I have a project that relies on both google-api-python-client (which declares a dependency on uritemplate) and on github3.py (which depends on uritemplate.py). I have to make sure the github3.py dependency appears later than the google dep in my requirements file so that uritemplate.py gets pulled in second and overwrites uritemplate.

It's a hack and it works, but it's fragile. Not sure if I'm missing a better way.

@jklukas
Copy link

jklukas commented Mar 31, 2016

And while I'm at it, thank you for github3.py, @sigmavirus24

@sigmavirus24
Copy link
Collaborator

You're quite welcome @jklukas. I'm thinking that this has caused enough pain for enough people that I might just vendor uritemplate.py into github3.py at this point. Which version(s) are you relying on?

@jklukas
Copy link

jklukas commented Mar 31, 2016

I'm using:

github3.py==1.0.0a4
uritemplate.py==0.3.0

@jklukas
Copy link

jklukas commented Mar 31, 2016

Also note that Simple has had a job running nightly in prod for > 6 months now that uses github3.py to pull new issue events and issue comments, publishing them to Redshift. We have some dashboards that we use to visualize that info for different orgs within the company. The service that runs the job is built on Celery.

There's a screenshot of one of the dashboards fed by this info in https://www.simple.com/engineering/building-analytics-at-simple

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