Skip to content
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
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
- "3.14"
tox-post-environments:
- "py3.9-mindeps"
- "py3.9-orjson"
- "py3.14-orjson"
- "py3.11-sphinxext"
- "coverage_report"

Expand All @@ -53,6 +55,7 @@ jobs:
- "3.11"
tox-post-environments:
- "py3.11-sphinxext"
- "py3.14-orjson"
- "coverage_report"

- name: "Windows"
Expand All @@ -62,6 +65,7 @@ jobs:
- "3.11"
tox-post-environments:
- "py3.9-mindeps"
- "py3.14-orjson"
- "py3.11-sphinxext"
- "coverage_report"

Expand Down
30 changes: 30 additions & 0 deletions changelog.d/20260501_170758_sirosen_define_orjson_encoder.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Added
-----

- The SDK now supports use of ``orjson`` as an alternative JSON encoder and decoder.
When ``GLOBUS_SDK_USE_ORJSON=1`` is set, request sending and response decoding
will use ``orjson``. (:pr:`NUMBER`)

- Use of ``orjson`` is optional, but if the variable is set and ``orjson``
is not installed, errors will be emitted.

- The setting can also be configured on transport objects with the init
option, ``use_orjson=True``.

- In a future major version of the SDK, use of ``orjson`` will default to
true when it is available.

- ``RequestsTransport`` objects are now visible via
``RequestsTransport.get_current_transport()``, a staticmethod, while the
transport is sending a request or being used to handle a response. This
method raises a ``LookupError`` if there is no currently active transport.
(:pr:`NUMBER`)

Deprecated
----------

