Skip to content
Merged
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.0.4 / 2026-05-20 ###
* Refreshed locked runtime and development dependencies, including `aiohttp` 3.13.5, `idna` 3.15, `pygments` 2.20.0, Python-version-specific `requests` updates, and `tuspy` 1.1.0.
* Updated development tooling to Python 3.9-compatible majors: `pytest` 8.4, `pytest-cov` 7.1, `Sphinx` 7.4, and `sphinx-autobuild` 2024.10.
* Kept SDK runtime support at Python 3.9+ to match package metadata, README, and CI, and held back newer tooling majors that require a higher Python floor.
* Removed obsolete compatibility and documentation tooling from the dependency surface, including `six`, `livereload`, and `tornado`.

### 1.0.3/ 2025-28-10 ###
* Added a Docker-based test harness (`scripts/test-in-docker.sh`) that mirrors our GitHub Actions matrix locally, including optional Smart CDN parity checks via the official Transloadit CLI.
* Introduced an opt-in end-to-end image resize test (`tests/test_e2e_upload.py`) plus supporting `chameleon.jpg` fixture; enable by setting `PYTHON_SDK_E2E=1` along with `TRANSLOADIT_KEY`/`TRANSLOADIT_SECRET`.
Expand Down
5 changes: 2 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __getattr__(cls, name):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -111,7 +111,7 @@ def __getattr__(cls, name):
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -186,4 +186,3 @@ def __getattr__(cls, name):
]



4 changes: 2 additions & 2 deletions docs/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pypandoc==1.4
Sphinx==1.6.3
pypandoc==1.17
Sphinx==7.4.7
3,293 changes: 2,365 additions & 928 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytransloadit"
version = "1.0.3"
version = "1.0.4"
description = "A Python Integration for Transloadit's file uploading and encoding service."
authors = ["Ifedapo Olarewaju"]
maintainers = ["Florian Kuenzig", "Arnaud Limbourg"]
Expand Down Expand Up @@ -32,14 +32,14 @@ requests = "^2.30.0"
tuspy = "^1.0.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.3.1"
pytest = "^8.4.2"
mock = "^5.0.2"
coverage = "^7.2.5"
pytest-cov = "^4.0.0"
pytest-cov = "^7.1.0"
requests-mock = "^1.10.0"
tox = "^4.7.0"
sphinx = "^4.5.0"
sphinx-autobuild = "^2021.3.14"
sphinx = "^7.4.7"
sphinx-autobuild = "^2024.10.3"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion scripts/notify-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ verify_versions_consistent() {
err "Version mismatch: tests/test_request.py expects $header_version but pyproject.toml has $version"
exit 1
fi
if ! grep -q "### ${version}/" CHANGELOG.md; then
if ! grep -Eq "^### ${version}([[:space:]/]|$)" CHANGELOG.md; then
err "CHANGELOG.md does not contain an entry for ${version}"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import platform
import subprocess
import time
import urllib.parse

import requests_mock
from six.moves import urllib

from . import request_body_matcher
from transloadit.client import Transloadit
Expand Down
4 changes: 2 additions & 2 deletions tests/test_request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import urllib.parse

import requests_mock
from six.moves import urllib

from . import request_body_matcher
from transloadit.client import Transloadit
Expand All @@ -19,7 +19,7 @@ def test_get(self, mock):
mock.get(
url,
text='{"ok": "it works"}',
request_headers={"Transloadit-Client": "python-sdk:1.0.3"},
request_headers={"Transloadit-Client": "python-sdk:1.0.4"},
)

response = self.request.get("/foo")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_template.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import urllib.parse

import requests_mock
from six.moves import urllib

from . import request_body_matcher
from transloadit.client import Transloadit
Expand Down
2 changes: 1 addition & 1 deletion transloadit/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.3"
__version__ = "1.0.4"
9 changes: 5 additions & 4 deletions transloadit/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
import hmac
import json
import copy
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone

import requests
from six import b

from .response import as_response
from . import __version__
Expand Down Expand Up @@ -114,7 +113,7 @@ def delete(self, path, data=None):

def _to_payload(self, data):
data = copy.deepcopy(data or {})
expiry = timedelta(seconds=self.transloadit.duration) + datetime.utcnow()
expiry = datetime.now(timezone.utc) + timedelta(seconds=self.transloadit.duration)
data["auth"] = {
"key": self.transloadit.auth_key,
"expires": expiry.strftime("%Y/%m/%d %H:%M:%S+00:00"),
Expand All @@ -123,7 +122,9 @@ def _to_payload(self, data):
return {"params": json_data, "signature": self._sign_data(json_data)}

def _sign_data(self, message):
hash_string = hmac.new(b(self.transloadit.auth_secret), message.encode("utf-8"), hashlib.sha384).hexdigest()
hash_string = hmac.new(
self.transloadit.auth_secret.encode("utf-8"), message.encode("utf-8"), hashlib.sha384
).hexdigest()
return f"sha384:{hash_string}"

def _get_full_url(self, url):
Expand Down
2 changes: 1 addition & 1 deletion transloadit/response.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from six import wraps
from functools import wraps


class Response:
Expand Down
Loading