Skip to content

Commit 65f7010

Browse files
authored
Merge branch 'main' into fix-tvar-typing-generic-alias
2 parents 4285b96 + 9fb6148 commit 65f7010

File tree

18 files changed

+201
-129
lines changed

18 files changed

+201
-129
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ jobs:
5656
# - windows-latest
5757
# - macos-latest
5858
python-version:
59-
- "3.9"
6059
- "3.10"
6160
- "3.11"
6261
- "3.12"
63-
# TODO: Enable this once fixed https://github.com/jcrist/msgspec/issues/910
64-
# - "3.13"
62+
- "3.13"
6563
- "3.14"
6664

6765
steps:

.github/workflows/profile.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
archs: arm64
2727
- os: macos-15-intel
2828
archs: x86_64
29-
- os: windows-11-arm
30-
archs: ARM64
3129
- os: windows-latest
3230
archs: AMD64
3331

@@ -38,24 +36,24 @@ jobs:
3836
- name: Load environment file
3937
uses: ./.github/actions/load-env
4038

39+
- name: Fetch latest supported Python
40+
if: inputs.python == ''
41+
id: latest-supported-python
42+
uses: ./.github/actions/latest-supported-python
43+
with:
44+
github-token: "${{ github.token }}"
45+
4146
- name: Install Python
4247
uses: actions/setup-python@v6
4348
with:
44-
python-version-file: pyproject.toml
49+
python-version: "${{ inputs.python || steps.latest-supported-python.outputs.version }}"
4550

4651
- name: Install uv
4752
uses: astral-sh/setup-uv@v7
4853

4954
- name: Install command runner
5055
run: uv tool install rust-just
5156

52-
- name: Fetch latest supported Python
53-
if: inputs.python == ''
54-
id: latest-supported-python
55-
uses: ./.github/actions/latest-supported-python
56-
with:
57-
github-token: "${{ github.token }}"
58-
5957
- name: Set profiling environment metadata
6058
id: metadata
6159
shell: bash

.pytest.ini

Lines changed: 0 additions & 7 deletions
This file was deleted.

.ruff.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ extend-exclude = [
33
"src/msgspec/_version.py",
44
"tests/typing/basic_typing_examples.py",
55
"tests/unit/test_JSONTestSuite.py",
6-
# TODO: remove when this when we drop support for Python 3.9 (example uses match statements)
7-
"examples/asyncio-kv/kv.py",
86
]
97

108
[lint]

docs/benchmarks.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ smaller on disk.
533533

534534
.. _msgspec: https://jcristharif.com/msgspec/
535535
.. _msgpack: https://github.com/msgpack/msgpack-python
536-
.. _ormsgpack: https://github.com/aviramha/ormsgpack
536+
.. _ormsgpack: https://github.com/ormsgpack/ormsgpack
537537
.. _MessagePack: https://msgpack.org
538538
.. _orjson: https://github.com/ijl/orjson
539539
.. _json: https://docs.python.org/3/library/json.html

docs/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ few:
104104

105105
.. grid:: 2 2 4 4
106106

107-
.. grid-item-card:: `NautilusTrader <https://nautilustrader.io/docs/latest/api_reference/serialization/#class-msgspecserializer>`_
107+
.. grid-item-card:: `NautilusTrader <https://nautilustrader.io>`_
108108

109109
.. image:: _static/nautilus-trader.png
110110
:target: https://nautilustrader.io/
@@ -139,7 +139,7 @@ few:
139139
.. image:: _static/anywidget.png
140140
:target: https://anywidget.dev/
141141

142-
.. grid-item-card:: `Ravyn <https://www.ravyn.dev/encoders/#example>`_
142+
.. grid-item-card:: `Ravyn <https://www.ravyn.dev/encoders/#msgspec-encoder>`_
143143

144144
.. image:: _static/ravyn.png
145145
:target: https://www.ravyn.dev/
@@ -149,10 +149,10 @@ few:
149149
.. image:: _static/faststream.png
150150
:target: https://faststream.ag2.ai/
151151

152-
.. grid-item-card:: `django-modern-rest <https://django-modern-rest.readthedocs.io/en/latest/pages/getting-started.html#showcase>`_
152+
.. grid-item-card:: `django-modern-rest <https://django-modern-rest.readthedocs.io/en/latest/>`_
153153

154154
.. image:: _static/django-modern-rest.png
155-
:target: https://django-modern-rest.rtfd.io/
155+
:target: https://django-modern-rest.readthedocs.io/en/latest/
156156

157157
.. grid-item-card:: `Meltano <https://sdk.meltano.com/en/latest/guides/performance.html#use-a-different-message-writer-or-reader>`_
158158

examples/asyncio-kv/kv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from __future__ import annotations
22

33
import asyncio
4-
import msgspec
54
from typing import Any
65

6+
import msgspec
7+
78

89
# Some utilities for writing and reading length-prefix framed messages. Using
910
# length-prefixed framing makes it easier for the reader to determine the

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ license = "BSD-3-Clause"
1616
license-files = [
1717
"LICENSE",
1818
]
19-
requires-python = ">=3.9"
19+
requires-python = ">=3.10"
2020
maintainers = [
2121
{ name = "Jim Crist-Harif", email = "jcristharif@gmail.com" },
2222
{ name = "Ofek Lev", email = "oss@ofek.dev" },
@@ -33,7 +33,6 @@ keywords = [
3333
]
3434
classifiers = [
3535
"Development Status :: 4 - Beta",
36-
"Programming Language :: Python :: 3.9",
3736
"Programming Language :: Python :: 3.10",
3837
"Programming Language :: Python :: 3.11",
3938
"Programming Language :: Python :: 3.12",
@@ -85,8 +84,7 @@ hooks = [
8584
"ruff==0.14.1",
8685
]
8786
test-base = [
88-
# TODO: require >=9 once we drop support for Python 3.9
89-
"pytest>=8",
87+
"pytest>=9",
9088
]
9189
test-prof = [
9290
{ include-group = "test-base" },
@@ -103,7 +101,6 @@ test-unit = [
103101
{ include-group = "test-base" },
104102
"attrs",
105103
"coverage",
106-
"eval-type-backport; python_version < '3.10'",
107104
"msgpack",
108105
"pyyaml",
109106
"tomli; python_version < '3.11'",

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,15 @@
5252
]
5353
)
5454

55+
libraries = []
56+
if sys.platform != "win32":
57+
libraries.append("m")
58+
5559
ext_modules = [
5660
Extension(
5761
"msgspec._core",
5862
[os.path.join("src", "msgspec", "_core.c")],
63+
libraries=libraries,
5964
extra_compile_args=extra_compile_args,
6065
extra_link_args=extra_link_args,
6166
)

src/msgspec/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ T = TypeVar("T")
7070

7171
class UnsetType(enum.Enum):
7272
UNSET = "UNSET"
73+
def __bool__(self) -> Literal[False]: ...
7374

7475
UNSET = UnsetType.UNSET
7576

0 commit comments

Comments
 (0)