- The ``RequestsTransport`` class supports configuration of request encoding
via a class-variable mapping, ``encoders``. This limits the ability of the
SDK to apply per-object customizations, as in the case of ``orjson``
support. The class variable ``encoders`` is deprecated, and users should
leverage the new ``encoder_map`` instance variable instead.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ docs = [
"scriv",
]
coverage = ["coverage[toml]"]
orjson = ["orjson>=3"]
test = [
{include-group = "coverage"},
"pytest", "pytest-xdist", "pytest-randomly", "flaky",
Expand All @@ -83,6 +84,8 @@ typing = [
"responses",
# similarly, sphinx is needed to type-check our sphinx extension
"sphinx",
# include any optional test deps
{include-group = "orjson"},
]
typing-mindeps = [
{include-group = "typing"},
Expand Down
55 changes: 55 additions & 0 deletions requirements/py3.10/test-orjson.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# tox p -m freezedeps
#
certifi==2026.5.20
# via requests
charset-normalizer==3.4.7
# via requests
coverage==7.14.1
# via -r .test.in
exceptiongroup==1.3.1
# via pytest
execnet==2.1.2
# via pytest-xdist
flaky==3.8.1
# via -r .test.in
idna==3.16
# via requests
iniconfig==2.3.0
# via pytest
orjson==3.11.9
# via -r .orjson.in
packaging==26.2
# via pytest
pluggy==1.6.0
# via pytest
pygments==2.20.0
# via pytest
pytest==9.0.3
# via
# -r .test.in
# pytest-randomly
# pytest-xdist
pytest-randomly==4.1.0
# via -r .test.in
pytest-xdist==3.8.0
# via -r .test.in
pyyaml==6.0.3
# via responses
requests==2.34.2
# via responses
responses==0.26.1
# via -r .test.in
tomli==2.4.1
# via
# coverage
# pytest
typing-extensions==4.15.0
# via exceptiongroup
urllib3==2.7.0
# via
# requests
# responses
10 changes: 5 additions & 5 deletions requirements/py3.10/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
#
# tox p -m freezedeps
#
certifi==2026.4.22
certifi==2026.5.20
# via requests
charset-normalizer==3.4.7
# via requests
coverage==7.14.0
coverage==7.14.1
# via -r .test.in
exceptiongroup==1.3.1
# via pytest
execnet==2.1.2
# via pytest-xdist
flaky==3.8.1
# via -r .test.in
idna==3.15
idna==3.16
# via requests
iniconfig==2.3.0
# via pytest
Expand All @@ -37,9 +37,9 @@ pytest-xdist==3.8.0
# via -r .test.in
pyyaml==6.0.3
# via responses
requests==2.34.1
requests==2.34.2
# via responses
responses==0.26.0
responses==0.26.1
# via -r .test.in
tomli==2.4.1
# via
Expand Down
18 changes: 10 additions & 8 deletions requirements/py3.10/typing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
#
alabaster==1.0.0
# via sphinx
ast-serialize==0.3.0
ast-serialize==0.5.0
# via mypy
babel==2.18.0
# via sphinx
certifi==2026.4.22
certifi==2026.5.20
# via requests
charset-normalizer==3.4.7
# via requests
docutils==0.21.2
# via sphinx
idna==3.15
idna==3.16
# via requests
imagesize==2.0.0
# via sphinx
Expand All @@ -30,6 +30,8 @@ mypy==2.1.0
# via -r .typing.in
mypy-extensions==1.1.0
# via mypy
orjson==3.11.9
# via -r .typing.in
packaging==26.2
# via sphinx
pathspec==1.1.1
Expand All @@ -38,13 +40,13 @@ pygments==2.20.0
# via sphinx
pyyaml==6.0.3
# via responses
requests==2.34.1
requests==2.34.2
# via
# responses
# sphinx
responses==0.26.0
responses==0.26.1
# via -r .typing.in
snowballstemmer==3.0.1
snowballstemmer==3.1.0
# via sphinx
sphinx==8.1.3
# via -r .typing.in
Expand All @@ -66,11 +68,11 @@ tomli==2.4.1
# sphinx
types-cryptography==3.3.23.2
# via types-jwt
types-docutils==0.22.3.20260508
types-docutils==0.22.3.20260518
# via -r .typing.in
types-jwt==0.1.3
# via -r .typing.in
types-requests==2.33.0.20260513
types-requests==2.33.0.20260518
# via -r .typing.in
typing-extensions==4.15.0
# via
Expand Down
14 changes: 7 additions & 7 deletions requirements/py3.11/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ babel==2.18.0
# via sphinx
beautifulsoup4==4.14.3
# via furo
certifi==2026.4.22
certifi==2026.5.20
# via requests
charset-normalizer==3.4.7
# via requests
click==8.3.3
click==8.4.1
# via
# click-log
# scriv
Expand All @@ -28,7 +28,7 @@ docutils==0.22.4
# via sphinx
furo==2025.12.19
# via -r .docs.in
idna==3.15
idna==3.16
# via requests
imagesize==2.0.0
# via sphinx
Expand All @@ -51,20 +51,20 @@ pygments==2.20.0
# sphinx
pyyaml==6.0.3
# via responses
requests==2.34.1
requests==2.34.2
# via
# responses
# scriv
# sphinx
responses==0.26.0
responses==0.26.1
# via -r .docs.in
roman-numerals==4.1.0
# via sphinx
scriv==1.8.0
# via -r .docs.in
snowballstemmer==3.0.1
snowballstemmer==3.1.0
# via sphinx
soupsieve==2.8.3
soupsieve==2.8.4
# via beautifulsoup4
sphinx==9.0.4
# via
Expand Down
47 changes: 47 additions & 0 deletions requirements/py3.11/test-orjson.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# tox p -m freezedeps
#
certifi==2026.5.20
# via requests
charset-normalizer==3.4.7
# via requests
coverage==7.14.1
# via -r .test.in
execnet==2.1.2
# via pytest-xdist
flaky==3.8.1
# via -r .test.in
idna==3.16
# via requests
iniconfig==2.3.0
# via pytest
orjson==3.11.9
# via -r .orjson.in
packaging==26.2
# via pytest
pluggy==1.6.0
# via pytest
pygments==2.20.0
# via pytest
pytest==9.0.3
# via
# -r .test.in
# pytest-randomly
# pytest-xdist
pytest-randomly==4.1.0
# via -r .test.in
pytest-xdist==3.8.0
# via -r .test.in
pyyaml==6.0.3
# via responses
requests==2.34.2
# via responses
responses==0.26.1
# via -r .test.in
urllib3==2.7.0
# via
# requests
# responses
10 changes: 5 additions & 5 deletions requirements/py3.11/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#
# tox p -m freezedeps
#
certifi==2026.4.22
certifi==2026.5.20
# via requests
charset-normalizer==3.4.7
# via requests
coverage==7.14.0
coverage==7.14.1
# via -r .test.in
execnet==2.1.2
# via pytest-xdist
flaky==3.8.1
# via -r .test.in
idna==3.15
idna==3.16
# via requests
iniconfig==2.3.0
# via pytest
Expand All @@ -35,9 +35,9 @@ pytest-xdist==3.8.0
# via -r .test.in
pyyaml==6.0.3
# via responses
requests==2.34.1
requests==2.34.2
# via responses
responses==0.26.0
responses==0.26.1
# via -r .test.in
urllib3==2.7.0
# via
Expand Down
Loading
Loading