typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

[stubsabot] Potential issues with outdated or unsupported packages

Open donbarbos opened this issue 5 months ago • 1 comments

When running stubsabot on the hugovk/top-pypi-packages list, I noticed some errors that may occur if we attempt to add their stubs to typeshed.

It seems that some of these libraries are no longer maintained and rely either on outdated distribution methods or an incorrect versions dictionary. I’m not sure if it’s worth generalizing stubsabot’s functionality just to support such cases, but similar issues might also appear in other packages outside the top 5000 most popular ones.

(in fact the code was slightly changed, so the whole traceback will be of little use for finding the error)

traceback

Error processing awsretry:
Traceback (most recent call last):
    ...
    release_info = sorted(
                   ~~~~~~~
        releases[version], key=lambda x: bool(x["packagetype"] == "bdist_wheel")
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    )[-1]
    ~^^^^
IndexError: list index out of range

Error processing pytest-coverage: Traceback (most recent call last): ... release_info = sorted( ~~~~~~~ releases[version], key=lambda x: bool(x["packagetype"] == "bdist_wheel") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )[-1] ~^^^^ IndexError: list index out of range

Error processing google-oauth: Traceback (most recent call last): ... release_info = sorted( ~~~~~~~ releases[version], key=lambda x: bool(x["packagetype"] == "bdist_wheel") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )[-1] ~^^^^ IndexError: list index out of range

Error processing commonregex: Traceback (most recent call last): ... release_info = sorted( ~~~~~~~ releases[version], key=lambda x: bool(x["packagetype"] == "bdist_wheel") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )[-1] ~^^^^ IndexError: list index out of range

Error processing slack: Traceback (most recent call last): ... release_info = sorted( ~~~~~~~ releases[version], key=lambda x: bool(x["packagetype"] == "bdist_wheel") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )[-1] ~^^^^ IndexError: list index out of range

Error processing pyrouge: Traceback (most recent call last): ... release_info = sorted( ~~~~~~~ releases[version], key=lambda x: bool(x["packagetype"] == "bdist_wheel") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )[-1] ~^^^^ IndexError: list index out of range

Error processing git-python: Traceback (most recent call last): ... in release_contains_py_typed raise AssertionError( f"Unknown package type for {release_to_download.distribution}: {packagetype!r}" ) AssertionError: Unknown package type for git-python: 'bdist_egg'

Error processing environ: Traceback (most recent call last): ... in release_contains_py_typed raise AssertionError( f"Unknown package type for {release_to_download.distribution}: {packagetype!r}" ) AssertionError: Unknown package type for environ: 'bdist_wininst'

Error processing python-constraint: Traceback (most recent call last): ... in release_contains_py_typed raise AssertionError( f"Package file {release_to_download.filename!r} does not end with '.tar.gz' or '.zip'" ) AssertionError: Package file 'python-constraint-1.4.0.tar.bz2' does not end with '.tar.gz' or '.zip'

Error processing amqplib: Traceback (most recent call last): ... release_contains_py_typed raise AssertionError( f"Package file {release_to_download.filename!r} does not end with '.tar.gz' or '.zip'" ) AssertionError: Package file 'amqplib-1.0.2.tgz' does not end with '.tar.gz' or '.zip'

Error processing mocker: Traceback (most recent call last): ... in release_contains_py_typed raise AssertionError( f"Package file {release_to_download.filename!r} does not end with '.tar.gz' or '.zip'" ) AssertionError: Package file 'mocker-1.1.1.tar.bz2' does not end with '.tar.gz' or '.zip'

Error processing crcmod: Traceback (most recent call last): ... in release_contains_py_typed raise AssertionError( f"Unknown package type for {release_to_download.distribution}: {packagetype!r}" ) AssertionError: Unknown package type for crcmod: 'bdist_msi'

Error processing multiprocessing: Traceback (most recent call last): ... in release_contains_py_typed raise AssertionError( f"Unknown package type for {release_to_download.distribution}: {packagetype!r}" ) AssertionError: Unknown package type for multiprocessing: 'bdist_wininst'

Error processing fpdf: Traceback (most recent call last): ... in release_contains_py_typed raise AssertionError( f"Unknown package type for {release_to_download.distribution}: {packagetype!r}" ) AssertionError: Unknown package type for fpdf: 'bdist_wininst'

compact list

        pytest-coverage: IndexError
        slack: IndexError
        awsretry: IndexError
        commonregex: IndexError
        google-oauth: IndexError
        pyrouge: IndexError
        fpdf: Unknown package type: 'bdist_wininst'
        crcmod: Unknown package type: 'bdist_msi'
        git-python: Unknown package type: 'bdist_egg'
        multiprocessing: Unknown package type: 'bdist_wininst'
        environ: Unknown package type: 'bdist_wininst'
        python-constraint: Package file 'python-constraint-1.4.0.tar.bz2' does not end with '.tar.gz' or '.zip'
        mocker: Package file 'mocker-1.1.1.tar.bz2' does not end with '.tar.gz' or '.zip'
        amqplib: Package file 'amqplib-1.0.2.tgz' does not end with '.tar.gz' or '.zip'

The question is not critical right now, but it seems likely that someone may want to revisit it in the future.

donbarbos avatar Sep 12 '25 18:09 donbarbos

I'm pretty happy to wait to think about it if and when it comes up.

hauntsaninja avatar Sep 12 '25 20:09 hauntsaninja