aliyun / aliyun/aliyun-openapi-python-sdk

`aliyunsdkcore` depends on deprecated `pycrypto`

Open Beginner friendly
#546 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
578
PR merge metrics
No merged PRs in 30d

Description

Error Stack
$ pip install aliyunsdkcore

...
...
...

      configure: creating ./config.status
      config.status: creating src/config.h
      src/_fastmath.c:33:10: fatal error: longintrepr.h: No such file or directory
         33 | #include <longintrepr.h>                                /* for conversions */
            |          ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycrypto
  Running setup.py clean for pycrypto
Failed to build pycrypto
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pycrypto)
Short Description

The aliyunsdkcore package depends on pycrypto>=2.6.1, which is deprecated, unmaintained, and fails to build on Python 3.13+ due to missing internal Python headers (longintrepr.h).

Impact:

  • Breaks installations on modern Python versions (3.13+).
  • Security risk due to unpatched vulnerabilities in pycrypto.

Suggested Fix:
Replace pycrypto with the maintained fork pycryptodome (API-compatible drop-in replacement).

Reproduction Steps:

  1. Install aliyunsdkcore on Python 3.13.
  2. Observe build failure due to pycrypto dependency.

Workaround:
Manually install pycryptodome and remove pycrypto, but this should be fixed upstream.


Additional Notes for the Report
  • Link to pycrypto deprecation: PyPI
  • pycryptodome is the recommended alternative (used by paramiko, google-auth, etc.).
  • Example error:
    src/_fastmath.c:33:10: fatal error: longintrepr.h: No such file or directory
    

This change would improve compatibility and security. Thanks for maintaining the SDK!


DeepSeek helps to generate issue descriptio.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the dependency metadata for aliyunsdkcore and confirm where pycrypto is declared. Reproduce installation on Python 3.13, then verify that the maintained replacement is used and that pip install aliyunsdkcore completes without the pycrypto build failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.