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

ImportError: cannot import name 'quote' #1447

Closed
pvizeli opened this issue Dec 3, 2016 · 14 comments
Closed

ImportError: cannot import name 'quote' #1447

pvizeli opened this issue Dec 3, 2016 · 14 comments
Labels

Comments

@pvizeli
Copy link

pvizeli commented Dec 3, 2016

Long story short

After last yarl update we can not use aiohttp (1.1.5) with it.
https://travis-ci.org/home-assistant/home-assistant/jobs/180947922

@balloob
Copy link
Contributor

balloob commented Dec 3, 2016

From the Yarl 0.8 changes:

Don't expose yarl.quote and yarl.unquote, these functions are part of private API

quote and unquote are used in aiohttp, example. And aiohttp depends on a greater than version of Yarl, meaning it will try now to install 0.8 which breaks builds.

This has broken all of aiohttp tests too #1446

@jettify
Copy link
Member

jettify commented Dec 3, 2016

Same thing with aiohttp_admin 😄 (https://travis-ci.org/aio-libs/aiohttp_admin/jobs/180946355)

Looks like aiohttp can use urllib.parse import quote, unquote instead of yarl one.

@balloob
Copy link
Contributor

balloob commented Dec 3, 2016

For people that are looking to fix their own builds while waiting for aiohttp to be updated, pinning Yarl to 0.7.1 (the last release in the 0.7.x series) will do the trick. Example

@asvetlov
Copy link
Member

asvetlov commented Dec 3, 2016

Guys, I'm very sorry.
Should be fixed by 0.8.1 (build is running now)

@balloob
Copy link
Contributor

balloob commented Dec 3, 2016

Thanks for the quick response @asvetlov

@asvetlov asvetlov closed this as completed Dec 3, 2016
@asvetlov
Copy link
Member

asvetlov commented Dec 3, 2016

Sorry, it was my epic fault.
Shame on me.
Thank you all guys very much for very quick bug report.

@Carbaz
Copy link

Carbaz commented Jan 15, 2018

As of today latest versions of aiohttp==2.3.7 and yarl==1.0.0 this problem raises again.

Less than a month updates:
aiohttp 2.3.7 (2017-12-27)
yarl 1.0.0 (2018-01-15)

Yarl changelogs:
1.0.0 (2018-01-15)
Drop yarl.quote and yarl.unquote public functions.
0.8.1 (2016-12-03)
Fix broken aiohttp: revert back quote / unquote.
0.8.0 (2016-12-03)
Don't expose yarl.quote and yarl.unquote, these functions are part of private API.

What kind o management is this? If they are private then they are, stop exposing and avoid other projects rely on them, otherwise do not drop them later.

@csabaszilveszter
Copy link

csabaszilveszter commented Jan 15, 2018

Long traceback short..

    from yarl import URL, unquote
ImportError: cannot import name 'unquote'

@diogobaeder
Copy link

Yeah, still happening for me too, even though I'm using the latest aiohttp version (as of today).

johanherman pushed a commit to johanherman/archive-verify that referenced this issue Jan 15, 2018

Unverified

No user is associated with the committer email.
@4tochka
Copy link

4tochka commented Jan 15, 2018

same problem

@syrusakbary
Copy link

Same problem here.

Would be great to either pin the yarl dependency or have integration tests between this two libs so we assure this issue doesn't happen again.

@diogobaeder
Copy link

Just a yarl<1 would be enough. You don't wanna really pin the dep in aiohttp, but rather keep loose with just enough protection against version incompatibility, since aiohttp is a library and not an end project.

@asvetlov
Copy link
Member

done

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants