Skip to content

Commit f8b192f

Browse files
authored
Merge pull request Azure#401 from kairu-ms/support-python-3.12
Support python 3.12
2 parents a8ee611 + 17bfd2d commit f8b192f

4 files changed

Lines changed: 24 additions & 28 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ After clone you can add `upstream` for every repos in your local clone by using
2121
### 2 Setup python
2222

2323
#### 2.1 Install python
24-
Please install python with version >= 3.8 in your local machine.
24+
Please install python with version >= 3.8 and <= 3.12 in your local machine.
2525

2626
- For windows: You can download and run full installer from [Python Download](https://www.python.org/downloads/).
2727
- For linux: You can install python from Package Manager or build a stable relase from source code
@@ -37,9 +37,9 @@ Check the version of python, make use it's not less than 3.8.
3737
```bash
3838
python --version
3939
```
40-
You can also specify the version number when you have multiple versions installed. For example if you want to run version 3.8
40+
You can also specify the version number when you have multiple versions installed. For example if you want to run version 3.12
4141
```bash
42-
python3.8 --version
42+
python3.12 --version
4343
```
4444
4545
#### 2.2 Setup a python virtual environment
@@ -53,7 +53,7 @@ You can run the following command to create a new virtual environment:
5353
```
5454
- For linux:
5555
```bash
56-
python3.8 -m venv {some path}/{venv name}
56+
python3.12 -m venv {some path}/{venv name}
5757
```
5858
5959
### 3 Active existing virtual environment

docs/pages/usage/setup_and_run.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ weight: 100
1717

1818
### Install python
1919

20-
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:
20+
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:
2121

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

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

5656
### Active existing virtual environment

requirements.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
schematics~=2.1.1
2-
pyyaml==5.3.1
3-
pytest~=6.2.0
2+
pyyaml~=6.0.2
43
fuzzywuzzy~=0.18.0
5-
inflect~=5.3.0
4+
inflect~=5.6.2
65
msrestazure~=0.6.4
7-
lxml~=4.9.2
8-
flask~=2.1.3
9-
cachelib~=0.5.0
10-
xmltodict~=0.12.0
6+
lxml~=4.9.4
7+
flask~=3.0.3
8+
cachelib~=0.13.0
9+
xmltodict~=0.13.0
1110
packaging>=21.3
12-
Jinja2~=3.0.3
13-
MarkupSafe~=2.0.1
14-
jsonschema~=4.17.1
11+
Jinja2~=3.1.4
12+
MarkupSafe~=2.1.5
13+
jsonschema~=4.23.0
1514
click~=8.1.2
15+
setuptools==70.0.0
16+
python-Levenshtein
17+
azdev

src/aaz_dev/app/run.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import webbrowser
33

44
import click
5-
from flask.cli import pass_script_info, show_server_banner, DispatchingApp, SeparatedPathType
6-
from flask.helpers import get_debug_flag, get_env
5+
from flask.cli import pass_script_info, show_server_banner, SeparatedPathType
6+
from flask.helpers import get_debug_flag
77
from utils.config import Config
88

99

@@ -106,12 +106,6 @@ def is_port_in_use(host, port):
106106
help="Enable or disable the debugger. By default the debugger "
107107
"is active if debug is enabled.",
108108
)
109-
@click.option(
110-
"--eager-loading/--lazy-loading",
111-
default=None,
112-
help="Enable or disable eager loading. By default eager "
113-
"loading is enabled if the reloader is disabled.",
114-
)
115109
@click.option(
116110
"--with-threads/--without-threads",
117111
default=True,
@@ -135,7 +129,7 @@ def is_port_in_use(host, port):
135129
)
136130
@pass_script_info
137131
def run_command(
138-
info, host, port, reload, debugger, eager_loading, with_threads, extra_files, quiet
132+
info, host, port, reload, debugger, with_threads, extra_files, quiet
139133
):
140134
"""Run a local development server.
141135
@@ -153,8 +147,8 @@ def run_command(
153147
if debugger is None:
154148
debugger = debug
155149

156-
show_server_banner(get_env(), debug, info.app_import_path, eager_loading)
157-
app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
150+
show_server_banner(debug, info.app_import_path)
151+
app = info.load_app()
158152

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

0 commit comments

Comments
 (0)