Skip to content

Feature/django52 #117

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: |
3.8
3.9
3.10
pypy-3.10
3.11
3.12
3.13
- name: Install test framework
run: pip install tox
- name: Run tests
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ authors = [
description = "Deletes old files."
readme = "README.rst"
keywords = ["django"]
license = "MIT"
license-files = [ "LICENSE" ]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Utilities'
]
requires-python = ">=3.8"
requires-python = ">=3.9"
dynamic = ["version"]

[project.urls]
Expand Down
26 changes: 15 additions & 11 deletions test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import pickle
import re
import sys
import tempfile

from django.conf import settings as django_settings
Expand All @@ -23,28 +24,31 @@

LINE = re.compile(r'line \d{1,3}')

TB = '''Traceback (most recent call last):
File "{handlers}", line xxx, in run_on_commit
file_.delete(save=False)
File "{files}", line xxx, in delete
self.storage.delete(self.name)
File "{storage}", line xxx, in delete
os.remove(name)
{error}: [Errno 2] No such file or directory: '{{picture}}\''''



def get_traceback(picture):
fileabspath = os.path.abspath
error = 'FileNotFoundError'

return f'''Traceback (most recent call last):
if sys.version_info < (3, 13):
return f'''Traceback (most recent call last):
File "{fileabspath(handlers.__file__)}", line xxx, in run_on_commit
file_.delete(save=False)
File "{fileabspath(files.__file__)}", line xxx, in delete
self.storage.delete(self.name)
File "{fileabspath(storage.__file__)}", line xxx, in delete
os.remove(name)
{error}: [Errno 2] No such file or directory: '{picture}\''''
else:
return f'''Traceback (most recent call last):
File "{fileabspath(handlers.__file__)}", line xxx, in run_on_commit
file_.delete(save=False)
~~~~~~~~~~~~^^^^^^^^^^^^
File "{fileabspath(files.__file__)}", line xxx, in delete
self.storage.delete(self.name)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "{fileabspath(storage.__file__)}", line xxx, in delete
os.remove(name)
~~~~~~~~~^^^^^^
{error}: [Errno 2] No such file or directory: '{picture}\''''


Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tox]
envlist =
py{38,39}-django{42}
py{310,311,312,py3}-django{42,50,51}
py{39,310,311,312}-django{42}
py{310,311,312,313,py3}-django{51,52}
[testenv]
deps =
# LTS April 2025 - April 2028
django52: django<5.3
# August 2024 - December 2025
django51: django<5.2
# January 2024 - April 2025
django50: django<5.1
# LTS April 2023 - April 2026
django42: django<4.3
-rtest/requirements.txt
Expand Down