Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev] drop support for Python 3.7 #2231 #2418

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading