Skip to content

Commit 0473065

Browse files
authored
Merge pull request #199 from auscompgeek/drop-py39
Drop Python 3.9 support
2 parents 8bed6a9 + f902f04 commit 0473065

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

.github/workflows/dist.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ jobs:
131131
- "macos-14" # arm64
132132
- "windows-2022"
133133
python_version:
134-
- '3.9'
135134
- '3.10'
136135
- '3.11'
137136
- '3.12'

devtools/update_pyproject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, ctx: Context) -> None:
4040
# and retain all the comments
4141
self.subprojects: typing.Dict[str, ProjectInfo] = {}
4242
for name, project in self.ctx.subprojects.items():
43-
with open(project.pyproject_path, "r") as fp:
43+
with open(project.pyproject_path) as fp:
4444
data = tomlkit.load(fp)
4545

4646
self.subprojects[name] = ProjectInfo(

subprojects/pyntcore/tests/test_api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# works correctly
55
#
66

7-
from __future__ import print_function
8-
97
import pytest
108

119
import logging

subprojects/pyntcore/tests/test_util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929
def test_ntproperty(nt: NetworkTableInstance):
30-
class Foo(object):
30+
class Foo:
3131
robotTime = ntproperty(
3232
"/SmartDashboard/robotTime", 0.0, writeDefault=False, inst=nt
3333
)
@@ -85,14 +85,14 @@ class Foo(object):
8585
def test_ntproperty_emptyarray(nt: NetworkTableInstance):
8686
with pytest.raises(TypeError):
8787

88-
class Foo1(object):
88+
class Foo1:
8989
testArray = ntproperty(
9090
"/SmartDashboard/testArray", [], writeDefault=True, inst=nt
9191
)
9292

9393
with pytest.raises(TypeError):
9494

95-
class Foo2(object):
95+
class Foo2:
9696
testArray = ntproperty(
9797
"/SmartDashboard/testArray", [], writeDefault=False, inst=nt
9898
)
@@ -106,7 +106,7 @@ def test_ntproperty_multitest(nt: NetworkTableInstance):
106106
pyfrc tests
107107
"""
108108

109-
class Foo(object):
109+
class Foo:
110110
robotTime = ntproperty(
111111
"/SmartDashboard/robotTime", 0.0, writeDefault=False, inst=nt
112112
)

subprojects/robotpy-cscore/cscore/imagewriter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def location(self):
104104
if self._location is None:
105105
# This assures that we only log when a USB memory stick is plugged in
106106
if not os.path.exists(self.location_root):
107-
raise IOError(
107+
raise OSError(
108108
"Logging disabled, %s does not exist" % self.location_root
109109
)
110110

@@ -139,7 +139,7 @@ def _run(self):
139139

140140
last = now
141141

142-
except IOError as e:
142+
except OSError as e:
143143
logger.error("Error logging images: %s", e)
144144

145145
logger.warn("Storage thread exited")

subprojects/robotpy-wpiutil/examples/printlog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# handle systemTime specially
6161
if entry.name == "systemTime" and entry.type == "int64":
6262
dt = datetime.fromtimestamp(record.getInteger() / 1000000)
63-
print(" {:%Y-%m-%d %H:%M:%S.%f}".format(dt))
63+
print(f" {dt:%Y-%m-%d %H:%M:%S.%f}")
6464
continue
6565

6666
if entry.type == "double":

0 commit comments

Comments
 (0)