Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support python 3.12 #401

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ After clone you can add `upstream` for every repos in your local clone by using
### 2 Setup python

#### 2.1 Install python
Please install python with version >= 3.8 in your local machine.
Please install python with version >= 3.8 and <= 3.12 in your local machine.

- For windows: You can download and run full installer from [Python Download](https://www.python.org/downloads/).
- For linux: You can install python from Package Manager or build a stable relase from source code
Expand All @@ -37,9 +37,9 @@ Check the version of python, make use it's not less than 3.8.
```bash
python --version
```
You can also specify the version number when you have multiple versions installed. For example if you want to run version 3.8
You can also specify the version number when you have multiple versions installed. For example if you want to run version 3.12
```bash
python3.8 --version
python3.12 --version
```

#### 2.2 Setup a python virtual environment
Expand All @@ -53,7 +53,7 @@ You can run the following command to create a new virtual environment:
```
- For linux:
```bash
python3.8 -m venv {some path}/{venv name}
python3.12 -m venv {some path}/{venv name}
```

### 3 Active existing virtual environment
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/usage/setup_and_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ weight: 100

### Install python

This tool is compatible with python versions >=3.8 and <=3.10. You can use an existing python or install a new one by the following ways:
This tool is compatible with python versions >=3.8 and <=3.12. You can use an existing python or install a new one by the following ways:

- For Windows users: You can download and run full installer from [Python Download](https://www.python.org/downloads/).
- For Linux users: You can install python from Package Manager or build a stable release from source code
Expand All @@ -35,7 +35,7 @@ After installation, you can run the following commands to check the version:
```
You can also specify the version number when you have multiple versions installed like this:
```bash
python3.8 --version
python3.12 --version
```

### Setup a virtual environment
Expand All @@ -50,7 +50,7 @@ You can run the following command to create a new virtual environment:
```
- For Linux users:
```bash
python3.8 -m venv {some path}/{venv name}
python3.12 -m venv {some path}/{venv name}
```

### Active existing virtual environment
Expand Down
22 changes: 12 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
schematics~=2.1.1
pyyaml==5.3.1
pytest~=6.2.0
pyyaml~=6.0.2
fuzzywuzzy~=0.18.0
inflect~=5.3.0
inflect~=5.6.2
msrestazure~=0.6.4
lxml~=4.9.2
flask~=2.1.3
cachelib~=0.5.0
xmltodict~=0.12.0
lxml~=4.9.4
flask~=3.0.3
cachelib~=0.13.0
xmltodict~=0.13.0
packaging>=21.3
Jinja2~=3.0.3
MarkupSafe~=2.0.1
jsonschema~=4.17.1
Jinja2~=3.1.4
MarkupSafe~=2.1.5
jsonschema~=4.23.0
click~=8.1.2
setuptools==70.0.0
python-Levenshtein
azdev
16 changes: 5 additions & 11 deletions src/aaz_dev/app/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import webbrowser

import click
from flask.cli import pass_script_info, show_server_banner, DispatchingApp, SeparatedPathType
from flask.helpers import get_debug_flag, get_env
from flask.cli import pass_script_info, show_server_banner, SeparatedPathType
from flask.helpers import get_debug_flag
from utils.config import Config


Expand Down Expand Up @@ -106,12 +106,6 @@ def is_port_in_use(host, port):
help="Enable or disable the debugger. By default the debugger "
"is active if debug is enabled.",
)
@click.option(
"--eager-loading/--lazy-loading",
default=None,
help="Enable or disable eager loading. By default eager "
"loading is enabled if the reloader is disabled.",
)
@click.option(
"--with-threads/--without-threads",
default=True,
Expand All @@ -135,7 +129,7 @@ def is_port_in_use(host, port):
)
@pass_script_info
def run_command(
info, host, port, reload, debugger, eager_loading, with_threads, extra_files, quiet
info, host, port, reload, debugger, with_threads, extra_files, quiet
):
"""Run a local development server.

Expand All @@ -153,8 +147,8 @@ def run_command(
if debugger is None:
debugger = debug

show_server_banner(get_env(), debug, info.app_import_path, eager_loading)
app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
show_server_banner(debug, info.app_import_path)
app = info.load_app()

if is_port_in_use(host, port):
raise ValueError(f"The port '{port}' already been used in '{host}', please specify a new port in '--port' argument.")
Expand Down
Loading