Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 878035 - dev-python/requests-2.28.1: crashed when installed charset_normalizer-3.0.0
Summary: dev-python/requests-2.28.1: crashed when installed charset_normalizer-3.0.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: https://github.com/psf/requests/pull/...
Whiteboard:
Keywords: PullRequest
: 878107 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-10-23 04:37 UTC by vowstar
Modified: 2022-11-25 07:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vowstar 2022-10-23 04:37:02 UTC
When installed dev-python/charset_normalizer-3.0.0, will assert in charset_normalizer_version: 

    elif charset_normalizer_version:
        major, minor, patch = charset_normalizer_version.split(".")[:3]
        major, minor, patch = int(major), int(minor), int(patch)
        # charset_normalizer >= 2.0.0 < 3.0.0
        assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0)



Reproducible: Always

Steps to Reproduce:
1. install charset_normalizer-3.0.0
2. pip install feeluown
3. run feeluown





Actual Results:  
Then will get:

  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 795, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'charset-normalizer<3,>=2' distribution was not found and is required by requests

Expected Results:  
Run without raise exception

Apply this patch (already in upstream) will fixed this issue, I've tested.

https://github.com/psf/requests/pull/6261
Comment 1 Larry the Git Cow gentoo-dev 2022-10-23 05:39:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc8cc1b084289bdc831bef60706d187c77b92881

commit cc8cc1b084289bdc831bef60706d187c77b92881
Author:     Huang Rui <vowstar@gmail.com>
AuthorDate: 2022-10-23 04:52:38 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-10-23 05:07:23 +0000

    dev-python/requests: allow charset normalizer >=2 and <4
    
    charset-normalizer 3.0.0 has been released in ::gentoo
    Fix crashed problem when installed charset_normalizer-3.0.0
    
    Closes: https://bugs.gentoo.org/878035
    Signed-off-by: Huang Rui <vowstar@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/27909
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 ...uests-2.28.1-fix-charsetnormalizer-assert.patch | 41 ++++++++++++++++++++++
 ...sts-2.28.1.ebuild => requests-2.28.1-r1.ebuild} |  2 ++
 2 files changed, 43 insertions(+)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-10-24 15:03:19 UTC
*** Bug 878107 has been marked as a duplicate of this bug. ***
Comment 3 Larry the Git Cow gentoo-dev 2022-11-25 07:14:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e1e27390394fa64b6c44e87a8c3e737ce9ef2e4

commit 7e1e27390394fa64b6c44e87a8c3e737ce9ef2e4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-25 07:10:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-25 07:10:42 +0000

    dev-python/certifi: use importlib
    
    This avoids breaking arbitrary packages on the system because they
    happen to use certifi, as certifi will pick up if any other packages
    on the system have an unsatisfied requirement - which is often
    bogus.
    
    Bug: https://bugs.gentoo.org/826874
    Bug: https://bugs.gentoo.org/854294
    Bug: https://bugs.gentoo.org/878035
    Closes: https://bugs.gentoo.org/878045
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/certifi/certifi-3021.3.16-r3.ebuild     |  55 +++++++
 .../files/certifi-3021.3.16-use-importlib.patch    | 164 +++++++++++++++++++++
 2 files changed, 219 insertions(+)