Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2022 06:59:29 +0700
From:      "Alex V. Petrov" <alexvpetrov@gmail.com>
To:        koobs@FreeBSD.org
Cc:        ports@FreeBSD.org, FreeBSD Python Team <freebsd-python@FreeBSD.org>
Subject:   Re: FreeBSD Port: py38-openpyxl-2.6.4
Message-ID:  <3881255b-ca3b-3624-ef98-d31d4f7749c3@gmail.com>
In-Reply-To: <e86a8335-2cbf-0d88-470c-e38333619d42@FreeBSD.org>
References:  <c87aa2ca-d101-c425-4942-1ac4a64feb3a@gmail.com> <e86a8335-2cbf-0d88-470c-e38333619d42@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
05.05.2022 06:48, Kubilay Kocak пишет:
> On 5/05/2022 3:09 am, Alex V. Petrov wrote:
>> Very old version in ports.
>>
>> I have error with pandas:
>> ImportError: Pandas requires version '3.0.0' or newer of 'openpyxl' 
>> (version '2.6.4' currently installed).
>>
>
> Alex,
>
> Upstream  does not declare/register a dependency (required or 
> optional) on openpyxl in setup.py/setup.cfg/etc but tests for it 
> (3.0.0) within their 'compat' module [1] via upstream issue #39603 [2] 
> added in the following commit:
>
> https://github.com/pandas-dev/pandas/commit/d5d43e0fa930f9bc96e3dcabf6eeb880c4fc6637 
>
>
> Notably openpyxl is listed within Optional Dependencies, describe as:
>
> "If the optional dependency is not installed, pandas will raise an 
> ImportError when the method requiring that dependency is called."
>
> This appears to be intentional error/messaging used to communicate to 
> pandas users that the method being used requires an optional 
> dependency, that is currently not available/installed, rather than a 
> port/package bug.
>
> A better UX for ports users would be to add OPTIONS that map to the 
> categories of additional functionality, depending on the relevant 
> optional dependencies. Example:
>
>  - HDF depending on pytables
>  - XLSX Support depending on openpyxl
>  - etc ...
>
>
> [1] 
> https://github.com/pandas-dev/pandas/blob/v1.3.5/pandas/compat/_optional.py#L22
> [2] https://github.com/pandas-dev/pandas/issues/39603

Before march, pandas perfectly worked with "xlsx" files.


-- 
-----
Alex.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3881255b-ca3b-3624-ef98-d31d4f7749c3>