Skip to content
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

chore: update to pydantic v2 #238

Merged
merged 60 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
137c5a8
package/pkg-python: add setuptools-rust and maturin infrastructure
jameshilliard Aug 7, 2022
37d44d8
package/python-maturin: migrate to setuptools-rust infrastructure
jameshilliard Aug 7, 2022
dae75dd
package/python-maturin: bump to version 1.3.1
jameshilliard Nov 5, 2023
946b98a
package/python-pydantic-core: new package
jameshilliard Nov 25, 2023
ab4edd0
package/python-pydantic: bump to version 2.5.2
jameshilliard Nov 25, 2023
8ae74ca
package/pkg-python.mk: fix typo
RomainNaour Dec 8, 2023
8a88a38
package/python-maturin: bump to version 1.4.0
jameshilliard Jan 10, 2024
1bf2516
package/python-orjson: migrate to maturin infrastructure
jameshilliard Aug 7, 2022
cafaca4
package/python-pydantic-core: bump to version 2.14.6
jameshilliard Jan 10, 2024
aa24310
package/python-pydantic: bump to version 2.5.3
jameshilliard Jan 10, 2024
7411be7
package/python-orjson: bump to version 3.9.10
jameshilliard Nov 24, 2023
868de74
package/python-rtoml: migrate to setuptools-rust infrastructure
jameshilliard Aug 7, 2022
0c4c3fa
package/python-rtoml: bump to version 0.10.0
jameshilliard Jan 11, 2024
8b94467
package/python-cryptography: migrate to setuptools-rust infrastructure
jameshilliard Aug 7, 2022
dc24db8
package/python-*: fix hashes for cargo-vendored python packages
yann-morin-1998 May 14, 2024
cc6350c
package/python-pydantic-core: bump for fixes with python 3.12
yann-morin-1998 Jun 12, 2024
412b41e
package/python-annotated-types: bump to version 0.7.0
jameshilliard Jul 1, 2024
010438d
package/python-pydantic-core: bump to version 2.20.0
jameshilliard Jul 1, 2024
3f49560
package/python-pydantic: bump to version 2.8.0
jameshilliard Jul 1, 2024
8335a71
package/python-pydantic: bump to version 2.8.2
jameshilliard Jul 19, 2024
04409eb
package/python-pydantic-core: bump to version 2.20.1
jameshilliard Jul 19, 2024
3965a0e
package/python-maturin: bump to version 1.7.0
jameshilliard Jul 19, 2024
5588632
package/python-pydantic: bump to version 2.9.0
jameshilliard Sep 6, 2024
92170ea
package/python-pydantic-core: bump to version 2.23.2
jameshilliard Sep 7, 2024
9573892
package/python-pydantic-core: bump to version 2.23.4
jameshilliard Sep 17, 2024
255de25
package/python-pydantic: bump to version 2.9.2
jameshilliard Sep 17, 2024
00bcf47
package/{rust, rust-bin}: bump to version 1.68.0
jameshilliard Mar 17, 2023
0c1aac2
package/{rust, rust-bin}: bump to version 1.68.2
jameshilliard Apr 5, 2023
e03e35c
package/{rust, rust-bin}: bump to version 1.70.0
jameshilliard Jun 5, 2023
d8223c0
package/{rust, rust-bin}: bump to version 1.71.0
jameshilliard Jul 13, 2023
4f9c13c
package/{rust, rust-bin}: security bump to version 1.71.1
jameshilliard Aug 14, 2023
8d1f86e
package/{rust, rust-bin}: bump to version 1.74.1
antocout Dec 28, 2023
f97ec10
package/rustc: rust >= 1.73.0 needs cmake >= 3.20
RomainNaour Jan 17, 2024
dd9272a
package/rust/rust.mk: add missing host-zlib dependency
RomainNaour Feb 29, 2024
29c0fe2
package/rust: use host libraries from HOST_DIR
RomainNaour Feb 29, 2024
600e51c
package/rust: provide RUSTFLAGS for cargo
RomainNaour Mar 2, 2024
b6b4c54
utils/update-rust: add script to automatically update the rust version
yann-morin-1998 Jun 13, 2024
b368d7a
package/rust: update to 1.79.0
yann-morin-1998 Jun 13, 2024
3fb1552
package/rust: update to 1.80.1
sl8vz Aug 16, 2024
dc8023f
package/rust: bump to version 1.81.0
jameshilliard Sep 22, 2024
24a75d9
package/rust: bump to version 1.82.0
jameshilliard Oct 27, 2024
46e6ac3
package/rust/rust: remove Cargo.toml.orig fixup
RomainNaour Nov 1, 2024
c393a71
package/pkg-cargo: configure cargo profiles
jameshilliard Oct 21, 2022
639015c
package/pkg-generic.mk: really make DL_SUBDIR inheritance work
tpetazzoni May 9, 2024
17f87f5
support/download/git: handle git attributes
yann-morin-1998 May 4, 2024
2ce88c2
package/pkg-utils: add vendoring mechanism into generated archive fil…
yann-morin-1998 May 4, 2024
7b9599a
support/download: even more reproducible archives (until next time)
yann-morin-1998 May 4, 2024
1eb0796
support/dependencies: require tar >= 1.35
yann-morin-1998 May 4, 2024
e167e14
package/pkg-download: use _DL_SUBDIR as root dir of generated archives
yann-morin-1998 Jun 2, 2024
eb78e2e
package/pkg-download: export TAR for download backends
yann-morin-1998 Jun 5, 2024
ad0bb02
package/pkg-download: symplify calling parameters
yann-morin-1998 Jun 7, 2024
15e49b6
package/pkg-generic: split long, unreadable DOWNLOAD line
yann-morin-1998 Jun 7, 2024
bd2f1f9
support/download: pass post-process options to post-process helper
yann-morin-1998 Jun 7, 2024
93fb959
pakcage/pkg-cargo: use post-process opts to pass manifest path
yann-morin-1998 Jun 7, 2024
95f4577
package/pkg-python: use post-process opts to pass Cargo manifest path
yann-morin-1998 Jun 7, 2024
4a84211
package/pkg-download: restore user's original umask for the whole dow…
Dec 6, 2022
2ddc26b
package: add annotated-types
sfoster1 Dec 18, 2024
83958d2
package/python-fastapi: bump to 0.100.0
sfoster1 Dec 18, 2024
4064ca1
package/python-pydantic-settings: new package
jameshilliard Sep 27, 2024
1d8f2c7
package/python-pydantic-settings: downgrade to 2.4.0
sfoster1 Dec 18, 2024
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: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ endif
CANONICAL_CURDIR = $(realpath $(CURDIR))

