Skip to content

Commit 8f831e9

Browse files
acozzettecopybara-github
authored andcommitted
Update Python versions to reflect that we now support 3.8 through 3.11
PiperOrigin-RevId: 569317472
1 parent 0c3f579 commit 8f831e9

File tree

6 files changed

+19
-60
lines changed

6 files changed

+19
-60
lines changed

protobuf_deps.bzl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,8 @@ def protobuf_deps():
151151

152152
# Python Downloads
153153
python_source_archive(
154-
name = "python-3.7.0",
155-
sha256 = "85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d",
156-
)
157-
python_nuget_package(
158-
name = "nuget_python_i686_3.7.0",
159-
sha256 = "a8bb49fa1ca62ad55430fcafaca1b58015e22943e66b1a87d5e7cef2556c6a54",
160-
)
161-
python_nuget_package(
162-
name = "nuget_python_x86-64_3.7.0",
163-
sha256 = "66eb796a5bdb1e6787b8f655a1237a6b6964af2115b7627cf4f0032cf068b4b2",
154+
name = "python-3.8.0",
155+
sha256 = "f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df",
164156
)
165157
python_nuget_package(
166158
name = "nuget_python_i686_3.8.0",

python/BUILD

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ package(
2626
)
2727

2828
LIMITED_API_FLAG_SELECT = {
29-
":limited_api_3.7": ["-DPy_LIMITED_API=0x03070000"],
29+
":limited_api_3.8": ["-DPy_LIMITED_API=0x03080000"],
3030
":limited_api_3.10": ["-DPy_LIMITED_API=0x030a0000"],
3131
"//conditions:default": [],
3232
}
@@ -41,45 +41,19 @@ string_flag(
4141
build_setting_default = "system",
4242
values = [
4343
"system",
44-
"37",
4544
"38",
4645
"39",
4746
"310",
47+
"311",
4848
],
4949
)
5050

5151
config_setting(
52-
name = "limited_api_3.7",
52+
name = "limited_api_3.8",
5353
flag_values = {
5454
":limited_api": "True",
55-
":python_version": "37",
56-
},
57-
)
58-
59-
config_setting(
60-
name = "full_api_3.7_win32",
61-
flag_values = {
62-
":limited_api": "False",
63-
":python_version": "37",
64-
},
65-
values = {"cpu": "win32"},
66-
)
67-
68-
config_setting(
69-
name = "full_api_3.7_win64",
70-
flag_values = {
71-
":limited_api": "False",
72-
":python_version": "37",
55+
":python_version": "38",
7356
},
74-
values = {"cpu": "win64"},
75-
)
76-
77-
selects.config_setting_group(
78-
name = "full_api_3.7",
79-
match_any = [
80-
":full_api_3.7_win32",
81-
":full_api_3.7_win64",
82-
],
8357
)
8458

8559
config_setting(

python/dist/BUILD.bazel

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ genrule(
296296
py_wheel(
297297
name = "binary_wheel",
298298
abi = select({
299-
"//python:full_api_3.7": "cp37m",
300299
"//python:full_api_3.8": "cp38",
301300
"//python:full_api_3.9": "cp39",
302301
"//conditions:default": "abi3",
@@ -306,10 +305,10 @@ py_wheel(
306305
classifiers = [
307306
"Programming Language :: Python",
308307
"Programming Language :: Python :: 3",
309-
"Programming Language :: Python :: 3.7",
310308
"Programming Language :: Python :: 3.8",
311309
"Programming Language :: Python :: 3.9",
312310
"Programming Language :: Python :: 3.10",
311+
"Programming Language :: Python :: 3.11",
313312
],
314313
distribution = "protobuf",
315314
extra_distinfo_files = {
@@ -328,9 +327,8 @@ py_wheel(
328327
":windows_x86_64": "win_amd64",
329328
"//conditions:default": "any",
330329
}),
331-
python_requires = ">=3.7",
330+
python_requires = ">=3.8",
332331
python_tag = selects.with_or({
333-
("//python:limited_api_3.7", "//python:full_api_3.7"): "cp37",
334332
"//python:full_api_3.8": "cp38",
335333
"//python:full_api_3.9": "cp39",
336334
"//python:limited_api_3.10": "cp310",
@@ -362,10 +360,10 @@ py_wheel(
362360
classifiers = [
363361
"Programming Language :: Python",
364362
"Programming Language :: Python :: 3",
365-
"Programming Language :: Python :: 3.7",
366363
"Programming Language :: Python :: 3.8",
367364
"Programming Language :: Python :: 3.9",
368365
"Programming Language :: Python :: 3.10",
366+
"Programming Language :: Python :: 3.11",
369367
],
370368
distribution = "protobuf",
371369
extra_distinfo_files = {
@@ -374,7 +372,7 @@ py_wheel(
374372
homepage = "https://developers.google.com/protocol-buffers/",
375373
license = "3-Clause BSD License",
376374
platform = "any",
377-
python_requires = ">=3.7",
375+
python_requires = ">=3.8",
378376
python_tag = "py3",
379377
strip_path_prefixes = [
380378
"python/",
@@ -430,7 +428,6 @@ py_dist(
430428
],
431429
# Windows needs version-specific wheels until 3.10.
432430
full_api_versions = [
433-
"37",
434431
"38",
435432
"39",
436433
],
@@ -444,9 +441,9 @@ py_dist(
444441
# TODO: fix win32 build
445442
"win32": "310",
446443
"win64": "310",
447-
"linux-x86_64": "37",
448-
"linux-aarch_64": "37",
449-
"osx-universal2": "37",
444+
"linux-x86_64": "38",
445+
"linux-aarch_64": "38",
446+
"osx-universal2": "38",
450447
},
451448
pure_python_wheel = ":pure_python_wheel",
452449
tags = ["manual"],

python/dist/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def GetVersion():
5656
classifiers=[
5757
'Programming Language :: Python',
5858
'Programming Language :: Python :: 3',
59-
'Programming Language :: Python :: 3.7',
6059
'Programming Language :: Python :: 3.8',
6160
'Programming Language :: Python :: 3.9',
6261
'Programming Language :: Python :: 3.10',
62+
'Programming Language :: Python :: 3.11',
6363
],
6464
namespace_packages=['google'],
6565
packages=find_packages(),
@@ -76,5 +76,5 @@ def GetVersion():
7676
extra_link_args=extra_link_args,
7777
)
7878
],
79-
python_requires='>=3.7',
79+
python_requires='>=3.8',
8080
)

python/protobuf_distutils/setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@
3030
# These Python versions should match the protobuf package:
3131
"Programming Language :: Python",
3232
"Programming Language :: Python :: 3",
33-
"Programming Language :: Python :: 3.3",
34-
"Programming Language :: Python :: 3.4",
35-
"Programming Language :: Python :: 3.5",
36-
"Programming Language :: Python :: 3.6",
37-
"Programming Language :: Python :: 3.7",
3833
"Programming Language :: Python :: 3.8",
34+
"Programming Language :: Python :: 3.9",
35+
"Programming Language :: Python :: 3.10",
36+
"Programming Language :: Python :: 3.11",
3937
"Topic :: Software Development :: Code Generators",
4038
],
4139
description=('This is a distutils extension to generate Python code for '

python/py_extension.bzl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ def py_extension(name, srcs, copts, deps = [], **kwargs):
2727
linkshared = True,
2828
linkstatic = True,
2929
deps = deps + select({
30-
"//python:limited_api_3.7": ["@python-3.7.0//:python_headers"],
31-
"//python:full_api_3.7_win32": ["@nuget_python_i686_3.7.0//:python_full_api"],
32-
"//python:full_api_3.7_win64": ["@nuget_python_x86-64_3.7.0//:python_full_api"],
30+
"//python:limited_api_3.8": ["@python-3.8.0//:python_headers"],
3331
"//python:full_api_3.8_win32": ["@nuget_python_i686_3.8.0//:python_full_api"],
3432
"//python:full_api_3.8_win64": ["@nuget_python_x86-64_3.8.0//:python_full_api"],
3533
"//python:full_api_3.9_win32": ["@nuget_python_i686_3.9.0//:python_full_api"],

0 commit comments

Comments
 (0)