Package Details: python-dataclasses-json 0.6.7-2

Git Clone URL: https://aur.archlinux.org/python-dataclasses-json.git (read-only, click to copy)
Package Base: python-dataclasses-json
Description: Easily serialize Python Data Classes to and from JSON
Upstream URL: https://github.com/lidatong/dataclasses-json
Licenses: MIT
Submitter: sumner
Maintainer: edwargix
Last Packager: edwargix
Votes: 7
Popularity: 0.69
First Submitted: 2020-06-07 08:55 (UTC)
Last Updated: 2026-01-31 19:02 (UTC)

Latest Comments

1 2 Next › Last »

greyltc commented on 2026-06-01 12:54 (UTC)

This isn't building for me today. Anyone have any ideas?

==> Starting check()...
============================= test session starts ==============================
platform linux -- Python 3.14.5, pytest-9.0.3, pluggy-1.6.0
rootdir: /build/python-dataclasses-json/src/dataclasses-json-0.6.7
configfile: pyproject.toml
plugins: hypothesis-6.153.0, mypy-0.10.3
collected 325 items / 2 errors

==================================== ERRORS ====================================
__________________ ERROR collecting tests/test_annotations.py __________________
tests/test_annotations.py:28: in <module>
    class TestAnnotations:
tests/test_annotations.py:36: in TestAnnotations
    sch = User.schema()
          ^^^^^^^^^^^^^
dataclasses_json/api.py:87: in schema
    Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dataclasses_json/mm.py:389: in build_schema
    schema_ = schema(cls, mixin, infer_missing)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dataclasses_json/mm.py:329: in schema
    t = build_type(type_, options, mixin, field, cls)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dataclasses_json/mm.py:293: in build_type
    return inner(type_, options)
           ^^^^^^^^^^^^^^^^^^^^^
dataclasses_json/mm.py:277: in inner
    return TYPES[origin](*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   TypeError: Field.__init__() got an unexpected keyword argument 'default'
___________________ ERROR collecting tests/test_metadata.py ____________________
tests/test_metadata.py:39: in <module>
    car_schema = Car.schema()
                 ^^^^^^^^^^^^
dataclasses_json/api.py:95: in schema
    return Schema(only=only,
E   TypeError: Schema.__init__() got an unexpected keyword argument 'context'
=============================== warnings summary ===============================
tests/test_collection_of_unions.py:8
  /build/python-dataclasses-json/src/dataclasses-json-0.6.7/tests/test_collection_of_unions.py:8: PytestCollectionWarning: cannot collect test class 'TestChild' because it has a __init__ constructor (from: tests/test_collection_of_unions.py)
    @dataclass_json

tests/test_collection_of_unions.py:14
  /build/python-dataclasses-json/src/dataclasses-json-0.6.7/tests/test_collection_of_unions.py:14: PytestCollectionWarning: cannot collect test class 'TestOtherChild' because it has a __init__ constructor (from: tests/test_collection_of_unions.py)
    @dataclass_json

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR tests/test_annotations.py - TypeError: Field.__init__() got an unexpect...
ERROR tests/test_metadata.py - TypeError: Schema.__init__() got an unexpected...
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
======================== 2 warnings, 2 errors in 1.17s =========================
==> ERROR: A failure occurred in check().
    Aborting...

edwargix commented on 2026-01-31 19:04 (UTC)

This should now build, test, and install properly on Python 3.14. Thank you @medaminezghal and @evorster for suggesting fixes, that was a huge help!!

evorster commented on 2026-01-31 15:32 (UTC) (edited on 2026-01-31 15:46 (UTC) by evorster)

For anybody else that just wants to build this:

1) Download the PR patch cd ~/Aur/python-dataclasses-json curl -L 'https://github.com/lidatong/dataclasses-json/pull/565.patch' -o 565.patch

2) Filter to only dataclasses_json/*.py hunks (no pyproject/uv/CI/README/tests)

Use this AWK filter (keeps only diff blocks for dataclasses_json/*.py):

awk ' /^diff --git a\// {keep=0} /^diff --git a\/dataclasses_json\/..py b\/dataclasses_json\/..py$/ {keep=1} { if (keep) print } ' 565.patch > py314-min.patch

Sanity check the patch is non-empty:

grep -n '^diff --git' py314-min.patch

You should see at least dataclasses_json/core.py (and maybe undefined.py).

C) Apply that minimal patch in the PKGBUILD

Edit PKGBUILD:

Add the patch to source=() (or append to existing source):

source+=("py314-min.patch")

Add/extend prepare():

prepare() { cd "${srcdir}/${_module}-${pkgver}" patch -Np1 -i "${srcdir}/py314-min.patch" }

Put the patch file where makepkg expects it:

easiest: treat it as a local source in the same directory

cp -f py314-min.patch .

Update checksums and rebuild clean:

updpkgsums makepkg -Csi

medaminezghal commented on 2026-01-16 18:29 (UTC)

@edwargix Could you apply this patch to fix compatibility with Python 3.14?

Mccurly commented on 2026-01-11 17:14 (UTC)

Is this installable on latest arch?

edwargix commented on 2025-02-22 18:11 (UTC)

Thank you apferrosoft! Unfortunately I can't force push a new commit with the tarball removed but I did push a new commit removing it.

apferrosoft commented on 2025-02-07 15:38 (UTC)

The repository includes a v0.6.6.tar.gz file, which shouldn't have been committed.

edwargix commented on 2023-09-03 17:40 (UTC)

We're blocked on upgrading to v0.5.15+ until the python-poetry-dynamic-versioning package gets upgraded because we're hitting the following build error:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/poetry_dynamic_versioning/backend.py", line 5, in <module>
    patch.activate()
  File "/usr/lib/python3.11/site-packages/poetry_dynamic_versioning/patch.py", line 52, in activate
    _apply_patches()
  File "/usr/lib/python3.11/site-packages/poetry_dynamic_versioning/patch.py", line 43, in _apply_patches
    _patch_poetry_create(factory_mod)
  File "/usr/lib/python3.11/site-packages/poetry_dynamic_versioning/patch.py", line 14, in _patch_poetry_create
    from poetry.core.semver.version import Version as PoetryVersion
ModuleNotFoundError: No module named 'poetry.core.semver'

edwargix commented on 2023-07-25 16:32 (UTC)

sorry about the missing check dependency; that should be fixed now

I'll add the LICENSE later today

carsme commented on 2023-07-25 12:06 (UTC)

In addition to the missing a check dependency, this package does not install the license file. Please, add the following to the package() function:

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"