REQ_UMASK = 0022
CUR_UMASK := $(shell umask)

# Make sure O= is passed (with its absolute canonical path) everywhere the
# toplevel makefile is called back.
EXTRAMAKEARGS := O=$(CANONICAL_O)

# Check Buildroot execution pre-requisites here.
ifneq ($(shell umask):$(CURDIR):$(O),$(REQ_UMASK):$(CANONICAL_CURDIR):$(CANONICAL_O))
ifneq ($(CUR_UMASK):$(CURDIR):$(O),$(REQ_UMASK):$(CANONICAL_CURDIR):$(CANONICAL_O))
.PHONY: _all $(MAKECMDGOALS)

$(MAKECMDGOALS): _all
Expand All @@ -81,6 +82,7 @@ $(MAKECMDGOALS): _all
_all:
@umask $(REQ_UMASK) && \
$(MAKE) -C $(CANONICAL_CURDIR) --no-print-directory \
BR_ORIG_UMASK=$(CUR_UMASK) \
$(MAKECMDGOALS) $(EXTRAMAKEARGS)

else # umask / $(CURDIR) / $(O)
Expand Down
5 changes: 5 additions & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ menu "External python modules"
source "package/python-aionotify/Config.in"
source "package/python-aiosqlite/Config.in"
source "package/python-alsaaudio/Config.in"
source "package/python-annotated-types/Config.in"
source "package/python-anyio/Config.in"
source "package/python-apply_defaults/Config.in"
source "package/python-argh/Config.in"
Expand Down Expand Up @@ -1198,6 +1199,10 @@ menu "External python modules"
source "package/python-pycups/Config.in"
source "package/python-pydal/Config.in"
source "package/python-pydantic/Config.in"
source "package/python-pydantic-core/Config.in"
source "package/python-pydantic-settings/Config.in"
source "package/python-pydevmem/Config.in"
source "package/python-pydyf/Config.in"
source "package/python-pyelftools/Config.in"
source "package/python-pyftpdlib/Config.in"
source "package/python-pygame/Config.in"
Expand Down
102 changes: 101 additions & 1 deletion package/pkg-cargo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,106 @@ PKG_CARGO_ENV = \
CARGO_HOST_RUSTFLAGS="$(addprefix -C link-args=,$(HOST_LDFLAGS))" \
CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc

# We always set both CARGO_PROFILE_DEV and CARGO_PROFILE_RELEASE
# as we are unable to select a build profile using the environment.
#
# Other cargo profiles generally derive from these two profiles.

