mirror of
https://github.com/PaiGramTeam/sqlmodel.git
synced 2024-11-21 22:58:22 +00:00
reflecting python 3.6 deprecation in docs and tests
This commit is contained in:
parent
b9cf129188
commit
c8b68d9925
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@ -20,11 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version:
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||||
- "3.7"
|
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
|
||||||
- "3.10"
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -56,6 +52,7 @@ jobs:
|
|||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: python -m poetry install
|
run: python -m poetry install
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
if: ${{ matrix.python-version != '3.7' }}
|
||||||
run: python -m poetry run bash scripts/lint.sh
|
run: python -m poetry run bash scripts/lint.sh
|
||||||
- run: mkdir coverage
|
- run: mkdir coverage
|
||||||
- name: Test
|
- name: Test
|
||||||
|
@ -50,7 +50,7 @@ It combines SQLAlchemy and Pydantic and tries to simplify the code you write as
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
A recent and currently supported <a href="https://www.python.org/downloads/" class="external-link" target="_blank">version of Python Python</a>.
|
A recent and currently supported version of Python (right now, <a href="https://www.python.org/downloads/" class="external-link" target="_blank">Python supports versions 3.7 and above</a>).
|
||||||
|
|
||||||
As **SQLModel** is based on **Pydantic** and **SQLAlchemy**, it requires them. They will be automatically installed when you install SQLModel.
|
As **SQLModel** is based on **Pydantic** and **SQLAlchemy**, it requires them. They will be automatically installed when you install SQLModel.
|
||||||
|
|
||||||
|
@ -6,6 +6,10 @@ First, you might want to see the basic ways to [help SQLModel and get help](help
|
|||||||
|
|
||||||
If you already cloned the repository and you know that you need to deep dive in the code, here are some guidelines to set up your environment.
|
If you already cloned the repository and you know that you need to deep dive in the code, here are some guidelines to set up your environment.
|
||||||
|
|
||||||
|
### Python
|
||||||
|
|
||||||
|
SQLModel supports Python 3.7 and above, but for development you should have at least **Python 3.7**.
|
||||||
|
|
||||||
### Poetry
|
### Poetry
|
||||||
|
|
||||||
**SQLModel** uses <a href="https://python-poetry.org/" class="external-link" target="_blank">Poetry</a> to build, package, and publish the project.
|
**SQLModel** uses <a href="https://python-poetry.org/" class="external-link" target="_blank">Poetry</a> to build, package, and publish the project.
|
||||||
|
@ -12,7 +12,7 @@ Nevertheless, SQLModel is completely **independent** of FastAPI and can be used
|
|||||||
|
|
||||||
## Just Modern Python
|
## Just Modern Python
|
||||||
|
|
||||||
It's all based on standard <abbr title="Currently supported versions of Python">modern **Python**</abbr> type annotations. No new syntax to learn. Just standard modern Python.
|
It's all based on standard <abbr title="Python currently supported versions, 3.7 and above.">modern **Python**</abbr> type annotations. No new syntax to learn. Just standard modern Python.
|
||||||
|
|
||||||
If you need a 2 minute refresher of how to use Python types (even if you don't use SQLModel or FastAPI), check the FastAPI tutorial section: <a href="https://fastapi.tiangolo.com/python-types/" class="external-link" target="_blank">Python types intro</a>.
|
If you need a 2 minute refresher of how to use Python types (even if you don't use SQLModel or FastAPI), check the FastAPI tutorial section: <a href="https://fastapi.tiangolo.com/python-types/" class="external-link" target="_blank">Python types intro</a>.
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ It combines SQLAlchemy and Pydantic and tries to simplify the code you write as
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
A recent and currently supported <a href="https://www.python.org/downloads/" class="external-link" target="_blank">version of Python Python</a>.
|
A recent and currently supported version of Python (right now, <a href="https://www.python.org/downloads/" class="external-link" target="_blank">Python supports versions 3.7 and above</a>).
|
||||||
|
|
||||||
As **SQLModel** is based on **Pydantic** and **SQLAlchemy**, it requires them. They will be automatically installed when you install SQLModel.
|
As **SQLModel** is based on **Pydantic** and **SQLAlchemy**, it requires them. They will be automatically installed when you install SQLModel.
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ $ cd sqlmodel-tutorial
|
|||||||
|
|
||||||
Make sure you have an officially supported version of Python.
|
Make sure you have an officially supported version of Python.
|
||||||
|
|
||||||
|
Currently it is **Python 3.7** and above (Python 3.6 was already deprecated).
|
||||||
|
|
||||||
You can check which version you have with:
|
You can check which version you have with:
|
||||||
|
|
||||||
<div class="termy">
|
<div class="termy">
|
||||||
@ -82,6 +84,7 @@ You might want to try with the specific versions, for example with:
|
|||||||
* `python3.10`
|
* `python3.10`
|
||||||
* `python3.9`
|
* `python3.9`
|
||||||
* `python3.8`
|
* `python3.8`
|
||||||
|
* `python3.7`
|
||||||
|
|
||||||
The code would look like this:
|
The code would look like this:
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ classifiers = [
|
|||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
"Topic :: Database",
|
"Topic :: Database",
|
||||||
"Topic :: Database :: Database Engines/Servers",
|
"Topic :: Database :: Database Engines/Servers",
|
||||||
"Topic :: Internet",
|
"Topic :: Internet",
|
||||||
@ -49,6 +50,8 @@ fastapi = "^0.68.1"
|
|||||||
requests = "^2.26.0"
|
requests = "^2.26.0"
|
||||||
autoflake = "^1.4"
|
autoflake = "^1.4"
|
||||||
isort = "^5.9.3"
|
isort = "^5.9.3"
|
||||||
|
async_generator = {version = "*", python = "~3.7"}
|
||||||
|
async-exit-stack = {version = "*", python = "~3.7"}
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
|
Loading…
Reference in New Issue
Block a user