chore: drop Python 3.5 (#3719)

* chore: drop Python 3.5 support

* chore: more fstrings with flynt's help

* ci: drop Python 3.5

* chore: bump dependency versions

* docs: touch up py::args

* tests: remove deprecation warning

* Ban smartquotes

* Very minor tweaks (by-product of reviewing PR #3719).

Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
This commit is contained in:
Henry Schreiner
2022-02-11 19:06:16 -05:00
committed by GitHub
parent 1a432b426f
commit 522c59ceb2
49 changed files with 171 additions and 241 deletions

View File

@@ -15,7 +15,7 @@ def test_smart_ptr(capture):
m.print_object_2(o)
m.print_object_3(o)
m.print_object_4(o)
assert capture == "MyObject1[{i}]\n".format(i=i) * 4
assert capture == f"MyObject1[{i}]\n" * 4
for i, o in enumerate(
[m.make_myobject1_1(), m.make_myobject1_2(), m.MyObject1(6), 7], start=4
@@ -33,13 +33,11 @@ def test_smart_ptr(capture):
m.print_myobject1_4(o)
times = 4 if isinstance(o, int) else 8
assert capture == "MyObject1[{i}]\n".format(i=i) * times
assert capture == f"MyObject1[{i}]\n" * times
cstats = ConstructorStats.get(m.MyObject1)
assert cstats.alive() == 0
expected_values = ["MyObject1[{}]".format(i) for i in range(1, 7)] + [
"MyObject1[7]"
] * 4
expected_values = [f"MyObject1[{i}]" for i in range(1, 7)] + ["MyObject1[7]"] * 4
assert cstats.values() == expected_values
assert cstats.default_constructions == 0
assert cstats.copy_constructions == 0
@@ -57,7 +55,7 @@ def test_smart_ptr(capture):
m.print_myobject2_2(o)
m.print_myobject2_3(o)
m.print_myobject2_4(o)
assert capture == "MyObject2[{i}]\n".format(i=i) * 4
assert capture == f"MyObject2[{i}]\n" * 4
cstats = ConstructorStats.get(m.MyObject2)
assert cstats.alive() == 1
@@ -80,7 +78,7 @@ def test_smart_ptr(capture):
m.print_myobject3_2(o)
m.print_myobject3_3(o)
m.print_myobject3_4(o)
assert capture == "MyObject3[{i}]\n".format(i=i) * 4
assert capture == f"MyObject3[{i}]\n" * 4
cstats = ConstructorStats.get(m.MyObject3)
assert cstats.alive() == 1