Skip to content

Commit

Permalink
Merge pull request #2418 from saulpw/kef/3.7
Browse files Browse the repository at this point in the history
[dev] drop support for Python 3.7  #2231
  • Loading branch information
anjakefala authored Jun 3, 2024
2 parents 448318d + 3e7ded5 commit b2648f9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 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
1 change: 1 addition & 0 deletions dev/checklists/manual-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@
23. That DirSheet requires a commit-sheet before changes on filesystem
24. Test adding multiple aggregators via palette (+)
25. time vd -p tests/quit-nosave.vdj - note down the time. compare to PR #2369
26. Use the z; command. Then type in a command line like echo "| Ceci n'est pas une pipe"
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
2 changes: 1 addition & 1 deletion visidata/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def calcValue(self, row):
else:
args.append(arg)

p = subprocess.Popen([os.getenv('SHELL', 'bash'), '-c', ' '.join(args)],
p = subprocess.Popen([os.getenv('SHELL', 'bash'), '-c', shlex.join(args)],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return p.communicate()
except Exception as e:
Expand Down

0 comments on commit b2648f9

Please sign in to comment.