Update dependencies and config example

This commit is contained in:
sb745 2025-12-22 02:13:36 +02:00
parent d94a7e1864
commit 0c7733ca83
No known key found for this signature in database
GPG key ID: FCECC197D40D3DE0
3 changed files with 46 additions and 46 deletions

View file

@ -1,12 +1,12 @@
# NyaaV3 [![python](https://img.shields.io/badge/Python-3.13-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org) ![Maintenance](https://img.shields.io/maintenance/yes/2025) # NyaaV3 [![python](https://img.shields.io/badge/Python-3.14-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org) ![Maintenance](https://img.shields.io/maintenance/yes/2025)
## Setting up for development ## Setting up for development
This project uses Python 3.13. The codebase has been updated from the original Python 3.7 version to use modern Python features and updated dependencies. This project uses Python 3.14. The codebase has been updated from the original Python 3.7 version to use modern Python features and updated dependencies.
This guide assumes you are using Linux and are somewhat capable with the commandline. This guide assumes you are using Linux and are somewhat capable with the commandline.
Running Nyaa on Windows may be possible, but it's currently unsupported. Running Nyaa on Windows may be possible, but it's currently unsupported.
### Major changes from NyaaV2 ### Major changes from NyaaV2
- Updated from Python 3.7 to Python 3.13 - Updated from Python 3.7 to Python 3.14
- Updated all dependencies to their latest versions - Updated all dependencies to their latest versions
- Modernized code patterns for Flask 3.0 and SQLAlchemy 2.0 - Modernized code patterns for Flask 3.0 and SQLAlchemy 2.0
- Replaced deprecated Flask-Script, orderedset and `flask.Markup` with Flask CLI, orderly-set and markupsafe - Replaced deprecated Flask-Script, orderedset and `flask.Markup` with Flask CLI, orderly-set and markupsafe
@ -23,13 +23,13 @@ The `tests` folder contains tests for the the `nyaa` module and the webserver. T
- Run `python dev.py test` while in the repository directory. - Run `python dev.py test` while in the repository directory.
### Setting up Pyenv ### Setting up Pyenv
pyenv eases the use of different Python versions, and as not all Linux distros offer 3.13 packages, it's right up our alley. pyenv eases the use of different Python versions, and as not all Linux distros offer 3.14 packages, it's right up our alley.
- Install [dependencies](https://github.com/pyenv/pyenv/wiki/Common-build-problems) - Install [dependencies](https://github.com/pyenv/pyenv/wiki/Common-build-problems)
- Install [pyenv](https://github.com/pyenv/pyenv/blob/master/README.md#installation) - Install [pyenv](https://github.com/pyenv/pyenv/blob/master/README.md#installation)
- Install [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv/blob/master/README.md) - Install [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv/blob/master/README.md)
- Install Python 3.13 with `pyenv` and create a virtualenv for the project: - Install Python 3.14 with `pyenv` and create a virtualenv for the project:
- `pyenv install 3.13.2` - `pyenv install 3.14.2`
- `pyenv virtualenv 3.13.2 nyaa` - `pyenv virtualenv 3.14.2 nyaa`
- `pyenv activate nyaa` - `pyenv activate nyaa`
- Install dependencies with `pip install -r requirements.txt` - Install dependencies with `pip install -r requirements.txt`
- Copy `config.example.py` into `config.py` - Copy `config.example.py` into `config.py`

View file

@ -88,7 +88,7 @@ RECAPTCHA_PRIVATE_KEY = '***'
BASE_DIR = os.path.abspath(os.path.dirname(__file__)) BASE_DIR = os.path.abspath(os.path.dirname(__file__))
if USE_MYSQL: if USE_MYSQL:
SQLALCHEMY_DATABASE_URI = ('mysql://test:test123@localhost/nyaav3?charset=utf8mb4') SQLALCHEMY_DATABASE_URI = ('mysql://nyaauser:nyaapass@localhost/nyaav3?charset=utf8mb4')
else: else:
SQLALCHEMY_DATABASE_URI = ( SQLALCHEMY_DATABASE_URI = (
'sqlite:///' + os.path.join(BASE_DIR, 'test.db') + '?check_same_thread=False') 'sqlite:///' + os.path.join(BASE_DIR, 'test.db') + '?check_same_thread=False')
@ -98,7 +98,7 @@ else:
########### ###########
# 'smtp' or 'mailgun' # 'smtp' or 'mailgun'
MAIL_BACKEND = 'mailgun' MAIL_BACKEND = 'smtp'
MAIL_FROM_ADDRESS = 'Sender Name <sender@domain.com>' MAIL_FROM_ADDRESS = 'Sender Name <sender@domain.com>'
# Mailgun settings # Mailgun settings

View file

@ -1,16 +1,16 @@
alembic==1.14.1 alembic==1.17.2
appdirs==1.4.4 appdirs==1.4.4
argon2-cffi==23.1.0 argon2-cffi==25.1.0
autopep8==2.3.2 autopep8==2.3.2
blinker==1.9.0 blinker==1.9.0
cffi==1.17.1 cffi==2.0.0
click==8.1.8 click==8.3.1
dnspython==2.7.0 dnspython==2.8.0
elasticsearch==8.17.1 elasticsearch==8.19.2
elasticsearch-dsl==8.17.1 elasticsearch-dsl==8.18.0
flake8==7.1.2 flake8==7.3.0
flake8-isort==6.1.2 flake8-isort==7.0.0
Flask==3.1.0 Flask==3.1.2
Flask-Assets==2.1.0 Flask-Assets==2.1.0
Flask-DebugToolbar==0.16.0 Flask-DebugToolbar==0.16.0
Flask-Migrate==4.1.0 Flask-Migrate==4.1.0
@ -18,42 +18,42 @@ flask-paginate==2024.4.12
# Flask-Script removed as it's deprecated and replaced with Flask CLI # Flask-Script removed as it's deprecated and replaced with Flask CLI
Flask-SQLAlchemy==3.1.1 Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.2 Flask-WTF==1.2.2
gevent==24.11.1 gevent==25.9.1
greenlet==3.1.1 greenlet==3.3.0
isort==6.0.1 isort==7.0.0
itsdangerous==2.2.0 itsdangerous==2.2.0
Jinja2==3.1.5 Jinja2==3.1.6
Mako==1.3.9 Mako==1.3.10
MarkupSafe==3.0.2 MarkupSafe==3.0.3
mysql-replication==1.0.9 mysql-replication==1.0.12
mysqlclient==2.2.7 mysqlclient==2.2.7
# orderedset removed as it's deprecated and replaced with Flask CLI # orderedset removed as it's deprecated and replaced with Flask CLI
orderly-set==5.3.0 orderly-set==5.5.0
packaging==24.2 packaging==25.0
passlib==1.7.4 passlib==1.7.4
progressbar33==2.4 progressbar33==2.4
py==1.11.0 py==1.11.0
pycodestyle==2.12.1 pycodestyle==2.14.0
pycparser==2.22 pycparser==2.23
PyMySQL==1.1.1 PyMySQL==1.1.2
pyparsing==3.2.1 pyparsing==3.2.5
pytest==8.3.4 pytest==9.0.2
python-dateutil==2.9.0 python-dateutil==2.9.0.post0
python-editor==1.0.4 python-editor==1.0.4
python-utils==3.9.1 python-utils==3.9.1
requests==2.32.3 requests==2.32.5
SQLAlchemy==2.0.38 SQLAlchemy==2.0.45
SQLAlchemy-FullText-Search==0.3.0 SQLAlchemy-FullText-Search==0.3.0
SQLAlchemy-Utils==0.41.2 SQLAlchemy-Utils==0.42.1
statsd==4.0.1 statsd==4.0.1
urllib3==2.3.0 urllib3==2.6.2
uWSGI==2.0.28 uWSGI==2.0.31
redis==5.2.1 redis==7.1.0
webassets==2.0 webassets==3.0.0
Werkzeug==3.1.3 Werkzeug==3.1.4
WTForms==3.2.1 WTForms==3.2.1
Flask-Caching==2.3.1 Flask-Caching==2.3.1
Flask-Limiter==3.10.1 Flask-Limiter==4.1.1
mypy==1.15.0 mypy==1.19.1
typing-extensions==4.12.2 typing-extensions==4.15.0
email-validator==2.2.0 email-validator==2.3.0