gruns / furl

🌐 URL parsing and manipulation made easy.
Other
2.63k stars 152 forks source link

New bugs with Python 3.9.2+ #135

Closed shadchin closed 3 years ago

shadchin commented 3 years ago

Python 3.9.1 #121

======================================================================
FAIL: test_join (test_furl.TestFurl)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadchin/github/furl/tests/test_furl.py", line 2060, in test_join
    assert f.url == 'wss://slrp.com/foo:1'
AssertionError

Python 3.9.2

======================================================================
FAIL: test_join (test_furl.TestFurl)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadchin/github/furl/tests/test_furl.py", line 2060, in test_join
    assert f.url == 'wss://slrp.com/foo:1'
AssertionError

======================================================================
FAIL: test_add (test_furl.TestQuery)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadchin/github/furl/tests/test_furl.py", line 678, in test_add
    assert q.params.allitems() == runningsum
AssertionError

======================================================================
FAIL: test_params (test_furl.TestQuery)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadchin/github/furl/tests/test_furl.py", line 806, in test_params
    assert item1 == item2
AssertionError

======================================================================
FAIL: test_remove (test_furl.TestQuery)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadchin/github/furl/tests/test_furl.py", line 720, in test_remove
    assert len(q.params) == 0
AssertionError

======================================================================
FAIL: test_set (test_furl.TestQuery)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadchin/github/furl/tests/test_furl.py", line 687, in test_set
    assert q.params.allitems() == items_omd.allitems()
AssertionError

======================================================================
FAIL: test_various (test_furl.TestQuery)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadchin/github/furl/tests/test_furl.py", line 650, in test_various
    assert q.params.allitems() == items.allitems()
AssertionError
gruns commented 3 years ago

hi @shadchin!

do you have time to investigate these issues in py3.9?

my first thought is some standard library fn furl uses changed behavior from py3.8 to py3.9.1 and to py3.9.2

shadchin commented 3 years ago

More info - https://bugs.python.org/issue42967

shadchin commented 3 years ago

Also affected Python 3.8.8

mcepl commented 3 years ago

Here is the patch

gruns commented 3 years ago

@mcepl awesome! great patch

can you please submit a PR for your patch?

other remnants, like

        # ';' is a valid query delimiter.
        q = furl.Query('=;=')
        assert q.params.allitems() == [('', ''), ('', '')] and str(q) == '=&='
        q = furl.Query('a=a;b=b;c=')
        assert q.params == {
            'a': 'a', 'b': 'b', 'c': ''} and str(q) == 'a=a&b=b&c='

should be excised, too

mcepl commented 3 years ago

@gruns I am sorry, but I am a maintainer of hundreds of packages for openSUSE, I cannot keep open git checkouts for all of them. I don't care about the recognition, you can apply the patch under your name if you wish.

gruns commented 3 years ago

fixed in the latest v2.1.2!

huge thank you for all your help, discussion, and PRs, ben, matěj, and alexander :pray: