mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-22 03:13:02 +00:00
Bump dependencies (#618)
* Bump dependencies * Make it work with Python 3.10 * replace psycopg2-binary with psycopg2 in Docker build
This commit is contained in:
parent
16ed6ef200
commit
d7c1afa2a5
12 changed files with 192 additions and 96 deletions
|
@ -14,7 +14,7 @@
|
||||||
"forwardPorts": [8000],
|
"forwardPorts": [8000],
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
"postCreateCommand": "pip3 install --user -r requirements.txt && npm install && mkdir -p data && python3 manage.py migrate",
|
"postCreateCommand": "pip3 install --user -r requirements.txt -r requirements.dev.txt && npm install && mkdir -p data && python3 manage.py migrate",
|
||||||
|
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
"customizations": {
|
"customizations": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
!/manage.py
|
!/manage.py
|
||||||
!/package.json
|
!/package.json
|
||||||
!/package-lock.json
|
!/package-lock.json
|
||||||
!/requirements.prod.txt
|
!/requirements.dev.txt
|
||||||
!/requirements.txt
|
!/requirements.txt
|
||||||
!/rollup.config.js
|
!/rollup.config.js
|
||||||
!/supervisord.conf
|
!/supervisord.conf
|
||||||
|
|
4
.github/workflows/main.yaml
vendored
4
.github/workflows/main.yaml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Setup Python environment
|
- name: Setup Python environment
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt -r requirements.dev.txt
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: python manage.py test bookmarks.tests
|
run: python manage.py test bookmarks.tests
|
||||||
e2e_tests:
|
e2e_tests:
|
||||||
|
@ -39,7 +39,7 @@ jobs:
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Setup Python environment
|
- name: Setup Python environment
|
||||||
run: |
|
run: |
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt -r requirements.dev.txt
|
||||||
playwright install chromium
|
playwright install chromium
|
||||||
- name: Run build
|
- name: Run build
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -256,7 +256,7 @@ source ~/environments/linkding/bin/activate[.csh|.fish]
|
||||||
```
|
```
|
||||||
Within the active environment install the application dependencies from the application folder:
|
Within the active environment install the application dependencies from the application folder:
|
||||||
```
|
```
|
||||||
pip3 install -Ur requirements.txt
|
pip3 install -r requirements.txt -r requirements.dev.txt
|
||||||
```
|
```
|
||||||
Install frontend dependencies:
|
Install frontend dependencies:
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import operator
|
import operator
|
||||||
|
import datetime
|
||||||
|
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
from django.db.models import QuerySet
|
from django.db.models import QuerySet
|
||||||
|
@ -6,7 +7,7 @@ from django.test import TestCase
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
from bookmarks import queries
|
from bookmarks import queries
|
||||||
from bookmarks.models import Bookmark, BookmarkSearch, UserProfile
|
from bookmarks.models import BookmarkSearch, UserProfile
|
||||||
from bookmarks.tests.helpers import BookmarkFactoryMixin, random_sentence
|
from bookmarks.tests.helpers import BookmarkFactoryMixin, random_sentence
|
||||||
from bookmarks.utils import unique
|
from bookmarks.utils import unique
|
||||||
|
|
||||||
|
@ -1195,25 +1196,25 @@ class QueriesTestCase(TestCase, BookmarkFactoryMixin):
|
||||||
|
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2020, 1, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2020, 1, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2021, 2, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2021, 2, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2022, 3, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2022, 3, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2023, 4, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2023, 4, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2022, 5, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2022, 5, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2021, 6, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2021, 6, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2020, 7, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2020, 7, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
sorted_bookmarks = sorted(bookmarks, key=lambda b: b.date_added)
|
sorted_bookmarks = sorted(bookmarks, key=lambda b: b.date_added)
|
||||||
|
@ -1226,25 +1227,25 @@ class QueriesTestCase(TestCase, BookmarkFactoryMixin):
|
||||||
|
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2020, 1, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2020, 1, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2021, 2, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2021, 2, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2022, 3, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2022, 3, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2023, 4, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2023, 4, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2022, 5, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2022, 5, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2021, 6, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2021, 6, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
self.setup_bookmark(
|
self.setup_bookmark(
|
||||||
added=timezone.datetime(2020, 7, 1, tzinfo=timezone.utc)
|
added=timezone.datetime(2020, 7, 1, tzinfo=datetime.timezone.utc)
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
sorted_bookmarks = sorted(bookmarks, key=lambda b: b.date_added, reverse=True)
|
sorted_bookmarks = sorted(bookmarks, key=lambda b: b.date_added, reverse=True)
|
||||||
|
|
|
@ -17,9 +17,10 @@ WORKDIR /etc/linkding
|
||||||
FROM python-base AS python-build
|
FROM python-base AS python-build
|
||||||
# install build dependencies
|
# install build dependencies
|
||||||
COPY requirements.txt requirements.txt
|
COPY requirements.txt requirements.txt
|
||||||
|
COPY requirements.dev.txt requirements.dev.txt
|
||||||
# remove playwright from requirements as there is not always a distro and it's not needed for the build
|
# remove playwright from requirements as there is not always a distro and it's not needed for the build
|
||||||
RUN sed -i '/playwright/d' requirements.txt
|
RUN sed -i '/playwright/d' requirements.dev.txt
|
||||||
RUN pip install -U pip && pip install -Ur requirements.txt
|
RUN pip install -U pip && pip install -r requirements.txt -r requirements.dev.txt
|
||||||
# copy files needed for Django build
|
# copy files needed for Django build
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=node-build /etc/linkding .
|
COPY --from=node-build /etc/linkding .
|
||||||
|
@ -30,11 +31,13 @@ RUN python manage.py compilescss && \
|
||||||
|
|
||||||
|
|
||||||
FROM python-base AS prod-deps
|
FROM python-base AS prod-deps
|
||||||
COPY requirements.prod.txt ./requirements.txt
|
COPY requirements.txt ./requirements.txt
|
||||||
|
# replace psycopg2-binary with psycopg2
|
||||||
|
RUN sed -i 's/psycopg2-binary/psycopg2/g' requirements.txt
|
||||||
RUN mkdir /opt/venv && \
|
RUN mkdir /opt/venv && \
|
||||||
python -m venv --upgrade-deps --copies /opt/venv && \
|
python -m venv --upgrade-deps --copies /opt/venv && \
|
||||||
/opt/venv/bin/pip install --upgrade pip wheel && \
|
/opt/venv/bin/pip install --upgrade pip wheel && \
|
||||||
/opt/venv/bin/pip install -Ur requirements.txt
|
/opt/venv/bin/pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
FROM python-base AS compile-icu
|
FROM python-base AS compile-icu
|
||||||
|
|
|
@ -17,9 +17,10 @@ WORKDIR /etc/linkding
|
||||||
FROM python-base AS python-build
|
FROM python-base AS python-build
|
||||||
# install build dependencies
|
# install build dependencies
|
||||||
COPY requirements.txt requirements.txt
|
COPY requirements.txt requirements.txt
|
||||||
|
COPY requirements.dev.txt requirements.dev.txt
|
||||||
# remove playwright from requirements as there is not always a distro and it's not needed for the build
|
# remove playwright from requirements as there is not always a distro and it's not needed for the build
|
||||||
RUN sed -i '/playwright/d' requirements.txt
|
RUN sed -i '/playwright/d' requirements.dev.txt
|
||||||
RUN pip install -U pip && pip install -Ur requirements.txt
|
RUN pip install -U pip && pip install -r requirements.txt -r requirements.dev.txt
|
||||||
# copy files needed for Django build
|
# copy files needed for Django build
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=node-build /etc/linkding .
|
COPY --from=node-build /etc/linkding .
|
||||||
|
@ -30,11 +31,13 @@ RUN python manage.py compilescss && \
|
||||||
|
|
||||||
|
|
||||||
FROM python-base AS prod-deps
|
FROM python-base AS prod-deps
|
||||||
COPY requirements.prod.txt ./requirements.txt
|
COPY requirements.txt ./requirements.txt
|
||||||
|
# replace psycopg2-binary with psycopg2
|
||||||
|
RUN sed -i 's/psycopg2-binary/psycopg2/g' requirements.txt
|
||||||
RUN mkdir /opt/venv && \
|
RUN mkdir /opt/venv && \
|
||||||
python -m venv --upgrade-deps --copies /opt/venv && \
|
python -m venv --upgrade-deps --copies /opt/venv && \
|
||||||
/opt/venv/bin/pip install --upgrade pip wheel && \
|
/opt/venv/bin/pip install --upgrade pip wheel && \
|
||||||
/opt/venv/bin/pip install -Ur requirements.txt
|
/opt/venv/bin/pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
FROM python-base AS compile-icu
|
FROM python-base AS compile-icu
|
||||||
|
|
8
requirements.dev.in
Normal file
8
requirements.dev.in
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
black
|
||||||
|
coverage
|
||||||
|
django-compressor
|
||||||
|
django-debug-toolbar
|
||||||
|
libsass
|
||||||
|
playwright
|
||||||
|
pytest
|
||||||
|
pytest-django
|
62
requirements.dev.txt
Normal file
62
requirements.dev.txt
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
#
|
||||||
|
# This file is autogenerated by pip-compile with Python 3.11
|
||||||
|
# by the following command:
|
||||||
|
#
|
||||||
|
# pip-compile requirements.dev.in
|
||||||
|
#
|
||||||
|
asgiref==3.7.2
|
||||||
|
# via django
|
||||||
|
black==24.1.1
|
||||||
|
# via -r requirements.dev.in
|
||||||
|
click==8.1.7
|
||||||
|
# via black
|
||||||
|
coverage==7.4.1
|
||||||
|
# via -r requirements.dev.in
|
||||||
|
django==5.0.1
|
||||||
|
# via
|
||||||
|
# django-appconf
|
||||||
|
# django-debug-toolbar
|
||||||
|
django-appconf==1.0.6
|
||||||
|
# via django-compressor
|
||||||
|
django-compressor==4.4
|
||||||
|
# via -r requirements.dev.in
|
||||||
|
django-debug-toolbar==4.2.0
|
||||||
|
# via -r requirements.dev.in
|
||||||
|
greenlet==3.0.3
|
||||||
|
# via playwright
|
||||||
|
iniconfig==2.0.0
|
||||||
|
# via pytest
|
||||||
|
libsass==0.23.0
|
||||||
|
# via -r requirements.dev.in
|
||||||
|
mypy-extensions==1.0.0
|
||||||
|
# via black
|
||||||
|
packaging==23.2
|
||||||
|
# via
|
||||||
|
# black
|
||||||
|
# pytest
|
||||||
|
pathspec==0.12.1
|
||||||
|
# via black
|
||||||
|
platformdirs==4.1.0
|
||||||
|
# via black
|
||||||
|
playwright==1.41.1
|
||||||
|
# via -r requirements.dev.in
|
||||||
|
pluggy==1.4.0
|
||||||
|
# via pytest
|
||||||
|
pyee==11.0.1
|
||||||
|
# via playwright
|
||||||
|
pytest==8.0.0
|
||||||
|
# via
|
||||||
|
# -r requirements.dev.in
|
||||||
|
# pytest-django
|
||||||
|
pytest-django==4.7.0
|
||||||
|
# via -r requirements.dev.in
|
||||||
|
rcssmin==1.1.1
|
||||||
|
# via django-compressor
|
||||||
|
rjsmin==1.2.1
|
||||||
|
# via django-compressor
|
||||||
|
sqlparse==0.4.4
|
||||||
|
# via
|
||||||
|
# django
|
||||||
|
# django-debug-toolbar
|
||||||
|
typing-extensions==4.9.0
|
||||||
|
# via pyee
|
17
requirements.in
Normal file
17
requirements.in
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
beautifulsoup4
|
||||||
|
bleach
|
||||||
|
bleach-allowlist
|
||||||
|
Django
|
||||||
|
django-generate-secret-key
|
||||||
|
django-registration
|
||||||
|
django-sass-processor
|
||||||
|
django-widget-tweaks
|
||||||
|
django4-background-tasks
|
||||||
|
djangorestframework
|
||||||
|
Markdown
|
||||||
|
psycopg2-binary
|
||||||
|
python-dateutil
|
||||||
|
requests
|
||||||
|
supervisor
|
||||||
|
uWSGI
|
||||||
|
waybackpy
|
|
@ -1,29 +0,0 @@
|
||||||
asgiref==3.5.2
|
|
||||||
beautifulsoup4==4.11.1
|
|
||||||
bleach==6.0.0
|
|
||||||
bleach-allowlist==1.0.3
|
|
||||||
certifi==2023.7.22
|
|
||||||
charset-normalizer==2.1.1
|
|
||||||
click==8.1.3
|
|
||||||
confusable-homoglyphs==3.2.0
|
|
||||||
Django==4.1.13
|
|
||||||
django-generate-secret-key==1.0.2
|
|
||||||
django-registration==3.3
|
|
||||||
django-sass-processor==1.2.1
|
|
||||||
django-widget-tweaks==1.4.12
|
|
||||||
django4-background-tasks==1.2.7
|
|
||||||
djangorestframework==3.13.1
|
|
||||||
idna==3.3
|
|
||||||
Markdown==3.4.3
|
|
||||||
psycopg2==2.9.5
|
|
||||||
python-dateutil==2.8.2
|
|
||||||
pytz==2022.2.1
|
|
||||||
requests==2.31.0
|
|
||||||
soupsieve==2.3.2.post1
|
|
||||||
sqlparse==0.4.4
|
|
||||||
supervisor==4.2.4
|
|
||||||
typing-extensions==3.10.0.0
|
|
||||||
urllib3==1.26.18
|
|
||||||
uWSGI==2.0.22
|
|
||||||
waybackpy==3.0.6
|
|
||||||
webencodings==0.5.1
|
|
109
requirements.txt
109
requirements.txt
|
@ -1,47 +1,78 @@
|
||||||
asgiref==3.5.2
|
#
|
||||||
beautifulsoup4==4.11.1
|
# This file is autogenerated by pip-compile with Python 3.11
|
||||||
black==24.1.0
|
# by the following command:
|
||||||
bleach==6.0.0
|
#
|
||||||
|
# pip-compile requirements.in
|
||||||
|
#
|
||||||
|
asgiref==3.7.2
|
||||||
|
# via django
|
||||||
|
beautifulsoup4==4.12.3
|
||||||
|
# via -r requirements.in
|
||||||
|
bleach==6.1.0
|
||||||
|
# via -r requirements.in
|
||||||
bleach-allowlist==1.0.3
|
bleach-allowlist==1.0.3
|
||||||
certifi==2023.7.22
|
# via -r requirements.in
|
||||||
charset-normalizer==2.1.1
|
certifi==2023.11.17
|
||||||
click==8.1.3
|
# via requests
|
||||||
|
charset-normalizer==3.3.2
|
||||||
|
# via requests
|
||||||
|
click==8.1.7
|
||||||
|
# via waybackpy
|
||||||
confusable-homoglyphs==3.2.0
|
confusable-homoglyphs==3.2.0
|
||||||
coverage==5.5
|
# via django-registration
|
||||||
Django==4.1.13
|
django==5.0.1
|
||||||
django-appconf==1.0.5
|
# via
|
||||||
django-compressor==4.1
|
# -r requirements.in
|
||||||
django-debug-toolbar==3.6.0
|
# django-generate-secret-key
|
||||||
django-registration==3.3
|
# django-registration
|
||||||
django-sass-processor==1.2.1
|
# djangorestframework
|
||||||
django-widget-tweaks==1.4.12
|
django-generate-secret-key==1.0.2
|
||||||
django4-background-tasks==1.2.7
|
# via -r requirements.in
|
||||||
django_generate_secret_key==1.0.2
|
django-registration==3.4
|
||||||
djangorestframework==3.13.1
|
# via -r requirements.in
|
||||||
greenlet==3.0.1
|
django-sass-processor==1.4
|
||||||
idna==3.3
|
# via -r requirements.in
|
||||||
iniconfig==2.0.0
|
django-widget-tweaks==1.5.0
|
||||||
libsass==0.21.0
|
# via -r requirements.in
|
||||||
Markdown==3.4.3
|
django4-background-tasks==1.2.9
|
||||||
mypy-extensions==1.0.0
|
# via -r requirements.in
|
||||||
packaging==23.2
|
djangorestframework==3.14.0
|
||||||
pathspec==0.12.1
|
# via -r requirements.in
|
||||||
platformdirs==4.1.0
|
idna==3.6
|
||||||
playwright==1.40.0
|
# via requests
|
||||||
pluggy==1.4.0
|
markdown==3.5.2
|
||||||
psycopg2-binary==2.9.5
|
# via -r requirements.in
|
||||||
pyee==11.0.1
|
psycopg2-binary==2.9.9
|
||||||
pytest==7.4.4
|
# via -r requirements.in
|
||||||
pytest-django==4.7.0
|
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
pytz==2022.2.1
|
# via -r requirements.in
|
||||||
rcssmin==1.1.0
|
pytz==2023.3.post1
|
||||||
|
# via djangorestframework
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
rjsmin==1.2.0
|
# via
|
||||||
|
# -r requirements.in
|
||||||
|
# waybackpy
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
soupsieve==2.3.2.post1
|
# via
|
||||||
|
# bleach
|
||||||
|
# django4-background-tasks
|
||||||
|
# python-dateutil
|
||||||
|
soupsieve==2.5
|
||||||
|
# via beautifulsoup4
|
||||||
sqlparse==0.4.4
|
sqlparse==0.4.4
|
||||||
typing-extensions==3.10.0.0
|
# via django
|
||||||
urllib3==1.26.18
|
supervisor==4.2.5
|
||||||
|
# via -r requirements.in
|
||||||
|
urllib3==2.1.0
|
||||||
|
# via
|
||||||
|
# requests
|
||||||
|
# waybackpy
|
||||||
|
uwsgi==2.0.23
|
||||||
|
# via -r requirements.in
|
||||||
waybackpy==3.0.6
|
waybackpy==3.0.6
|
||||||
|
# via -r requirements.in
|
||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
|
# via bleach
|
||||||
|
|
||||||
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
|
# setuptools
|
||||||
|
|
Loading…
Reference in a new issue