python3Packages.google-cloud-*: various updates (#537770)

This commit is contained in:
Martin Weinelt 2026-07-02 21:43:48 +00:00 committed by GitHub
commit eaeb95ca9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 307 additions and 121 deletions

View file

@ -8,7 +8,7 @@
nixosTests,
gettext,
# tests fail and eventually lock up on 3.14
python313,
python313Packages,
ghostscript_headless,
imagemagickBig,
jbig2enc,
@ -42,27 +42,12 @@ let
# tesseract5 may be overwritten in the paperless module and we need to propagate that to make the closure reduction effective
ocrmypdf = prev.ocrmypdf_16.override { tesseract = tesseract5; };
# these are broken on 3.13
google-cloud-firestore = null;
google-cloud-iam = null;
google-cloud-kms = null;
google-cloud-monitoring = null;
google-cloud-pubsub = null;
google-cloud-storage = null;
# these depend on google-cloud stuff in tests
celery = prev.celery.overridePythonAttrs { doCheck = false; };
kombu = prev.kombu.overridePythonAttrs { doCheck = false; };
};
python = python313.override {
self = python;
packageOverrides = lib.composeManyExtensions [
defaultPythonPackageOverrides
extraPythonPackageOverrides
];
};
pythonPackages = python313Packages.overrideScope (
final: prev:
lib.composeManyExtensions [ defaultPythonPackageOverrides extraPythonPackageOverrides ] final prev
);
path = lib.makeBinPath [
ghostscript_headless
@ -84,7 +69,7 @@ let
];
};
in
python.pkgs.buildPythonApplication (finalAttrs: {
pythonPackages.buildPythonApplication (finalAttrs: {
pname = "paperless-ngx";
pyproject = true;
@ -116,7 +101,7 @@ python.pkgs.buildPythonApplication (finalAttrs: {
--replace-fail '--maxprocesses=16' "--numprocesses=$NIX_BUILD_CORES"
'';
build-system = [ python.pkgs.setuptools ];
build-system = [ pythonPackages.setuptools ];
nativeBuildInputs = [
gettext
@ -141,7 +126,7 @@ python.pkgs.buildPythonApplication (finalAttrs: {
];
dependencies =
with python.pkgs;
with pythonPackages;
[
babel
bleach
@ -207,18 +192,18 @@ python.pkgs.buildPythonApplication (finalAttrs: {
postBuild = ''
# Compile manually because `pythonRecompileBytecodeHook` only works
# for files in `python.sitePackages`
${python.pythonOnBuildForHost.interpreter} -OO -m compileall src
${pythonPackages.python.pythonOnBuildForHost.interpreter} -OO -m compileall src
# Collect static files
${python.pythonOnBuildForHost.interpreter} src/manage.py collectstatic --clear --no-input
${pythonPackages.python.pythonOnBuildForHost.interpreter} src/manage.py collectstatic --clear --no-input
# Compile string translations using gettext
${python.pythonOnBuildForHost.interpreter} src/manage.py compilemessages
${pythonPackages.python.pythonOnBuildForHost.interpreter} src/manage.py compilemessages
'';
installPhase =
let
pythonPath = python.pkgs.makePythonPath finalAttrs.passthru.dependencies;
pythonPath = pythonPackages.makePythonPath finalAttrs.passthru.dependencies;
in
''
runHook preInstall
@ -230,7 +215,7 @@ python.pkgs.buildPythonApplication (finalAttrs: {
makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \
--prefix PYTHONPATH : "${pythonPath}" \
--prefix PATH : "${path}"
makeWrapper ${lib.getExe python.pkgs.celery} $out/bin/celery \
makeWrapper ${lib.getExe pythonPackages.celery} $out/bin/celery \
--prefix PYTHONPATH : "${pythonPath}:$out/lib/paperless-ngx/src" \
--prefix PATH : "${path}"
@ -242,7 +227,7 @@ python.pkgs.buildPythonApplication (finalAttrs: {
find $out/lib/paperless-ngx -type d -name tests -exec rm -rv {} +
'';
nativeCheckInputs = with python.pkgs; [
nativeCheckInputs = with pythonPackages; [
daphne
factory-boy
imagehash
@ -310,9 +295,9 @@ python.pkgs.buildPythonApplication (finalAttrs: {
inherit
nltkDataDir
path
python
tesseract5
;
inherit (pythonPackages) python;
tests = { inherit (nixosTests) paperless; };
updateScript = nix-update-script {
extraArgs = [

View file

@ -17,6 +17,7 @@ let
python = python3.override {
self = python;
packageOverrides = self: super: {
chardet = super.chardet_5;
django = super.django_5;
django-oauth-toolkit = super.django-oauth-toolkit.overridePythonAttrs (oldAttrs: rec {

View file

@ -32,14 +32,14 @@
buildPythonPackage rec {
pname = "anyio";
version = "4.14.0";
version = "4.14.1";
pyproject = true;
src = fetchFromGitHub {
owner = "agronholm";
repo = "anyio";
tag = version;
hash = "sha256-g+2d/j3ke+RjwIYq0JyFfYxg80QXrura9Dsx7cQyMIQ=";
hash = "sha256-LPNRNb1RuSVQqsI6aAAiYWC2c2CZAhFS67XW9OfbIiE=";
};
build-system = [ setuptools-scm ];
@ -91,6 +91,7 @@ buildPythonPackage rec {
"test_nonexistent_main_module"
# 3 second timeout expired
"test_keyboardinterrupt_during_test"
"test_dynamic_async_fixture_access_does_not_hang"
# racy with high thread count, see https://github.com/NixOS/nixpkgs/issues/448125
"test_multiple_threads"

View file

@ -0,0 +1,44 @@
{
lib,
buildPythonPackage,
fetchPypi,
hypothesis,
pytestCheckHook,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "chardet";
version = "5.2.0";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-Gztv9HmoxBS8P6LAhSmVaVxKAm3NbQYzst0JLKOcHPc=";
};
build-system = [ setuptools ];
nativeCheckInputs = [
hypothesis
pytestCheckHook
];
disabledTests = [
# flaky; https://github.com/chardet/chardet/issues/256
"test_detect_all_and_detect_one_should_agree"
];
pythonImportsCheck = [ "chardet" ];
meta = {
changelog = "https://github.com/chardet/chardet/releases/tag/${finalAttrs.version}";
description = "Universal encoding detector";
mainProgram = "chardetect";
homepage = "https://github.com/chardet/chardet";
license = lib.licenses.lgpl21Plus;
maintainers = [ ];
};
})

View file

@ -45,6 +45,10 @@ buildPythonPackage (finalAttrs: {
nativeCheckInputs = [ pytestCheckHook ];
pytestFlags = [
"-Wignore::DeprecationWarning"
];
pythonImportsCheck = [ "db_dtypes" ];
meta = {

View file

@ -15,7 +15,6 @@
# tests
beautifulsoup4,
brotli,
calmjs,
csscompressor,
django-sekizai,
jinja2,
@ -52,7 +51,6 @@ buildPythonPackage rec {
nativeCheckInputs = [
beautifulsoup4
brotli
calmjs
csscompressor
django-sekizai
jinja2
@ -68,6 +66,8 @@ buildPythonPackage rec {
disabledTests = [
# we set mtime to 1980-01-02
"test_css_mtimes"
# calmjs removed from test deps, because it requires pkg_resources at runtime
"test_calmjs_filter"
];
pythonImportsCheck = [ "compressor" ];

View file

@ -19,14 +19,14 @@
buildPythonPackage rec {
pname = "django-q2";
version = "1.9.0";
version = "1.10.0";
pyproject = true;
src = fetchFromGitHub {
owner = "django-q2";
repo = "django-q2";
tag = "v${version}";
hash = "sha256-xqRm9vv/lD9HLX+ekdPgIGGwr5H7QZBATPx0CCjQAmw=";
hash = "sha256-VwB3pvDAGsMvcKblRnmCYHzvEBCz8E13Qov4LjWEqxc=";
};
build-system = [
@ -74,6 +74,9 @@ buildPythonPackage rec {
disabledTestPaths = [
"django_q/tests/test_commands.py"
# assert 0 == 1 where 0 = <django_q.cluster.Sentinel object at 0x7ffff3861e50>.reincarnations
"django_q/tests/test_cluster.py::test_recycle"
"django_q/tests/test_cluster.py::test_max_rss"
];
pytestFlags = [ "-vv" ];

View file

@ -0,0 +1,79 @@
diff --git a/encutils/__init__.py b/encutils/__init__.py
index 02922be..8a85574 100644
--- a/encutils/__init__.py
+++ b/encutils/__init__.py
@@ -442,7 +442,7 @@ def tryEncodings(text, log=None): # noqa: C901
encoding = chardet.detect(text)["encoding"]
- except ImportError:
+ except (ImportError, AttributeError):
msg = 'Using simplified encoding detection, you might want to install chardet.'
if log:
log.warn(msg)
encutils-1.0.0 on  main [!] is 📦 v1.0.0 via 🐍 v3.13.13
hx encutils/__init__.py
encutils-1.0.0 on  main [!] is 📦 v1.0.0 via 🐍 v3.13.13 took 59s
git diff
diff --git a/encutils/__init__.py b/encutils/__init__.py
index 02922be..100e06e 100644
--- a/encutils/__init__.py
+++ b/encutils/__init__.py
@@ -441,6 +441,8 @@ def tryEncodings(text, log=None): # noqa: C901
import chardet
encoding = chardet.detect(text)["encoding"]
+ if encoding is not None:
+ return encoding
except ImportError:
msg = 'Using simplified encoding detection, you might want to install chardet.'
@@ -449,27 +451,27 @@ def tryEncodings(text, log=None): # noqa: C901
else:
print(msg)
- encodings = (
- 'ascii',
- 'iso-8859-1',
- # 'windows-1252', # test later
- 'utf-8',
- )
- encoding = None
- for e in encodings:
- try:
- text.decode(e)
- except UnicodeDecodeError:
- pass
- else:
- if 'iso-8859-1' == e:
- try:
- if '€' in text.decode('windows-1252'):
- return 'windows-1252'
- except UnicodeDecodeError:
- pass
-
- return e
+ encodings = (
+ 'ascii',
+ 'iso-8859-1',
+ # 'windows-1252', # test later
+ 'utf-8',
+ )
+ encoding = None
+ for e in encodings:
+ try:
+ text.decode(e)
+ except UnicodeDecodeError:
+ pass
+ else:
+ if 'iso-8859-1' == e:
+ try:
+ if '€' in text.decode('windows-1252'):
+ return 'windows-1252'
+ except UnicodeDecodeError:
+ pass
+
+ return e
return encoding

View file

@ -18,6 +18,9 @@ buildPythonPackage (finalAttrs: {
hash = "sha256-OOylrxjOur2L5DwX8UydP7uoPMX3rI46schuJMSyuRo=";
};
# expect chardet.detect to return None
patches = [ ./chardet6-compat.patch ];
build-system = [ flit-core ];
dependencies = [

View file

@ -126,7 +126,7 @@ buildPythonPackage rec {
disabledTestPaths = [
# Don't test docs and examples
"docs_src"
"tests/test_tutorial/test_sql_databases"
"tests/test_tutorial"
# Infinite recursion with strawberry-graphql
"tests/test_tutorial/test_graphql/test_tutorial001.py"
];

View file

@ -114,6 +114,11 @@ buildPythonPackage (finalAttrs: {
"test_multi_server"
"test_server_starts_without_auth"
"test_canonical_multi_client_with_transforms"
# RuntimeError: Attempted to exit a cancel scope that isn't the current tasks's current cancel scope
"test_stateful_proxy"
"test_concurrent_log_requests_no_mixing"
"test_multi_proxies_no_mixing"
]
++ lib.optionals stdenv.hostPlatform.isAarch64 [
# floating point error

View file

@ -2,20 +2,27 @@
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
hatch-vcs,
}:
buildPythonPackage rec {
pname = "flatdict";
version = "4.0.1";
format = "setuptools";
version = "4.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "gmr";
repo = "flatdict";
rev = version;
hash = "sha256-CWsTiCNdIKSQtjpQC07lhZoU1hXT/MGpXdj649x2GlU=";
tag = version;
hash = "sha256-sLeW92F473H90+EMHaIWPt9ETqSeL/DoLmlMAg9Thj4=";
};
build-system = [
hatchling
hatch-vcs
];
pythonImportsCheck = [ "flatdict" ];
meta = {

View file

@ -2,7 +2,7 @@
lib,
buildPythonPackage,
fetchPypi,
setuptools,
setuptools_80,
pytestCheckHook,
}:
@ -16,7 +16,7 @@ buildPythonPackage rec {
hash = "sha256-hbDbETYlMU8PRPP+bvDrJWTWw03S7lZ3tJXRUUK7SXM=";
};
build-system = [ setuptools ];
build-system = [ setuptools_80 ];
nativeCheckInputs = [ pytestCheckHook ];

View file

@ -14,13 +14,13 @@
buildPythonPackage rec {
pname = "google-cloud-artifact-registry";
version = "1.19.0";
version = "1.22.0";
pyproject = true;
src = fetchPypi {
pname = "google_cloud_artifact_registry";
inherit version;
hash = "sha256-QVAy29BzPd9EO4RDKo3kiZqktupkGWDJjd8v6x10mpE=";
hash = "sha256-DoFzqXrmld/PAsgyd6D9V04aOb5AnaY0W5Rb6+V3rZQ=";
};
build-system = [ setuptools ];

View file

@ -20,14 +20,14 @@
buildPythonPackage (finalAttrs: {
pname = "google-cloud-asset";
version = "4.2.0";
version = "4.4.0";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "google-cloud-python";
tag = "google-cloud-asset-v${finalAttrs.version}";
sha256 = "sha256-dVgcnnInqjUjySL7wjxGzI33t1YZJ8e9mSsmjAJ+fBI=";
sha256 = "sha256-M/7uDWWz4YCfxa4gyM9BaAo10iyTMvtR2MhNpdFYnis=";
};
sourceRoot = "${finalAttrs.src.name}/packages/google-cloud-asset";

View file

@ -14,13 +14,13 @@
buildPythonPackage rec {
pname = "google-cloud-dlp";
version = "3.34.0";
version = "3.38.0";
pyproject = true;
src = fetchPypi {
pname = "google_cloud_dlp";
inherit version;
hash = "sha256-bfoxclINWn+ozM5HqWIs3oFfA3tKpvttaZhP1Ze/gAc=";
hash = "sha256-BcdlhL62CzBcE9xRMhp9Aebj7DHd8QXxjVDy+DT3toQ=";
};
build-system = [ setuptools ];

View file

@ -21,14 +21,14 @@
buildPythonPackage (finalAttrs: {
pname = "google-cloud-firestore";
version = "2.27.0";
version = "2.28.0";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "google-cloud-python";
tag = "google-cloud-firestore-v${finalAttrs.version}";
hash = "sha256-hdUT4SRPOL+ArpU4RcsNCUCV3UCW3vQgwtHuxJiyZeU=";
hash = "sha256-dct5yBerIMNQgVIvOWdO9yTxSrH1JDUen6I7CYHftC0=";
};
sourceRoot = "${finalAttrs.src.name}/packages/google-cloud-firestore";
@ -71,6 +71,11 @@ buildPythonPackage (finalAttrs: {
# Test requires credentials
"tests/system/test_pipeline_acceptance.py"
]
++ lib.optionals (pythonOlder "3.14") [
# RuntimeError: There is no current event loop in thread 'MainThread'.
"tests/unit/v1/test_base_client.py::test_baseclient__emulator_channel"
"tests/unit/v1/test_bundle.py::TestAsyncBundle::test_async_query"
]
++ lib.optionals (pythonAtLeast "3.14") [
# RuntimeError: There is no current event loop in thread 'MainThread'
# due to eliding aiounittest

View file

@ -17,14 +17,14 @@
buildPythonPackage rec {
pname = "google-cloud-iam";
version = "2.21.0";
version = "2.24.0";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "google-cloud-python";
tag = "google-cloud-iam-v${version}";
hash = "sha256-dVgcnnInqjUjySL7wjxGzI33t1YZJ8e9mSsmjAJ+fBI=";
hash = "sha256-ywRS1BfK6s+gcU8QRem0cSnfZq4BUQ2ABNcgnOa01LI=";
};
sourceRoot = "${src.name}/packages/google-cloud-iam";

View file

@ -15,14 +15,14 @@
buildPythonPackage rec {
pname = "google-cloud-kms";
version = "3.9.0";
version = "3.14.0";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "google-cloud-python";
tag = "google-cloud-kms-v${version}";
hash = "sha256-JR3fcwCuMZkHyJHnMt4EGvTZZ7MLgQrgxCaTlJZ1zYE=";
hash = "sha256-ywRS1BfK6s+gcU8QRem0cSnfZq4BUQ2ABNcgnOa01LI=";
};
sourceRoot = "${src.name}/packages/google-cloud-kms";

View file

@ -23,13 +23,13 @@
buildPythonPackage rec {
pname = "google-cloud-logging";
version = "3.13.0";
version = "3.16.0";
pyproject = true;
src = fetchPypi {
pname = "google_cloud_logging";
inherit version;
hash = "sha256-Oq4Fc7GhpPWezfRXH054gbWCO9Ep/kaVYcHEmn+opME=";
hash = "sha256-CKMHa48PckIZ1vc7KiQu9p1R6LziJhM66+QaJfI/VAA=";
};
build-system = [ setuptools ];
@ -77,8 +77,6 @@ buildPythonPackage rec {
# Tests require credentials
"tests/system/test_system.py"
"tests/unit/test__gapic.py"
# Exclude performance tests
"tests/performance/test_performance.py"
];
pythonImportsCheck = [
@ -88,8 +86,8 @@ buildPythonPackage rec {
meta = {
description = "Stackdriver Logging API client library";
homepage = "https://github.com/googleapis/python-logging";
changelog = "https://github.com/googleapis/python-logging/blob/v${version}/CHANGELOG.md";
homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-logging";
changelog = "https://github.com/googleapis/google-cloud-python/blob/${version}/packages/google-cloud-logging/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = [ ];
};

View file

@ -15,13 +15,13 @@
buildPythonPackage (finalAttrs: {
pname = "google-cloud-monitoring";
version = "2.30.0";
version = "2.31.0";
pyproject = true;
src = fetchPypi {
pname = "google_cloud_monitoring";
inherit (finalAttrs) version;
hash = "sha256-qVMKqaokbEkIEN+nvjLWfoNA0ZEIrMmcvALR7UlPunY=";
hash = "sha256-tMnTUoyGQ9TrS51ojLs8WRS8X2mzFP98XhtHvcBzqa4=";
};
build-system = [ setuptools ];

View file

@ -19,13 +19,13 @@
buildPythonPackage rec {
pname = "google-cloud-pubsub";
version = "2.34.0";
version = "2.39.0";
pyproject = true;
src = fetchPypi {
pname = "google_cloud_pubsub";
inherit version;
hash = "sha256-JfmMO6FqaYcfnruteuzj/mPIr+e6OSqtIJS+cw1UWXY=";
hash = "sha256-7tZeJfV/lb8+AtltfuFxaIsjkiRx+fIbWpHtkOEoLA8=";
};
build-system = [ setuptools ];

View file

@ -25,16 +25,18 @@
buildPythonPackage rec {
pname = "google-cloud-storage";
version = "3.10.1";
version = "3.12.0";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "python-storage";
tag = "v${version}";
hash = "sha256-pKy1A9RNyRlAn4bXclcdvbfW4kZOP9Z4HqKWwcrDePo=";
repo = "google-cloud-python";
tag = "google-cloud-storage-v${version}";
hash = "sha256-4rmrRvYW9FOpvYY4a+vbDzQRcLXfFHGSCnv7yL6S1FM=";
};
sourceRoot = "${src.name}/packages/google-cloud-storage";
build-system = [ setuptools ];
dependencies = [
@ -94,6 +96,16 @@ buildPythonPackage rec {
"test_update_user_agent_when_default_clientinfo_provided"
"test_update_user_agent_when_none_clientinfo_provided"
"test_update_user_agent_with_existing_user_agent"
"test_403_permission_cache_fallback"
"test_404_on_blob_bucket_deleted"
"test_404_on_blob_but_bucket_exists"
"test_cache_eviction_on_bucket_404"
"test_cache_eviction_on_bucket_delete"
"test_cache_stampede_protection"
"test_disable_bucket_md_env_flag"
"test_lru_bounded_capacity_eviction"
"test_sequential_cache_priming"
"test_sequential_cache_priming_multi_region"
];
disabledTestPaths = [
@ -117,8 +129,8 @@ buildPythonPackage rec {
meta = {
description = "Google Cloud Storage API client library";
homepage = "https://github.com/googleapis/python-storage";
changelog = "https://github.com/googleapis/python-storage/blob/${src.tag}/CHANGELOG.md";
homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-storage";
changelog = "https://github.com/googleapis/google-cloud-python/blob/${src.tag}/packages/google-cloud-storage/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ sarahec ];
};

View file

@ -148,10 +148,11 @@ buildPythonPackage (finalAttrs: {
"-Wignore:fetch_arrow_table:DeprecationWarning"
# DeprecationWarning: fetch_record_batch() is deprecated, use to_arrow_reader() instead.
"-Wignore:fetch_record_batch:DeprecationWarning"
# DeprecationWarning: '_UnionGenericAlias' is deprecated and slated for removal in Python 3.17
# DeprecationWarning: The 'generic' unit for NumPy timedelta is deprecated, and will raise an error in the future. This includes implicit conversion of bare integers (e.g. `+ 1`).Please use a specific unit instead.
"-Wignore::DeprecationWarning"
]
++ lib.optionals (pythonAtLeast "3.14") [
# DeprecationWarning: '_UnionGenericAlias' is deprecated and slated for removal in Python 3.17
"-Wignore::DeprecationWarning"
# Multiple tests with warnings fail without it
"-Wignore::pytest.PytestUnraisableExceptionWarning"
];

View file

@ -79,6 +79,21 @@ buildPythonPackage rec {
"test_write_points_from_dataframe_with_tag_escaped"
# AssertionError: 2 != 1 : <class 'influxdb.tests.helper_test.TestSeriesHelper.testWarnBulkSizeNoEffect.<locals>.WarnBulkSizeNoEffect'> call should have generated one warning.
"testWarnBulkSizeNoEffect"
# Timestamp precision 10^9 vs 10^12
"test_dataframe_write_points_with_whitespace_in_column_names"
"test_dataframe_write_points_with_whitespace_measurement"
"test_write_points_from_dataframe"
"test_write_points_from_dataframe_with_leading_none_column"
"test_write_points_from_dataframe_with_line_of_none"
"test_write_points_from_dataframe_with_nan_line"
"test_write_points_from_dataframe_with_none"
"test_write_points_from_dataframe_with_numeric_column_names"
"test_write_points_from_dataframe_with_period_index"
"test_write_points_from_dataframe_with_tag_cols_and_defaults"
"test_write_points_from_dataframe_with_tag_cols_and_global_tags"
"test_write_points_from_dataframe_with_tag_columns"
"test_write_points_from_dataframe_with_tags_and_nan_line"
"test_write_points_from_dataframe_with_time_precision"
];
pythonImportsCheck = [ "influxdb" ];

View file

@ -3,7 +3,7 @@
buildPythonPackage,
fetchFromGitHub,
libsass,
six,
setuptools_80,
pytestCheckHook,
werkzeug,
}:
@ -11,7 +11,7 @@
buildPythonPackage (finalAttrs: {
pname = "libsass";
version = "0.23.0";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "sass";
@ -20,13 +20,11 @@ buildPythonPackage (finalAttrs: {
hash = "sha256-CiSr9/3EDwpDEzu6VcMBAlm3CtKTmGYbZMnMEjyZVxI=";
};
build-system = [ setuptools_80 ];
buildInputs = [ libsass ];
propagatedBuildInputs = [ six ];
preBuild = ''
export SYSTEM_SASS=true;
'';
env.SYSTEM_SASS = "true";
nativeCheckInputs = [
pytestCheckHook
@ -41,6 +39,7 @@ buildPythonPackage (finalAttrs: {
description = "Python binding for libsass to compile Sass/SCSS";
mainProgram = "pysassc";
homepage = "https://sass.github.io/libsass-python/";
downloadPage = "https://github.com/sass/libsass-python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ sigmanificient ];
};

View file

@ -25,6 +25,7 @@
# tests
opentelemetry-sdk,
pytest-asyncio,
pytestCheckHook,
}:
@ -79,6 +80,7 @@ buildPythonPackage (finalAttrs: {
nativeCheckInputs = [
opentelemetry-sdk
pytest-asyncio
pytestCheckHook
]
++ finalAttrs.passthru.optional-dependencies.agents
@ -87,6 +89,8 @@ buildPythonPackage (finalAttrs: {
disabledTests = [
# AssertionError: <Response [200 OK]> is not an instance of <class 'mistralai.extra.observability.otel.TracedResponse'>
"TestOtelTracing"
# '062f2cad7f1fee8c3e409b73d431e71b' not found in '00-e5d29cde482d5d796428c10d13e86060-468fe44f7efdb086-01'
"test_propagates_sampled_active_span"
];
meta = {

View file

@ -2,13 +2,14 @@
lib,
buildPythonPackage,
fetchPypi,
setuptools_80,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "morfessor";
version = "2.0.6";
format = "setuptools";
pyproject = true;
src = fetchPypi {
pname = "Morfessor";
@ -16,7 +17,13 @@ buildPythonPackage rec {
sha256 = "bb3beac234341724c5f640f65803071f62373a50dba854d5a398567f9aefbab2";
};
checkPhase = "python -m unittest -v morfessor/test/*";
build-system = [ setuptools_80 ];
nativeCheckInputs = [ pytestCheckHook ];
enabledTestPaths = [
"morfessor/test/*"
];
pythonImportsCheck = [ "morfessor" ];

View file

@ -5,8 +5,7 @@
dask,
duckdb,
fetchFromGitHub,
fetchpatch2,
hatchling,
uv-build,
hypothesis,
ibis-framework,
packaging,
@ -24,37 +23,17 @@
buildPythonPackage rec {
pname = "narwhals";
version = "2.16.0";
version = "2.23.0";
pyproject = true;
src = fetchFromGitHub {
owner = "narwhals-dev";
repo = "narwhals";
tag = "v${version}";
hash = "sha256-k7CeM8Q4JgKbkLisAaVrljro4diOf0K0immek6AI0vM=";
hash = "sha256-fT3v7T2S7cmv0tX60kjRBrUq+89TG2/Ar9Qh9O4LP8U=";
};
patches = [
(fetchpatch2 {
name = "fix-dask-deprecationwarning.patch";
url = "https://github.com/narwhals-dev/narwhals/commit/254655af21872e8127f7fee9a9afbfb279f1eda2.patch?full_index=1";
# Exclude unrelated change to non-test code.
includes = [ "pyproject.toml" ];
hash = "sha256-tgz0b08P36CENOYFBILbicHhdB4BytXgFQk3nIxpw0A=";
})
(fetchpatch2 {
name = "fix-dask-deprecationwarning.patch";
url = "https://github.com/narwhals-dev/narwhals/commit/b92d5a840e08bdf7806947ffde27de856900c5ab.patch?full_index=1";
hash = "sha256-2lct6/MfViKnRjpEehNKqF6zdZVIkXi7tYxycDh/Hn8=";
})
(fetchpatch2 {
name = "ignore-polars-deprecation-warning-in-tests.patch";
url = "https://github.com/narwhals-dev/narwhals/commit/fb798716eb5f8835096d8f88d422baae2b22b3ce.patch?full_index=1";
hash = "sha256-pWi0y4S48aADJ1MA3kB9FsLuoA+HfZp5+AgEn69pUuA=";
})
];
build-system = [ hatchling ];
build-system = [ uv-build ];
optional-dependencies = {
# cudf = [ cudf ];
@ -108,6 +87,10 @@ buildPythonPackage rec {
"test_first_expr_broadcasting"
# sqlframe improvements cause strict XPASS failures (tests expected to fail now pass)
"test_unique_expr"
# sqlframe issues
"test_over_quantile"
"test_quantile_expr"
"test_join_duplicate_column_names"
];
disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [

View file

@ -2,7 +2,7 @@
lib,
buildPythonPackage,
fetchPypi,
setuptools,
setuptools_80,
ply,
pytestCheckHook,
}:
@ -18,7 +18,7 @@ buildPythonPackage rec {
hash = "sha256-Cyd3TShfUHo0RYBaBfj7KZj1bXCScPeLiSCLZbDYSRc=";
};
build-system = [ setuptools ];
build-system = [ setuptools_80 ];
dependencies = [ ply ];

View file

@ -16,12 +16,12 @@
buildPythonPackage rec {
pname = "pydeck";
version = "0.9.1";
version = "0.9.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-90R1rmN5UdY/LuWDJnV/jU+c2fKkV89ClQcVAD4stgU=";
hash = "sha256-wQ2QNegerWOFJkysjRlAJHH2hmoVyh998UAPUhQrz4c=";
};
# upstream has an invalid pyproject.toml

View file

@ -1,5 +1,4 @@
{
stdenv,
lib,
buildPythonPackage,
fetchurl,
@ -11,6 +10,7 @@
zlib,
zstd,
icu,
libdeflate,
pytestCheckHook,
setuptools,
cffi,
@ -39,7 +39,8 @@ buildPythonPackage rec {
];
postPatch = ''
substituteInPlace 'src/rpy2/rinterface_lib/embedded.py' --replace '@NIX_R_LIBS_SITE@' "$R_LIBS_SITE"
substituteInPlace 'src/rpy2/rinterface_lib/embedded.py' \
--replace-fail '@NIX_R_LIBS_SITE@' "$R_LIBS_SITE"
'';
buildInputs = [
@ -48,6 +49,7 @@ buildPythonPackage rec {
zlib
zstd
icu
libdeflate
]
++ rWrapper.recommendedPackages;
@ -55,11 +57,14 @@ buildPythonPackage rec {
R # needed at setup time to detect R_HOME (alternatively set R_HOME explicitly)
];
propagatedBuildInputs = [
cffi
build-system = [
setuptools
];
dependencies = [
cffi
];
nativeCheckInputs = [ pytestCheckHook ];
# https://github.com/rpy2/rpy2/issues/1111

View file

@ -1,5 +1,4 @@
{
stdenv,
lib,
buildPythonPackage,
fetchurl,
@ -11,6 +10,7 @@
jinja2,
numpy,
pandas,
setuptools,
tzlocal,
pytestCheckHook,
}:
@ -42,7 +42,9 @@ buildPythonPackage rec {
R # needed at setup time to detect R_HOME (alternatively set R_HOME explicitly)
];
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
ipython
jinja2
numpy
@ -58,6 +60,11 @@ buildPythonPackage rec {
"-Wignore::pytest.PytestRemovedIn9Warning"
];
disabledTests = [
# panda 3.0 type mismatch
"test_ri2pandas"
];
meta = {
homepage = "https://rpy2.github.io/";
description = "Python interface to R";

View file

@ -1,12 +1,11 @@
{
stdenv,
lib,
buildPythonPackage,
fetchPypi,
isPyPy,
rpy2-rinterface,
rpy2-robjects,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
@ -20,7 +19,9 @@ buildPythonPackage rec {
hash = "sha256-8ftGSc59FOk1EzCI3sl82ifrN858xxA4X4HcpVb+jJ8=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
rpy2-rinterface
rpy2-robjects
];

View file

@ -52,6 +52,7 @@ buildPythonPackage (finalAttrs: {
pythonRelaxDeps = [
"cryptography"
"rich"
"sigstore-models"
];

View file

@ -8,6 +8,7 @@
markdown,
setuptools,
setuptools-scm,
typing-extensions,
}:
buildPythonPackage (finalAttrs: {
@ -32,6 +33,7 @@ buildPythonPackage (finalAttrs: {
antlr4-python3-runtime
colorama
markdown
typing-extensions
];
passthru.updateScript = gitUpdater { rev-prefix = "v"; };

View file

@ -50,6 +50,7 @@ buildPythonPackage rec {
pythonRelaxDeps = [
"numpy"
"pandas"
"pyarrow"
];

View file

@ -26,6 +26,12 @@ buildPythonPackage rec {
pytestFlags = [ "--doctest-modules" ];
disabledTests = [
# timestamp precision mismatch
"test_date_types"
"test_stock_date_parsing"
];
pythonImportsCheck = [ "vega_datasets" ];
meta =

View file

@ -23,6 +23,11 @@ buildPythonPackage rec {
patches = lib.optional stdenv.hostPlatform.isMusl ./remove-setlocale-test.patch;
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools >= 78.1.1,< 81" setuptools
'';
build-system = [ setuptools ];
buildInputs = [

View file

@ -2785,6 +2785,8 @@ self: super: with self; {
chardet = callPackage ../development/python-modules/chardet { };
chardet_5 = callPackage ../development/python-modules/chardet/5.nix { };
charset-normalizer = callPackage ../development/python-modules/charset-normalizer { };
chat-downloader = callPackage ../development/python-modules/chat-downloader { };