Skip to content

Commit

Permalink
[dev] drop support for Python 3.7 #2231
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Jun 3, 2024
1 parent 448318d commit 738bb8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11"]

runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Saul Pwanson",
python_requires=">=3.7",
python_requires=">=3.8",
author_email="[email protected]",
url="https://visidata.org",
download_url="https://github.com/saulpw/visidata/tarball/" + __version__,
Expand Down
5 changes: 1 addition & 4 deletions visidata/aggregators.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,9 @@ def mean(vals):
if vals:
return float(sum(vals))/len(vals)

def _vsum(vals):
def vsum(vals):
return sum(vals, start=type(vals[0] if len(vals) else 0)()) #1996

# start parameter in sum() added in Python 3.8
vsum = _vsum if sys.version_info[:2] >= (3, 8) else sum

# http://code.activestate.com/recipes/511478-finding-the-percentile-of-the-values/
def _percentile(N, percent, key=lambda x:x):
"""
Expand Down

0 comments on commit 738bb8b

Please sign in to comment.