gruns / furl

🌐 URL parsing and manipulation made easy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

encode(dont_quote) & tostr(query_dont_quote) not implemented

eyeteajay opened this issue · comments

It appears that the 2 keyword arguments described in the API documentation aren't there yet:

>>> furl.__version__
'2.0.0'
>>> f.query.encode(dont_quote='@')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: encode() got an unexpected keyword argument 'don't_quote'
>>> f.tostr(query_dont_quote=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: tostr() got an unexpected keyword argument 'query_don't_quote'

Odd.

I can reproduce this in both Py2

$ py2 -c "from furl import furl; f = furl(); f.query.encode(dont_quote='@')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: encode() got an unexpected keyword argument 'dont_quote'

and Py3

$ py3 -c "from furl import furl; f = furl(); f.query.encode(dont_quote='@')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: encode() got an unexpected keyword argument 'dont_quote'

Both dont_quote and query_dont_quote patently exist as parameters.

    def encode(self, delimiter='&', quote_plus=True, dont_quote='',
               delimeter=_absent):

and

    def tostr(self, query_delimiter='&', query_quote_plus=True,
              query_dont_quote=''):

I'll look into this. My gut whispers it's just a mismatch between git (trunk)
and the latest version published on PyPi, v2.0.0.

Facing save issue. Can provide details if you want.

Python 3.7.3 (Checked also in python 3.6)
Ubuntu 18.04


UPD.
Understand now. 'query_dont_quote' will provided in furl 2.1.0. Mine is 2.0

@eyeteajay @rappongy Please confirm that this issue is now resolved for you with
the latest furl v2.1.0. I can no longer reproduce this issue with furl v2.1.0.

$ py2 -c "from furl import furl; f = furl(); f.query.encode(dont_quote='@')"; echo $?
0
$ py3 -c "from furl import furl; f = furl(); f.query.encode(dont_quote='@')"; echo $?
0

Are you still encountering this problem with the latest furl v2.1.0?

The python3 version is fine too.

Wonderful! Closing this Issue.

Thank you for your input and feedback, @eyeteajay and @rappongy. Don't hesitate to let me know if there's anything else I can do for you.