# Disable incremental compilation to match release default.
#
# Set codegen-units to release default.
#
# Set split-debuginfo to default off for ELF platforms.
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_INCREMENTAL="false" \
CARGO_PROFILE_RELEASE_INCREMENTAL="false" \
CARGO_PROFILE_DEV_CODEGEN_UNITS="16" \
CARGO_PROFILE_RELEASE_CODEGEN_UNITS="16" \
CARGO_PROFILE_DEV_SPLIT_DEBUGINFO="off" \
CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO="off"

# Set the optimization level with the release default as fallback.
ifeq ($(BR2_OPTIMIZE_0),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="0" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="0"
else ifeq ($(BR2_OPTIMIZE_1),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="1" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="1"
else ifeq ($(BR2_OPTIMIZE_2),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="2" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="2"
else ifeq ($(BR2_OPTIMIZE_3),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="3" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="3"
else ifeq ($(BR2_OPTIMIZE_G),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="0" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="0"
else ifeq ($(BR2_OPTIMIZE_S),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="s" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
else ifeq ($(BR2_OPTIMIZE_FAST),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="3" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="3"
else
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_OPT_LEVEL="3" \
CARGO_PROFILE_RELEASE_OPT_LEVEL="3"
endif

ifeq ($(BR2_ENABLE_LTO),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_LTO="true" \
CARGO_PROFILE_RELEASE_LTO="true"
else
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_LTO="false" \
CARGO_PROFILE_RELEASE_LTO="false"
endif


ifeq ($(BR2_ENABLE_DEBUG),y)
ifeq ($(BR2_DEBUG_3),y)
# full debug info
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_DEBUG="2" \
CARGO_PROFILE_RELEASE_DEBUG="2"
else
# line tables only
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_DEBUG="1" \
CARGO_PROFILE_RELEASE_DEBUG="1"
endif
else
# no debug info
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_DEBUG="0" \
CARGO_PROFILE_RELEASE_DEBUG="0"
endif

# Enabling debug-assertions enables the runtime debug_assert! macro.
#
# Enabling overflow-checks enables runtime panic on integer overflow.
ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_DEBUG_ASSERTIONS="true" \
CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="true" \
CARGO_PROFILE_DEV_OVERFLOW_CHECKS="true" \
CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="true"
else
PKG_CARGO_ENV += \
CARGO_PROFILE_DEV_DEBUG_ASSERTIONS="false" \
CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="false" \
CARGO_PROFILE_DEV_OVERFLOW_CHECKS="false" \
CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="false"
endif

#
# This is a workaround for https://github.com/rust-lang/compiler-builtins/issues/420
# and should be removed when fixed upstream
Expand Down Expand Up @@ -92,7 +192,7 @@ $(2)_DL_ENV += CARGO_HOME=$$(BR_CARGO_HOME)

# If building in a sub directory, use that to find the Cargo.toml
ifneq ($$($(2)_SUBDIR),)
$(2)_DL_ENV += BR_CARGO_MANIFEST_PATH=$$($(2)_SUBDIR)/Cargo.toml
$(2)_DOWNLOAD_POST_PROCESS_OPTS += -m$$($(2)_SUBDIR)/Cargo.toml
endif

# Due to vendoring, it is pretty likely that not all licenses are
Expand Down
49 changes: 30 additions & 19 deletions package/pkg-download.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export SFTP := $(call qstrip,$(BR2_SFTP))
export LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))

# Version of the format of the archives we generate in the corresponding
# download backend:
BR_FMT_VERSION_git = -br1
BR_FMT_VERSION_svn = -br2
# download backend and post-process:
BR_FMT_VERSION_git = -git4
BR_FMT_VERSION_svn = -svn5
BR_FMT_VERSION_go = -go2
BR_FMT_VERSION_cargo = -cargo2

DL_WRAPPER = support/download/dl-wrapper

Expand Down Expand Up @@ -102,28 +104,37 @@ endif
# source from the list returned by DOWNLOAD_URIS.
#
# Argument 1 is the source location
# Argument 2 is the upper-case package name
# Argument 3 is a space-separated list of optional arguments
# Argument 2 is a space-separated list of optional arguments
#
################################################################################

# Restore the user's original umask during the whole download, in case he has
# provisions set to share the download directory with his group (or others).
ifneq ($(BR_ORIG_UMASK),)
DOWNLOAD_SET_UMASK = umask $(BR_ORIG_UMASK);
endif

define DOWNLOAD
$(Q)mkdir -p $($(2)_DL_DIR)
$(Q)$(EXTRA_ENV) $($(2)_DL_ENV) \
flock $($(2)_DL_DIR)/.lock $(DL_WRAPPER) \
-c '$($(2)_DL_VERSION)' \
-d '$($(2)_DL_DIR)' \
$(Q)$(DOWNLOAD_SET_UMASK) mkdir -p $($(PKG)_DL_DIR)
$(Q)$(DOWNLOAD_SET_UMASK) $(EXTRA_ENV) \
$($(PKG)_DL_ENV) \
TAR="$(TAR)" \
BR_NO_CHECK_HASH_FOR="$(if $(BR2_DOWNLOAD_FORCE_CHECK_HASHES),,$(BR_NO_CHECK_HASH_FOR))" \
flock $($(PKG)_DL_DIR)/.lock $(DL_WRAPPER) \
-c '$($(PKG)_DL_VERSION)' \
-d '$($(PKG)_DL_DIR)' \
-D '$(DL_DIR)' \
-f '$(notdir $(1))' \
-H '$($(2)_HASH_FILE)' \
-n '$($(2)_BASENAME_RAW)' \
-N '$($(2)_RAWNAME)' \
-o '$($(2)_DL_DIR)/$(notdir $(1))' \
$(if $($(2)_GIT_SUBMODULES),-r) \
$(if $($(2)_GIT_LFS),-l) \
$(foreach uri,$(call DOWNLOAD_URIS,$(1),$(2)),-u $(uri)) \
$(3) \
$(foreach f,$($(PKG)_HASH_FILES),-H '$(f)') \
-n '$($(PKG)_DL_SUBDIR)-$($(PKG)_VERSION)' \
-N '$($(PKG)_RAWNAME)' \
-o '$($(PKG)_DL_DIR)/$(notdir $(1))' \
$(if $(filter YES,$($(PKG)_SVN_EXTERNALS)),-r) \
$(if $($(PKG)_GIT_SUBMODULES),-r) \
$(if $($(PKG)_GIT_LFS),-l) \
$(foreach uri,$(call DOWNLOAD_URIS,$(1),$(PKG)),-u $(uri)) \
$(2) \
$(QUIET) \
-- \
$($(2)_DL_OPTS)
$($(PKG)_DL_OPTS)
endef
15 changes: 11 additions & 4 deletions package/pkg-generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,14 @@ $(BUILD_DIR)/%/.stamp_downloaded:
break ; \
fi ; \
done
$(if $($(PKG)_MAIN_DOWNLOAD),$(call DOWNLOAD,$($(PKG)_MAIN_DOWNLOAD),$(PKG),$(patsubst %,-p '%',$($(PKG)_DOWNLOAD_POST_PROCESS))))
$(foreach p,$($(PKG)_ADDITIONAL_DOWNLOADS),$(call DOWNLOAD,$(p),$(PKG))$(sep))
$(if $($(PKG)_MAIN_DOWNLOAD), \
$(call DOWNLOAD, \
$($(PKG)_MAIN_DOWNLOAD), \
$(patsubst %,-p '%',$($(PKG)_DOWNLOAD_POST_PROCESS)) \
$(patsubst %,-P '%',$($(PKG)_DOWNLOAD_POST_PROCESS_OPTS)) \
) \
)
$(foreach p,$($(PKG)_ADDITIONAL_DOWNLOADS),$(call DOWNLOAD,$(p))$(sep))
$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
$(Q)mkdir -p $(@D)
@$(call step_end,download)
Expand All @@ -202,7 +208,7 @@ $(BUILD_DIR)/%/.stamp_downloaded:
# Retrieve actual source archive, e.g. for prebuilt external toolchains
$(BUILD_DIR)/%/.stamp_actual_downloaded:
@$(call step_start,actual-download)
$(call DOWNLOAD,$($(PKG)_ACTUAL_SOURCE_SITE)/$($(PKG)_ACTUAL_SOURCE_TARBALL),$(PKG))
$(call DOWNLOAD,$($(PKG)_ACTUAL_SOURCE_SITE)/$($(PKG)_ACTUAL_SOURCE_TARBALL))
$(Q)mkdir -p $(@D)
@$(call step_end,actual-download)
$(Q)touch $@
Expand Down Expand Up @@ -531,7 +537,6 @@ endif

$(2)_BASENAME = $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
$(2)_BASENAME_RAW = $$(if $$($(2)_VERSION),$$($(2)_RAWNAME)-$$($(2)_VERSION),$$($(2)_RAWNAME))
$(2)_DL_SUBDIR ?= $$($(2)_RAWNAME)
$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_DL_SUBDIR)
$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASENAME)

Expand All @@ -544,6 +549,8 @@ endif
ifndef $(2)_DL_SUBDIR
ifdef $(3)_DL_SUBDIR
$(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
else
$(2)_DL_SUBDIR = $$($(2)_RAWNAME)
endif
endif

Expand Down
Loading
Loading