Skip to content
This repository was archived by the owner on May 2, 2026. It is now read-only.

remove deprecated async_timeout-package for Python 3.11 and newer - #9

Open
hamarituc wants to merge 1 commit into
galactics:masterfrom
hamarituc:asyncio
Open

remove deprecated async_timeout-package for Python 3.11 and newer#9
hamarituc wants to merge 1 commit into
galactics:masterfrom
hamarituc:asyncio

Conversation

@hamarituc

Copy link
Copy Markdown
Contributor

The async_timeout-package is deprecated as its function is included in Python 3.11 or newer. Invoking space with a recent python interpreter will produce an exception.

$ space tle celestrak fetch
/usr/lib/python3.13/site-packages/space/wspace.py:11: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import iter_entry_points
Retrieving TLEs from celestrak
0 new satellites registered, 0 satellites updated
'Timeout' object does not support the context manager protocol
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.13/space", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.13/site-packages/space/__main__.py", line 178, in main
    func(*args)
    ~~~~^^^^^^^
  File "/usr/lib/python3.13/site-packages/space/tle/__init__.py", line 105, in space_tle
    celestrak.fetch(*args["<file>"])
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/space/tle/celestrak.py", line 75, in fetch
    loop.run_until_complete(_fetch(files))
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/space/tle/celestrak.py", line 159, in _fetch
    mysum = await asyncio.gather(*tasks)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/space/tle/celestrak.py", line 119, in _fetch_file
    with async_timeout.timeout(30):
         ~~~~~~~~~~~~~~~~~~~~~^^^^
TypeError: 'Timeout' object does not support the context manager protocol

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant