Re: FreeBSD Port: py38-openpyxl-2.6.4

From: Alex V. Petrov <alexvpetrov_at_gmail.com>
Date: Wed, 04 May 2022 23:59:29 UTC
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.