Skip to content

Commit 0f76769

Browse files
authored
Update some test environments to 3.10 (#3149)
* Update some test environments to 3.10 Fixes #3148 * Update environments in workflows file as well
1 parent 6785335 commit 0f76769

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

.github/workflows/public-api-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up Python
3232
uses: actions/setup-python@v2
3333
with:
34-
python-version: 3.9
34+
python-version: '3.10'
3535

3636
- name: Install tox
3737
run: pip install tox==3.27.1 -U tox-factor

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
- name: Set up Python
102102
uses: actions/setup-python@v2
103103
with:
104-
python-version: 3.9
104+
python-version: '3.10'
105105
architecture: 'x64'
106106
- name: Install tox
107107
run: pip install tox==3.27.1

scripts/public_symbols_checker.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ def get_symbols(change_type, diff_lines_getter, prefix):
7676
def a_diff_lines_getter(diff_lines):
7777
return diff_lines.b_blob.data_stream.read().decode("utf-8").split("\n")
7878

79+
7980
def d_diff_lines_getter(diff_lines):
8081
return diff_lines.a_blob.data_stream.read().decode("utf-8").split("\n")
8182

83+
8284
def m_diff_lines_getter(diff_lines):
8385
return unified_diff(
8486
diff_lines.a_blob.data_stream.read().decode("utf-8").split("\n"),
@@ -91,6 +93,7 @@ def m_diff_lines_getter(diff_lines):
9193
get_symbols("M", m_diff_lines_getter, r"\+")
9294
get_symbols("M", m_diff_lines_getter, r"\-")
9395

96+
9497
def remove_common_symbols():
9598
# For each file, we remove the symbols that are added and removed in the
9699
# same commit.
@@ -115,17 +118,18 @@ def remove_common_symbols():
115118
if not removed_symbols[file_path]:
116119
del removed_symbols[file_path]
117120

121+
118122
if added_symbols or removed_symbols:
119123

120124
# If a symbol is added and removed in the same commit, we consider it
121125
# as not added or removed.
122126
remove_common_symbols()
123127
print("The code in this branch adds the following public symbols:")
124128
print()
125-
for file_path, symbols in added_symbols.items():
126-
print(f"- {file_path}")
127-
for symbol in symbols:
128-
print(f"\t{symbol}")
129+
for file_path_, symbols_ in added_symbols.items():
130+
print(f"- {file_path_}")
131+
for symbol_ in symbols_:
132+
print(f"\t{symbol_}")
129133
print()
130134

131135
print(
@@ -137,10 +141,10 @@ def remove_common_symbols():
137141
print()
138142
print("The code in this branch removes the following public symbols:")
139143
print()
140-
for file_path, symbols in removed_symbols.items():
141-
print(f"- {file_path}")
142-
for symbol in symbols:
143-
print(f"\t{symbol}")
144+
for file_path_, symbols_ in removed_symbols.items():
145+
print(f"- {file_path_}")
146+
for symbol_ in symbols_:
147+
print(f"\t{symbol_}")
144148
print()
145149

146150
print(

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ commands =
189189
mypyinstalled: mypy --install-types --non-interactive --namespace-packages opentelemetry-api/tests/mypysmoke.py --strict
190190

191191
[testenv:spellcheck]
192-
basepython: python3.9
192+
basepython: python3.10
193193
recreate = True
194194
deps =
195195
codespell
@@ -254,7 +254,7 @@ commands =
254254
sphinx-build -E -a -W -b html -T . _build/html
255255

256256
[testenv:tracecontext]
257-
basepython: python3.9
257+
basepython: python3.10
258258
deps =
259259
# needed for tracecontext
260260
aiohttp~=3.6
@@ -312,7 +312,7 @@ commands_post =
312312
docker-compose down -v
313313

314314
[testenv:public-symbols-check]
315-
basepython: python3.9
315+
basepython: python3.10
316316
recreate = True
317317
deps =
318318
GitPython

0 commit comments

Comments
 (0)