#1028175 snakemake rulename failes with asyncio has no attribute coroutine with python3.11

#1028175#5
Date:
2023-01-08 04:08:30 UTC
From:
To:
Dear Maintainer,

I noticed that snakemake-modes tests were failing while I was trying to build
the package.

Eventually I found that running the snakemake executable was failing with
python 3.11, but worked with 3.10.

Using the test Snakefile from snakemake-mode for the tests I ran the command
with both python3.11 and python3.10. The results are below.

I should probably go try to package the throttle library and upload it to NEW.

Snakemake's upstream patched snakemake to use a different library throttle in
https://github.com/snakemake/snakemake/issues/1952

$ python3.11 /usr/bin/snakemake --dryrun aa.out
Building DAG of jobs...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/snakemake/__init__.py", line 730, in
snakemake
    success = workflow.execute(
              ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/snakemake/workflow.py", line 942, in
execute
    self.scheduler = JobScheduler(
                     ^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/snakemake/scheduler.py", line 105, in
__init__
    from ratelimiter import RateLimiter
  File "/usr/lib/python3/dist-packages/ratelimiter.py", line 36, in <module>
    class RateLimiter(object):
  File "/usr/lib/python3/dist-packages/ratelimiter.py", line 127, in
RateLimiter
    __aexit__ = asyncio.coroutine(__exit__)
                ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'

$ python3.10 -Wd /usr/bin/snakemake --dryrun aa.out
Building DAG of jobs...
/usr/lib/python3/dist-packages/ratelimiter.py:127: DeprecationWarning:
"@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  __aexit__ = asyncio.coroutine(__exit__)
Job stats:
job      count    min threads    max threads
-----  -------  -------------  -------------
aa           1              1              1
total        1              1              1


[Sat Jan  7 19:56:59 2023]
rule aa:
    output: aa.out
    jobid: 0
    reason: Missing output files: aa.out
    resources: tmpdir=/tmp

Job stats:
job      count    min threads    max threads
-----  -------  -------------  -------------
aa           1              1              1
total        1              1              1

Reasons:
    (check individual jobs above for details)
    missing output files:
        aa

This was a dry-run (flag -n). The order of jobs does not reflect the order of
execution.
/usr/lib/python3.10/tempfile.py:999: ResourceWarning: Implicitly cleaning up
<TemporaryDirectory '/home/diane/.cache/snakemake/snakemake/source-
cache/runtime-cache/tmplqpvu6li'>
  _warnings.warn(warn_message, ResourceWarning)

#1028175#10
Date:
2023-01-08 07:16:04 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-ratelimiter, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1028175@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Diane Trout <diane@ghic.org> (supplier of updated python-ratelimiter package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 07 Jan 2023 22:26:05 -0800
Source: python-ratelimiter
Architecture: source
Version: 1.2.0.post0-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Diane Trout <diane@ghic.org>
Closes: 1025119 1028175
Changes:
 python-ratelimiter (1.2.0.post0-4) unstable; urgency=medium
 .
   * Add debian/patches/use-async-keyword.patch
     - Makes package compatible with Python 3.11 Closes: #1025119
       Closes: #1028175
Checksums-Sha1:
 ec0025feab03bf8fa5f7f7e1e0539a1c52f697ac 2162 python-ratelimiter_1.2.0.post0-4.dsc
 fe57af82a377f27b6d0111c2a7e505e3b3bf85c0 3704 python-ratelimiter_1.2.0.post0-4.debian.tar.xz
 f1610e08d399c518898d76ec1bd1c66c575da7f3 6838 python-ratelimiter_1.2.0.post0-4_amd64.buildinfo
Checksums-Sha256:
 804915fcb2872a8f1715f1942c469f90f8027c1bbcd138cc763652867ca97ef4 2162 python-ratelimiter_1.2.0.post0-4.dsc
 110b977168b544855b03844c93d5933b0889abed78a3d954063b9ee0c6ce84d4 3704 python-ratelimiter_1.2.0.post0-4.debian.tar.xz
 895563f47dbea1a5fe6944391ee044c99ccdd551aa97f3b9b6d2fc8f80efd670 6838 python-ratelimiter_1.2.0.post0-4_amd64.buildinfo
Files:
 700a2e243a8d5733cdf13467a0d3b246 2162 python optional python-ratelimiter_1.2.0.post0-4.dsc
 a731391cd7aaed83c9299f8bf7323ec1 3704 python optional python-ratelimiter_1.2.0.post0-4.debian.tar.xz
 b46c4132ffa4a9945d7dd4daac8866a0 6838 python optional python-ratelimiter_1.2.0.post0-4_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEETQVcMeSBIEX5AQ11mQ04NnM013AFAmO6YzgACgkQmQ04NnM0
13AUBg//ZzsCPQ24cE6xG+QdLBJ0zWF+k52gseivKyKhdqFr8xEFgP22/XcAr5av
oH+2MDBN/PZWJ5HDYc1AoVormL0luQk3pfUmlaiCEDYtI7L7cOrHxtfzc/PMAqWS
f1/Z32CEzU34id6+vXlk6AEHtB0RjJCWP1fcf/KhsF0ggouBszw8hbGHUvS8ozky
4EGP4uHUBTqf6yM6j4Qw0koXGsw96B71MZs7HaBPcRThh9dx+AenW0TY4I1nSE7d
t5QIvG2Z94JIW0La9RwL9J/zmdrOBXs/xcu3OT6vqQXGN3Ciw5apoxAF7c5BAbsG
xrYPJTgrxBUfx9a4zCVkW862rLSYIbvn6nYjuqemZm9M6sl8ckqqnZet39oz66vD
I/3tlMynhhHybxStZE18dwdmDMF65jo9MX6AwynV9jgeKEeto5W5Bh6BBcgUWb2Z
O5LOZeq5ZqwzkpYNBPhm67eKjRUURzu0JTdqGXT7mfAY5ZTgWlVokEys6WND2rpE
gCXEdn57iq2/bip4trMYI1oDe8/Asr1WAJR33QYl2oYeSjtklseiso9QV1g75reT
fiHcsykpjbo7MEHDt2VT/O0VVDRKntSfRCFXvZWJHVCuLVSI5A4ESxaE2IuMeZ8s
z5sLv6fGsG4MqqIxFWdWjA/V3ADWoWNgYi7o5nozatGhpaMT1T4=
=9G/9
-----END PGP SIGNATURE-----