Drop support for python3.6 (#444)
This commit is contained in:
parent
0adcc9020c
commit
1b1bd47cb1
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -16,10 +16,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [Ubuntu, MacOS, Windows]
|
os: [Ubuntu, MacOS, Windows]
|
||||||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
|
python-version: ['3.7', '3.8', '3.9', '3.10']
|
||||||
exclude:
|
|
||||||
- os: Windows
|
|
||||||
python-version: 3.6
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ This project aims to provide an improved experience when using Protobuf / gRPC i
|
|||||||
|
|
||||||
- Protobuf 3 & gRPC code generation
|
- Protobuf 3 & gRPC code generation
|
||||||
- Both binary & JSON serialization is built-in
|
- Both binary & JSON serialization is built-in
|
||||||
- Python 3.6+ making use of:
|
- Python 3.7+ making use of:
|
||||||
- Enums
|
- Enums
|
||||||
- Dataclasses
|
- Dataclasses
|
||||||
- `async`/`await`
|
- `async`/`await`
|
||||||
@ -371,7 +371,7 @@ datetime.datetime(2019, 1, 1, 11, 59, 58, 800000, tzinfo=datetime.timezone.utc)
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
- Python (3.6 or higher)
|
- Python (3.7 or higher)
|
||||||
|
|
||||||
- [poetry](https://python-poetry.org/docs/#installation)
|
- [poetry](https://python-poetry.org/docs/#installation)
|
||||||
*Needed to install dependencies in a virtual environment*
|
*Needed to install dependencies in a virtual environment*
|
||||||
@ -447,7 +447,7 @@ poe full-test
|
|||||||
Betterproto includes compiled versions for Google's well-known types at [src/betterproto/lib/google](src/betterproto/lib/google).
|
Betterproto includes compiled versions for Google's well-known types at [src/betterproto/lib/google](src/betterproto/lib/google).
|
||||||
Be sure to regenerate these files when modifying the plugin output format, and validate by running the tests.
|
Be sure to regenerate these files when modifying the plugin output format, and validate by running the tests.
|
||||||
|
|
||||||
Normally, the plugin does not compile any references to `google.protobuf`, since they are pre-compiled. To force compilation of `google.protobuf`, use the option `--custom_opt=INCLUDE_GOOGLE`.
|
Normally, the plugin does not compile any references to `google.protobuf`, since they are pre-compiled. To force compilation of `google.protobuf`, use the option `--custom_opt=INCLUDE_GOOGLE`.
|
||||||
|
|
||||||
Assuming your `google.protobuf` source files (included with all releases of `protoc`) are located in `/usr/local/include`, you can regenerate them as follows:
|
Assuming your `google.protobuf` source files (included with all releases of `protoc`) are located in `/usr/local/include`, you can regenerate them as follows:
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
|
|
1254
poetry.lock
generated
1254
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -12,9 +12,8 @@ packages = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = ">=3.6.2,<4.0"
|
python = "^3.7"
|
||||||
black = { version = ">=19.3b0", optional = true }
|
black = { version = ">=19.3b0", optional = true }
|
||||||
dataclasses = { version = "^0.7", python = ">=3.6, <3.7" }
|
|
||||||
grpclib = "^0.4.1"
|
grpclib = "^0.4.1"
|
||||||
jinja2 = { version = ">=3.0.3", optional = true }
|
jinja2 = { version = ">=3.0.3", optional = true }
|
||||||
python-dateutil = "^2.8"
|
python-dateutil = "^2.8"
|
||||||
@ -112,7 +111,7 @@ force_grid_wrap = 2
|
|||||||
src_paths = ["src", "tests"]
|
src_paths = ["src", "tests"]
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
target-version = ['py36']
|
target-version = ['py37']
|
||||||
|
|
||||||
[tool.doc8]
|
[tool.doc8]
|
||||||
paths = ["docs"]
|
paths = ["docs"]
|
||||||
@ -130,7 +129,7 @@ omit = ["betterproto/tests/*"]
|
|||||||
legacy_tox_ini = """
|
legacy_tox_ini = """
|
||||||
[tox]
|
[tox]
|
||||||
isolated_build = true
|
isolated_build = true
|
||||||
envlist = py36, py37, py38, py310
|
envlist = py37, py38, py310
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = poetry
|
whitelist_externals = poetry
|
||||||
|
@ -887,10 +887,10 @@ class Message(ABC):
|
|||||||
t = cls._type_hint(field.name)
|
t = cls._type_hint(field.name)
|
||||||
|
|
||||||
if hasattr(t, "__origin__"):
|
if hasattr(t, "__origin__"):
|
||||||
if t.__origin__ in (dict, Dict):
|
if t.__origin__ is dict:
|
||||||
# This is some kind of map (dict in Python).
|
# This is some kind of map (dict in Python).
|
||||||
return dict
|
return dict
|
||||||
elif t.__origin__ in (list, List):
|
elif t.__origin__ is list:
|
||||||
# This is some kind of list (repeated) field.
|
# This is some kind of list (repeated) field.
|
||||||
return list
|
return list
|
||||||
elif t.__origin__ is Union and t.__args__[1] is type(None):
|
elif t.__origin__ is Union and t.__args__[1] is type(None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user