delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/02/25/04:11:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 515FF3858432
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=dinwoodie.org
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinwoodie.org
Date: Fri, 25 Feb 2022 09:11:09 +0000
From: Adam Dinwoodie <adam AT dinwoodie DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: python37-requests package does depends on charset_normalizer or
chardet
Message-ID: <20220225091109.vorjvluayswlpdc5@lucy.dinwoodie.org>
References: <CAK+zucn77L9Pw+P-osKSp2SoreyJ-g64EHamdL4iQFgzqAqaWg AT mail DOT gmail DOT com>
<CAK+zucm_abE4yU2CVJ4uPe6xwOyFnRrPF17ach9cPcif-wvGEQ AT mail DOT gmail DOT com>
<20220223145721 DOT 7br2bxokvv4vyih4 AT lucy DOT dinwoodie DOT org>
<CAK+zucmtuNRX1_n4ZRe4u1V0MatYP1CeMz7QV+bQQHe1S-4U8w AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAK+zucmtuNRX1_n4ZRe4u1V0MatYP1CeMz7QV+bQQHe1S-4U8w@mail.gmail.com>
X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC, SPF_HELO_PASS, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Fri, Feb 25, 2022 at 04:40:01PM +0800, Sharuzzaman Ahmat Raslan wrote:
> On Wed, Feb 23, 2022 at 10:58 PM Adam Dinwoodie <adam AT dinwoodie DOT org> wrote:
> >
> > On Wed, Feb 23, 2022 at 06:56:46PM +0800, Sharuzzaman Ahmat Raslan wrote:
> > > On Wed, Feb 23, 2022 at 6:37 PM Sharuzzaman Ahmat Raslan
> > > <sharuzzaman AT gmail DOT com> wrote:
> > > >
> > > > Hi Cygwin package manager.
> > > >
> > > > I'm on my new laptop, and installing packages as necessary.
> > > >
> > > > After installing python37-requests, my program raised an exception like this:
> > > >
> > > > Traceback (most recent call last):
> > > >   File "get_header.py", line 1, in <module>
> > > >     import requests
> > > >   File "/usr/lib/python3.7/site-packages/requests/__init__.py", line
> > > > 100, in <module>
> > > >     check_compatibility(urllib3.__version__, chardet_version,
> > > > charset_normalizer_version)
> > > >   File "/usr/lib/python3.7/site-packages/requests/__init__.py", line
> > > > 85, in check_compatibility
> > > >     raise Exception("You need either charset_normalizer or chardet installed")
> > > > Exception: You need either charset_normalizer or chardet installed
> > > >
> > > > I did not see python37-requests depends or pulling in
> > > > charset_normalizer or chardet during installation. Is that
> > > > intentional?
> > > >
> > > > Thank you.
> > >
> > >
> > > Installing python37-chardet manually clears the exception, but not
> > > solving the initial issue.
> >
> > It looks to me as though python37-requests correctly lists a dependency
> > on python37-chardet in Cygwin's setup.ini.  Can you please provide the
> > setup.log.full file from when you installed python37-requests, as well
> > as the cygcheck output per the link below?
> >
> > > Problem reports:      https://cygwin.com/problems.html
> >
> 
> Hi Adam.
> 
> Attached is the setup log that is relevant to the time I install
> python37-requests.
> 
> The setup.log.full contains the python37-chardet info, but not
> python37-requests.
> 
> Also attached is the cygcheck.out file
> 
> If you want to have the python37-requests setup.log.full, I can redo
> the installation and capture it.

Ah, I've worked out what confused me: I was looking at the old
"requires" line in the setup.ini file, rather than the new "depends2"
line.  The newer style of specifying dependencies, used by recent Cygwin
installers (including the one you were using) doesn't list
python37-chardet as a dependency.  I suspect that's a bug, and it looks
like a bug that was introduced with the most recent python37-requests
package, as it's present for the previous 2.24.0-1 and 2.25.1-1
releases.

I think this is one for Marco Atzeri, as the python-requests package
maintainer...

In the meantime, you've already found the workaround: just manually
install the relevant python-chardet package.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019