Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure-storage-blob 12.20.0 not compatible with Python 3.7 #51

Closed
1 task done
AaronOpfer opened this issue Jun 26, 2024 · 9 comments
Closed
1 task done

azure-storage-blob 12.20.0 not compatible with Python 3.7 #51

AaronOpfer opened this issue Jun 26, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@AaronOpfer
Copy link
Contributor

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

azure-storage-blob 12.20.0 is not compatible with Python 3.7.

Recommend patching the dependency and updating the repodata.

$ mamba create -n test python=3.7 azure-storage-blob=12.20.0
$ conda activate test
$ python -c 'import azure.storage.blob'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "test/lib/python3.7/site-packages/azure/storage/blob/__init__.py", line 12, in <module>
    from ._blob_client import BlobClient
  File "test/lib/python3.7/site-packages/azure/storage/blob/_blob_client.py", line 24, in <module>
    from ._shared.base_client import StorageAccountHostsMixin, parse_connection_str, parse_query, TransportWrapper
  File "test/lib/python3.7/site-packages/azure/storage/blob/_shared/base_client.py", line 35, in <module>
    from .constants import CONNECTION_TIMEOUT, DEFAULT_OAUTH_SCOPE, READ_TIMEOUT, SERVICE_HOST_BASE, STORAGE_OAUTH_SCOPE
  File "test/lib/python3.7/site-packages/azure/storage/blob/_shared/constants.py", line 7, in <module>
    from .._serialize import _SUPPORTED_API_VERSIONS
  File "test/lib/python3.7/site-packages/azure/storage/blob/_serialize.py", line 17, in <module>
    from ._models import (
  File "test/lib/python3.7/site-packages/azure/storage/blob/_models.py", line 19, in <module>
    from ._generated.models import ArrowField
  File "test/lib/python3.7/site-packages/azure/storage/blob/_generated/__init__.py", line 9, in <module>
    from ._azure_blob_storage import AzureBlobStorage
  File "test/lib/python3.7/site-packages/azure/storage/blob/_generated/_azure_blob_storage.py", line 17, in <module>
    from ._configuration import AzureBlobStorageConfiguration
  File "test/lib/python3.7/site-packages/azure/storage/blob/_generated/_configuration.py", line 9, in <module>
    from typing import Any, Literal
ImportError: cannot import name 'Literal' from 'typing' (test/lib/python3.7/typing.py)

Installed packages

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
azure-core                1.30.2             pyhd8ed1ab_0    conda-forge
azure-storage-blob        12.20.0            pyhd8ed1ab_0    conda-forge
brotli-python             1.0.9            py37hd23a5d3_7    conda-forge
ca-certificates           2024.6.2             hbcca054_0    conda-forge
certifi                   2024.6.2           pyhd8ed1ab_0    conda-forge
cffi                      1.15.1           py37h43b0acd_1    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
cryptography              38.0.2           py37h5994e8b_1    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
isodate                   0.6.1              pyhd8ed1ab_0    conda-forge
ld_impl_linux-64          2.40                 hf3520f5_7    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0              h77fa898_13    conda-forge
libgomp                   13.2.0              h77fa898_13    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libsqlite                 3.46.0               hde9e2c9_0    conda-forge
libstdcxx-ng              13.2.0              hc0a3c3a_13    conda-forge
libzlib                   1.3.1                h4ab18f5_1    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
openssl                   3.3.1                h4ab18f5_1    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1            py37h89c1867_5    conda-forge
python                    3.7.12          hf930737_100_cpython    conda-forge
python_abi                3.7                     4_cp37m    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.32.2             pyhd8ed1ab_0    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.46.0               h6d4b2fc_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge

Environment info

active environment : test
    active env location : <privacysnip>
            shell level : 2
       user config file : /home/opfera/.condarc
 populated config files : /etc/conda/condarc
                          /home/opfera/.condarc
          conda version : 24.5.0
    conda-build version : 24.5.1
         python version : 3.10.12.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=cascadelake
                          __conda=24.5.0=0
                          __glibc=2.17=0
                          __linux=3.10.0=0
                          __unix=0=0
       base environment : <privacysnip>  (writable)
      conda av data dir : <privacysnip>
  conda av metadata url : None
           channel URLs : <privacysnip>
          package cache : <privacysnip>
       envs directories : <privacysnip>
               platform : linux-64
             user-agent : conda/24.5.0 requests/2.31.0 CPython/3.10.12 Linux/3.10.0-1160.114.2.el7.x86_64 rhel/7.9 glibc/2.17 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
                UID:GID : <privacysnip>
             netrc file : None
           offline mode : False
@AaronOpfer AaronOpfer added the bug Something isn't working label Jun 26, 2024
@AaronOpfer
Copy link
Contributor Author

@ocefpaf another Python recipe problem for your tally marks. 🙂

@xhochy , @dhirschfeld , you've been active in this respository lately, can you look into this?

@dhirschfeld
Copy link
Member

That seems a correct analysis of the problem:

requirements:
host:
- python >=3.7
- pip
run:
- python >=3.7

https://github.com/Azure/azure-sdk-for-python/blob/azure-storage-blob_12.20.0/sdk/storage/azure-storage-blob/setup.py#L79

PRs accepted.

@dhirschfeld
Copy link
Member

dhirschfeld commented Jun 28, 2024

Also @AaronOpfer, you should stop using Python 3.7.

Yesterday was the 1-year anniversary of Python 3.7 not being supported, even for critical security fixes 🎂
https://peps.python.org/pep-0537/

@ocefpaf
Copy link
Member

ocefpaf commented Jun 28, 2024

Also @AaronOpfer, you should stop using Python 3.7.

Yesterday was the 1-year anniversary of Python 3.7 not being supported, even for critical security fixes 🎂 https://peps.python.org/pep-0537/

Sure but we, conda-forge, are building noarch packages that are are installable in earlier Pythons and that is wrong.
See conda-forge/conda-forge.github.io#2210 for more on this topic.

@dhirschfeld
Copy link
Member

dhirschfeld commented Jun 28, 2024

It's a shame that update-grayskull doesn't seem to work for python_requires

inspection: update-grayskull

@ocefpaf
Copy link
Member

ocefpaf commented Jun 28, 2024

It's a shame that update-grayskull doesn't seem to work for python_requires

Yep. The metadata to fix this is right there...

@dhirschfeld
Copy link
Member

Sure but we, conda-forge, are building noarch packages that are are installable in earlier Pythons and that is wrong.

That is true. IME python_requires very often falls through the cracks, which isn't helped by update-grayskull not catching it. That would solve a lot of the problems I think.

@dhirschfeld
Copy link
Member

The solution of pinning in host and test to the lowest allowable Python would work.. if the tests were run, but very often there is only an import test :/

@dhirschfeld
Copy link
Member

Resolved (for this repo, for now) by #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants