python3Packages.modal: init at 1.3.5 (#493089)

This commit is contained in:
Nick Cao 2026-03-31 22:44:56 +00:00 committed by GitHub
commit 5a8b7d9cd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 252 additions and 0 deletions

View file

@ -13967,6 +13967,12 @@
githubId = 1778670;
name = "Austin Horstman";
};
Kharacternyk = {
email = "nazar@vinnich.uk";
github = "Kharacternyk";
githubId = 43315801;
name = "Nazar Vinnichuk";
};
khaser = {
email = "a-horohorin@mail.ru";
github = "khaser";

View file

@ -0,0 +1,144 @@
{
lib,
aiohttp,
buildPythonPackage,
cbor2,
certifi,
click,
fastapi,
fetchFromGitHub,
flaky,
grpcio-tools,
grpclib,
httpx,
invoke,
ipython,
mypy,
mypy-protobuf,
protobuf,
pyjwt,
pytest-asyncio,
pytest-env,
pytest-markdown-docs,
pytest-timeout,
pytestCheckHook,
python-dotenv,
rich,
ruff,
setuptools,
six,
synchronicity,
toml,
typer,
types-certifi,
types-toml,
typing-extensions,
watchfiles,
}:
buildPythonPackage (finalAttrs: {
pname = "modal";
version = "1.3.5";
pyproject = true;
src = fetchFromGitHub {
owner = "modal-labs";
repo = "modal-client";
tag = "py/v${finalAttrs.version}";
hash = "sha256-DjCEnQ+H03Ga0My2qHGEEF4Ae5HnmlWNvwL+jLdo0pg=";
};
sourceRoot = "${finalAttrs.src.name}/py";
postPatch = ''
substituteInPlace pyproject.toml --replace-fail 'setuptools~=77.0.3' setuptools
patchShebangs protoc_plugin/plugin.py
inv protoc
inv type-stubs
'';
build-system = [
setuptools
];
nativeBuildInputs = [
invoke
ipython
grpcio-tools
grpclib
synchronicity
mypy-protobuf
ruff
]
++ synchronicity.optional-dependencies.compile;
pythonRelaxDeps = [
"protobuf"
];
dependencies = [
aiohttp
cbor2
certifi
click
grpclib
protobuf
rich
synchronicity
toml
typer
types-certifi
types-toml
typing-extensions
watchfiles
];
nativeCheckInputs = [
fastapi
flaky
httpx
mypy
pyjwt
pytest-asyncio
pytest-env
pytest-markdown-docs
pytest-timeout
pytestCheckHook
python-dotenv
six
];
disabledTestPaths = [
# Fail due to not finding /bin/bash
"test/app_composition_test.py"
"test/cli_shell_test.py"
"test/cli_test.py"
"test/container_test.py"
"test/mounted_files_test.py"
# Needs unpackaged pythonjsonlogger
"test/logging_test.py"
# Matches against error messages of a specific mypy version
"test/static_types_test.py"
# Fails due to "Jupyter is migrating its paths to use standard platformdirs"
"test/notebook_test.py"
];
disabledTests = [
# Non-deterministic
"test_queue_blocking_put"
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "modal" ];
meta = {
description = "Python client library for Modal (serverless compute provider)";
homepage = "https://github.com/modal-labs/modal-client";
changelog = "https://github.com/modal-labs/modal-client/blob/${finalAttrs.src.tag}/py/CHANGELOG.md";
mainProgram = "modal";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ Kharacternyk ];
};
})

View file

@ -0,0 +1,63 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
gevent,
hatchling,
mypy,
pytest-asyncio,
pytest-markdown-docs,
pytestCheckHook,
pythonOlder,
sigtools,
typing-extensions,
}:
buildPythonPackage (finalAttrs: {
pname = "synchronicity";
version = "0.11.1";
pyproject = true;
src = fetchFromGitHub {
owner = "modal-labs";
repo = "synchronicity";
rev = "v${finalAttrs.version}";
hash = "sha256-Uyn4apHILBwjHoMkr52IkcFlaX7jx3WzuzZfvdxcDFo=";
};
build-system = [ hatchling ];
dependencies = [ typing-extensions ];
optional-dependencies.compile = [ sigtools ];
nativeCheckInputs = [
mypy
pytestCheckHook
pytest-asyncio
pytest-markdown-docs
sigtools
]
++ lib.optionals (pythonOlder "3.13") [
gevent
];
disabledTests = [
# Assert execution time, non-deterministic
"test_blocking"
"test_multithreaded"
"test_nowrap"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Assertion error
"test_async"
];
pythonImportsCheck = [ "synchronicity" ];
meta = {
description = "Export blocking and async library versions from a single async implementation";
homepage = "https://github.com/modal-labs/synchronicity";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ Kharacternyk ];
};
})

View file

@ -0,0 +1,33 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "types-certifi";
version = "2021.10.8.3";
pyproject = true;
# Building typeshed subpackages from the GitHub repository requires packaging
# https://github.com/typeshed-internal/stub_uploader
# The switch to fetchFromGitHub can be made at once for all applicable types-*
# packages once stub_uploader is packaged
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-cs93mNFlvAt24cEN0eowl8cGPELCHWZFI7ko6ItVSk8=";
};
build-system = [ setuptools ];
# No tests
doCheck = false;
meta = {
description = "Typing stubs for certifi";
homepage = "https://github.com/python/typeshed";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ Kharacternyk ];
};
})

View file

@ -10094,6 +10094,8 @@ self: super: with self; {
mockupdb = callPackage ../development/python-modules/mockupdb { };
modal = callPackage ../development/python-modules/modal { };
modbus-tk = callPackage ../development/python-modules/modbus-tk { };
moddb = callPackage ../development/python-modules/moddb { };
@ -18837,6 +18839,8 @@ self: super: with self; {
syncer = callPackage ../development/python-modules/syncer { };
synchronicity = callPackage ../development/python-modules/synchronicity { };
syndication-domination = toPythonModule (
pkgs.syndication-domination.override {
enablePython = true;
@ -20233,6 +20237,8 @@ self: super: with self; {
types-beautifulsoup4 = callPackage ../development/python-modules/types-beautifulsoup4 { };
types-certifi = callPackage ../development/python-modules/types-certifi { };
types-click = callPackage ../development/python-modules/types-click { };
types-colorama = callPackage ../development/python-modules/types-colorama { };