Skip to content

Commit

Permalink
Upgrade requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Jan 27, 2024
1 parent 27f29cb commit e0af757
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions backend/donations/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from io import BytesIO
from datetime import datetime

from pypdf import PdfFileWriter, PdfFileReader
from pypdf import PdfWriter, PdfReader
from reportlab.pdfgen import canvas
from reportlab.lib.utils import ImageReader
from reportlab.lib.pagesizes import A4
Expand Down Expand Up @@ -244,7 +244,7 @@ def create_pdf(person={}, ong={}):

def add_signature(pdf, image):
pdf_string = StringIO.StringIO(pdf)
existing_pdf = PdfFileReader(pdf_string)
existing_pdf = PdfReader(pdf_string)

packet = tempfile.TemporaryFile(mode="w+b")

Expand Down Expand Up @@ -277,12 +277,12 @@ def add_signature(pdf, image):
c.save()
packet.seek(0)

new_pdf = PdfFileReader(packet)
new_pdf = PdfReader(packet)

page = existing_pdf.getPage(0)
page.mergePage(new_pdf.getPage(0))

output = PdfFileWriter()
output = PdfWriter()
output.addPage(page)

outputStream = tempfile.TemporaryFile(mode="w+b")
Expand Down
6 changes: 3 additions & 3 deletions backend/requirements-dev.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pip-tools~= 7.3.0

# formatting & linting
black~=23.12.1
ruff~=0.1.9
black~=24.1.0
ruff~=0.1.14

faker~=22.2.0
faker~=22.5.1

-r requirements.txt
18 changes: 9 additions & 9 deletions backend/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ asgiref==3.7.2
# via
# -r requirements.txt
# django
black==23.12.1
black==24.1.0
# via -r requirements-dev.in
blessed==1.20.0
# via -r requirements.txt
Expand Down Expand Up @@ -39,7 +39,7 @@ click==8.1.7
# pip-tools
croniter==2.0.1
# via -r requirements.txt
cryptography==41.0.7
cryptography==42.0.1
# via
# -r requirements.txt
# django-cryptography
Expand Down Expand Up @@ -74,7 +74,7 @@ django-q2==1.6.1
# via -r requirements.txt
django-storages==1.14.2
# via -r requirements.txt
faker==22.2.0
faker==22.5.1
# via -r requirements-dev.in
gevent==23.9.1
# via -r requirements.txt
Expand All @@ -84,7 +84,7 @@ greenlet==3.0.3
# gevent
gunicorn==21.2.0
# via -r requirements.txt
jinja2==3.1.2
jinja2==3.1.3
# via -r requirements.txt
jmespath==1.0.1
# via
Expand Down Expand Up @@ -117,15 +117,15 @@ pip-tools==7.3.0
# via -r requirements-dev.in
platformdirs==4.1.0
# via black
psutil==5.9.7
psutil==5.9.8
# via -r requirements.txt
pycparser==2.21
# via
# -r requirements.txt
# cffi
pymysql==1.1.0
# via -r requirements.txt
pypdf==3.17.4
pypdf==4.0.0
# via -r requirements.txt
pyproject-hooks==1.0.0
# via build
Expand All @@ -149,17 +149,17 @@ pytz==2023.3.post1
# via
# -r requirements.txt
# croniter
reportlab==4.0.8
reportlab==4.0.9
# via
# -r requirements.txt
# svglib
ruff==0.1.9
ruff==0.1.14
# via -r requirements-dev.in
s3transfer==0.10.0
# via
# -r requirements.txt
# boto3
sentry-sdk==1.39.1
sentry-sdk==1.39.2
# via -r requirements.txt
six==1.16.0
# via
Expand Down
12 changes: 6 additions & 6 deletions backend/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ django-cryptography~=1.1
# django-q
django-q2~=1.6.1
blessed~=1.20.0 # optional requirement for django-q2
psutil~=5.9.7 # optional requirement for django-q2
psutil~=5.9.8 # optional requirement for django-q2
croniter~=2.0.1 # optional requirement for django-q2

# MySQL database
pymysql~=1.1.0
cryptography~=41.0.7
cryptography~=42.0.1

# Sentry
sentry-sdk[django]~=1.39.1
sentry-sdk[django]~=1.39.2

# Jinja2
jinja2~=3.1.2
jinja2~=3.1.3

# GeoIP support
python-geoip-geolite2~=2015.303
Expand All @@ -33,6 +33,6 @@ django-storages[s3]~=1.14.2
django-localflavor~=4.0.0

# pdf creation
reportlab~=4.0.8
pypdf~=3.17.4
reportlab~=4.0.9
pypdf~=4.0.0
svglib~=1.5.1
12 changes: 6 additions & 6 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ chardet==5.2.0
# via reportlab
croniter==2.0.1
# via -r requirements.in
cryptography==41.0.7
cryptography==42.0.1
# via
# -r requirements.in
# django-cryptography
Expand Down Expand Up @@ -60,7 +60,7 @@ greenlet==3.0.3
# via gevent
gunicorn==21.2.0
# via -r requirements.in
jinja2==3.1.2
jinja2==3.1.3
# via -r requirements.in
jmespath==1.0.1
# via
Expand All @@ -74,13 +74,13 @@ packaging==23.2
# via gunicorn
pillow==10.2.0
# via reportlab
psutil==5.9.7
psutil==5.9.8
# via -r requirements.in
pycparser==2.21
# via cffi
pymysql==1.1.0
# via -r requirements.in
pypdf==3.17.4
pypdf==4.0.0
# via -r requirements.in
python-dateutil==2.8.2
# via
Expand All @@ -94,13 +94,13 @@ python-stdnum==1.19
# via django-localflavor
pytz==2023.3.post1
# via croniter
reportlab==4.0.8
reportlab==4.0.9
# via
# -r requirements.in
# svglib
s3transfer==0.10.0
# via boto3
sentry-sdk==1.39.1
sentry-sdk==1.39.2
# via
# -r requirements.in
# sentry-sdk
Expand Down

0 comments on commit e0af757

Please sign in to comment.