Skip to content

Commit 28c5028

Browse files
committed
fix: include cached-property as a conditional dependency
Before this commit, we were loading cached-property as a dependency in `setup.py`, which is flawed, as this choice happens when the package is built and not when the package is installed. I.e. whether osc-tiny depends on cached-property depends on the builder's python version, not on the user's.
1 parent f45e089 commit 28c5028

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

.github/workflows/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install -r requirements.txt -r requirements_pre38.txt responses
28+
pip install -r requirements.txt responses
2929
- name: Test
3030
run: python -m unittest discover
3131
test:

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ python-dateutil
44
pytz
55
pyyaml
66
urllib3
7+
cached-property; python_version < '3.8'

requirements_pre38.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
from sys import version_info
43
from setuptools import setup, find_packages
54

65

@@ -13,10 +12,6 @@ def _filter(requires):
1312
with open("requirements.txt", "r") as fh:
1413
requirements += _filter(fh.readlines())
1514

16-
if version_info.minor < 8:
17-
with open("requirements_pre38.txt", "r") as fh:
18-
requirements += _filter(fh.readlines())
19-
2015
return requirements
2116

2217

0 commit comments

Comments
 (0)