Skip to content

Commit

Permalink
Switched cgroupspy to vendored version (apache#22209)
Browse files Browse the repository at this point in the history
This is part of the effort needed to implement Python 3.10
compatibility: apache#22050
  • Loading branch information
potiuk committed Mar 21, 2022
1 parent 179c5b6 commit 62740c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion airflow/task/task_runner/cgroup_task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import uuid

import psutil
from cgroupspy import trees

from airflow._vendor.cgroupspy import trees
from airflow.task.task_runner.base_task_runner import BaseTaskRunner
from airflow.utils.operator_resources import Resources
from airflow.utils.platform import getuser
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,13 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
'celery>=5.2.3',
'flower>=1.0.0',
]
cgroups = [
'cgroupspy>=0.1.4',
cgroups = [ # type:ignore
# Cgroups are now vendored in `airflow/_vendor/cgroupspy` for Python 3.10 compatibility
# The vendored code can be removed once cgroupspy released a new version after fixing
# the incompatibility https://github.com/cloudsigma/cgroupspy/issues/13 (hopefully >0.2.1 will
# be good for that. We should also be able to remove type:ignore above, as MyPy can't derive the type
# when this line is commented out
# 'cgroupspy>0.2.1',
]
cloudant = [
'cloudant>=2.0',
Expand Down

0 comments on commit 62740c2

Please sign in to comment.