[python-updates] 2025-05-18: Python 3.13 (#408185)
This commit is contained in:
@@ -61,7 +61,7 @@ sets are
|
||||
and the aliases
|
||||
|
||||
* `pkgs.python2Packages` pointing to `pkgs.python27Packages`
|
||||
* `pkgs.python3Packages` pointing to `pkgs.python312Packages`
|
||||
* `pkgs.python3Packages` pointing to `pkgs.python313Packages`
|
||||
* `pkgs.pythonPackages` pointing to `pkgs.python2Packages`
|
||||
* `pkgs.pypy2Packages` pointing to `pkgs.pypy27Packages`
|
||||
* `pkgs.pypy3Packages` pointing to `pkgs.pypy310Packages`
|
||||
@@ -583,9 +583,9 @@ are used in [`buildPythonPackage`](#buildpythonpackage-function).
|
||||
|
||||
Several versions of the Python interpreter are available on Nix, as well as a
|
||||
high amount of packages. The attribute `python3` refers to the default
|
||||
interpreter, which is currently CPython 3.12. The attribute `python` refers to
|
||||
interpreter, which is currently CPython 3.13. The attribute `python` refers to
|
||||
CPython 2.7 for backwards-compatibility. It is also possible to refer to
|
||||
specific versions, e.g. `python312` refers to CPython 3.12, and `pypy` refers to
|
||||
specific versions, e.g. `python313` refers to CPython 3.13, and `pypy` refers to
|
||||
the default PyPy interpreter.
|
||||
|
||||
Python is used a lot, and in different ways. This affects also how it is
|
||||
@@ -601,10 +601,10 @@ however, are in separate sets, with one set per interpreter version.
|
||||
The interpreters have several common attributes. One of these attributes is
|
||||
`pkgs`, which is a package set of Python libraries for this specific
|
||||
interpreter. E.g., the `toolz` package corresponding to the default interpreter
|
||||
is `python3.pkgs.toolz`, and the CPython 3.12 version is `python312.pkgs.toolz`.
|
||||
is `python3.pkgs.toolz`, and the CPython 3.13 version is `python313.pkgs.toolz`.
|
||||
The main package set contains aliases to these package sets, e.g.
|
||||
`pythonPackages` refers to `python.pkgs` and `python312Packages` to
|
||||
`python312.pkgs`.
|
||||
`pythonPackages` refers to `python.pkgs` and `python313Packages` to
|
||||
`python313.pkgs`.
|
||||
|
||||
#### Installing Python and packages {#installing-python-and-packages}
|
||||
|
||||
@@ -629,7 +629,7 @@ with [`python.buildEnv`](#python.buildenv-function) or [`python.withPackages`](#
|
||||
executables are wrapped to be able to find each other and all of the modules.
|
||||
|
||||
In the following examples we will start by creating a simple, ad-hoc environment
|
||||
with a nix-shell that has `numpy` and `toolz` in Python 3.12; then we will create
|
||||
with a nix-shell that has `numpy` and `toolz` in Python 3.13; then we will create
|
||||
a re-usable environment in a single-file Python script; then we will create a
|
||||
full Python environment for development with this same environment.
|
||||
|
||||
@@ -645,10 +645,10 @@ temporary shell session with a Python and a *precise* list of packages (plus
|
||||
their runtime dependencies), with no other Python packages in the Python
|
||||
interpreter's scope.
|
||||
|
||||
To create a Python 3.12 session with `numpy` and `toolz` available, run:
|
||||
To create a Python 3.13 session with `numpy` and `toolz` available, run:
|
||||
|
||||
```sh
|
||||
$ nix-shell -p 'python312.withPackages(ps: with ps; [ numpy toolz ])'
|
||||
$ nix-shell -p 'python313.withPackages(ps: with ps; [ numpy toolz ])'
|
||||
```
|
||||
|
||||
By default `nix-shell` will start a `bash` session with this interpreter in our
|
||||
@@ -656,7 +656,7 @@ By default `nix-shell` will start a `bash` session with this interpreter in our
|
||||
|
||||
```Python console
|
||||
[nix-shell:~/src/nixpkgs]$ python3
|
||||
Python 3.12.4 (main, Jun 6 2024, 18:26:44) [GCC 13.3.0] on linux
|
||||
Python 3.13.3 (main, Apr 8 2025, 13:54:08) [GCC 14.2.1 20250322] on linux
|
||||
Type "help", "copyright", "credits" or "license" for more information.
|
||||
>>> import numpy; import toolz
|
||||
```
|
||||
@@ -676,8 +676,8 @@ will still get 1 wrapped Python interpreter. We can start the interpreter
|
||||
directly like so:
|
||||
|
||||
```sh
|
||||
$ nix-shell -p "python312.withPackages (ps: with ps; [ numpy toolz requests ])" --run python3
|
||||
Python 3.12.4 (main, Jun 6 2024, 18:26:44) [GCC 13.3.0] on linux
|
||||
$ nix-shell -p "python313.withPackages (ps: with ps; [ numpy toolz requests ])" --run python3
|
||||
Python 3.13.3 (main, Apr 8 2025, 13:54:08) [GCC 14.2.1 20250322] on linux
|
||||
Type "help", "copyright", "credits" or "license" for more information.
|
||||
>>> import requests
|
||||
>>>
|
||||
@@ -717,7 +717,7 @@ Executing this script requires a `python3` that has `numpy`. Using what we learn
|
||||
in the previous section, we could startup a shell and just run it like so:
|
||||
|
||||
```ShellSession
|
||||
$ nix-shell -p 'python312.withPackages (ps: with ps; [ numpy ])' --run 'python3 foo.py'
|
||||
$ nix-shell -p 'python313.withPackages (ps: with ps; [ numpy ])' --run 'python3 foo.py'
|
||||
The dot product of [1 2] and [3 4] is: 11
|
||||
```
|
||||
|
||||
@@ -780,12 +780,12 @@ create a single script with Python dependencies, but in the course of normal
|
||||
development we're usually working in an entire package repository.
|
||||
|
||||
As explained [in the `nix-shell` section](https://nixos.org/manual/nix/stable/command-ref/nix-shell) of the Nix manual, `nix-shell` can also load an expression from a `.nix` file.
|
||||
Say we want to have Python 3.12, `numpy` and `toolz`, like before,
|
||||
Say we want to have Python 3.13, `numpy` and `toolz`, like before,
|
||||
in an environment. We can add a `shell.nix` file describing our dependencies:
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
(python312.withPackages (
|
||||
(python313.withPackages (
|
||||
ps: with ps; [
|
||||
numpy
|
||||
toolz
|
||||
@@ -804,7 +804,7 @@ What's happening here?
|
||||
imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
|
||||
brings all attributes of `nixpkgs` in the local scope. These attributes form
|
||||
the main package set.
|
||||
2. Then we create a Python 3.12 environment with the [`withPackages`](#python.withpackages-function) function, as before.
|
||||
2. Then we create a Python 3.13 environment with the [`withPackages`](#python.withpackages-function) function, as before.
|
||||
3. The [`withPackages`](#python.withpackages-function) function expects us to provide a function as an argument
|
||||
that takes the set of all Python packages and returns a list of packages to
|
||||
include in the environment. Here, we select the packages `numpy` and `toolz`
|
||||
@@ -815,7 +815,7 @@ To combine this with `mkShell` you can:
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
let
|
||||
pythonEnv = python312.withPackages (ps: [
|
||||
pythonEnv = python313.withPackages (ps: [
|
||||
ps.numpy
|
||||
ps.toolz
|
||||
]);
|
||||
@@ -977,8 +977,8 @@ information. The output of the function is a derivation.
|
||||
|
||||
An expression for `toolz` can be found in the Nixpkgs repository. As explained
|
||||
in the introduction of this Python section, a derivation of `toolz` is available
|
||||
for each interpreter version, e.g. `python312.pkgs.toolz` refers to the `toolz`
|
||||
derivation corresponding to the CPython 3.12 interpreter.
|
||||
for each interpreter version, e.g. `python313.pkgs.toolz` refers to the `toolz`
|
||||
derivation corresponding to the CPython 3.13 interpreter.
|
||||
|
||||
The above example works when you're directly working on
|
||||
`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though,
|
||||
@@ -992,7 +992,7 @@ with import <nixpkgs> { };
|
||||
|
||||
(
|
||||
let
|
||||
my_toolz = python312.pkgs.buildPythonPackage rec {
|
||||
my_toolz = python313.pkgs.buildPythonPackage rec {
|
||||
pname = "toolz";
|
||||
version = "0.10.0";
|
||||
pyproject = true;
|
||||
@@ -1003,7 +1003,7 @@ with import <nixpkgs> { };
|
||||
};
|
||||
|
||||
build-system = [
|
||||
python312.pkgs.setuptools
|
||||
python313.pkgs.setuptools
|
||||
];
|
||||
|
||||
# has no tests
|
||||
@@ -1017,7 +1017,7 @@ with import <nixpkgs> { };
|
||||
};
|
||||
|
||||
in
|
||||
python312.withPackages (
|
||||
python313.withPackages (
|
||||
ps: with ps; [
|
||||
numpy
|
||||
my_toolz
|
||||
@@ -1027,7 +1027,7 @@ with import <nixpkgs> { };
|
||||
```
|
||||
|
||||
Executing `nix-shell` will result in an environment in which you can use
|
||||
Python 3.12 and the `toolz` package. As you can see we had to explicitly mention
|
||||
Python 3.13 and the `toolz` package. As you can see we had to explicitly mention
|
||||
for which Python version we want to build a package.
|
||||
|
||||
So, what did we do here? Well, we took the Nix expression that we used earlier
|
||||
@@ -2130,7 +2130,7 @@ has security implications and is relevant for those using Python in a
|
||||
|
||||
When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will
|
||||
have timestamp 1. The [`buildPythonPackage`](#buildpythonpackage-function) function sets `DETERMINISTIC_BUILD=1`
|
||||
and [PYTHONHASHSEED=0](https://docs.python.org/3.12/using/cmdline.html#envvar-PYTHONHASHSEED).
|
||||
and [PYTHONHASHSEED=0](https://docs.python.org/3.13/using/cmdline.html#envvar-PYTHONHASHSEED).
|
||||
Both are also exported in `nix-shell`.
|
||||
|
||||
### How to provide automatic tests to Python packages? {#automatic-tests}
|
||||
@@ -2179,10 +2179,10 @@ The following rules are desired to be respected:
|
||||
It does not need to be set explicitly unless the package requires a specific platform.
|
||||
* The file is formatted with `nixfmt-rfc-style`.
|
||||
* Commit names of Python libraries must reflect that they are Python
|
||||
libraries (e.g. `python312Packages.numpy: 1.11 -> 1.12` rather than `numpy: 1.11 -> 1.12`).
|
||||
libraries (e.g. `python313Packages.numpy: 1.11 -> 1.12` rather than `numpy: 1.11 -> 1.12`).
|
||||
* The current default version of python should be included
|
||||
in commit messages to enable automatic builds by ofborg.
|
||||
For example `python312Packages.numpy: 1.11 -> 1.12` should be used rather
|
||||
For example `python313Packages.numpy: 1.11 -> 1.12` should be used rather
|
||||
than `python3Packages.numpy: 1.11 -> 1.12`.
|
||||
Note that `pythonPackages` is an alias for `python27Packages`.
|
||||
* Attribute names in `python-packages.nix` as well as `pname`s should match the
|
||||
|
||||
@@ -26,6 +26,8 @@ python3Packages.buildPythonPackage rec {
|
||||
|
||||
build-system = with python3Packages; [ setuptools ];
|
||||
|
||||
pythonRelaxDeps = [ "packaging" ];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
aggregate6
|
||||
jinja2
|
||||
|
||||
@@ -14,14 +14,14 @@ let
|
||||
pname = "awscli";
|
||||
# N.B: if you change this, change botocore and boto3 to a matching version too
|
||||
# check e.g. https://github.com/aws/aws-cli/blob/1.33.21/setup.py
|
||||
version = "1.37.21";
|
||||
version = "1.40.8";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = "aws-cli";
|
||||
tag = version;
|
||||
hash = "sha256-gKRWhOhZjGhPVIG6KgCyDqxuyBGbaS8bHD7vnJ4gA+o=";
|
||||
hash = "sha256-gldyfko4yrpq/U8w87qxRzqXEfUxfCTEjsRO8bPJOAc=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
|
||||
@@ -64,20 +64,20 @@ let
|
||||
in
|
||||
py.pkgs.buildPythonApplication rec {
|
||||
pname = "awscli2";
|
||||
version = "2.27.2"; # N.B: if you change this, check if overrides are still up-to-date
|
||||
version = "2.27.8"; # N.B: if you change this, check if overrides are still up-to-date
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = "aws-cli";
|
||||
tag = version;
|
||||
hash = "sha256-rdgjA6t5L4mNKnyRyNdIyzX6fjMUgbD0YCjresK94Dg=";
|
||||
hash = "sha256-AluBRKB5HKK+8Pb2UooUWqrE48ZNGffkW1z3mLHzVRg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'flit_core>=3.7.1,<3.9.1' 'flit_core>=3.7.1' \
|
||||
--replace-fail 'awscrt==0.25.4' 'awscrt>=0.25.4' \
|
||||
--replace-fail 'awscrt==' 'awscrt>=' \
|
||||
--replace-fail 'cryptography>=40.0.0,<43.0.2' 'cryptography>=43.0.0' \
|
||||
--replace-fail 'distro>=1.5.0,<1.9.0' 'distro>=1.5.0' \
|
||||
--replace-fail 'docutils>=0.10,<0.20' 'docutils>=0.10' \
|
||||
|
||||
@@ -39,6 +39,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
"botocore"
|
||||
"colorama"
|
||||
"pathspec"
|
||||
"packaging"
|
||||
"PyYAML"
|
||||
"six"
|
||||
"termcolor"
|
||||
@@ -53,7 +54,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
fabric
|
||||
pathspec
|
||||
pyyaml
|
||||
future
|
||||
requests
|
||||
semantic-version
|
||||
setuptools
|
||||
|
||||
@@ -43,6 +43,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
url = "https://github.com/yandex/gixy/compare/6f68624a7540ee51316651bda656894dc14c9a3e...b1c6899b3733b619c244368f0121a01be028e8c2.patch";
|
||||
hash = "sha256-6VUF2eQ2Haat/yk8I5qIXhHdG9zLQgEXJMLfe25OKEo=";
|
||||
})
|
||||
./python3.13-compat.patch
|
||||
];
|
||||
|
||||
build-system = [ python.pkgs.setuptools ];
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git a/gixy/core/sre_parse/sre_parse.py b/gixy/core/sre_parse/sre_parse.py
|
||||
index df69044..f90c795 100644
|
||||
--- a/gixy/core/sre_parse/sre_parse.py
|
||||
+++ b/gixy/core/sre_parse/sre_parse.py
|
||||
@@ -14,7 +14,7 @@ from __future__ import print_function
|
||||
|
||||
"""Internal support module for sre"""
|
||||
|
||||
-from sre_constants import *
|
||||
+from gixy.core.sre_parse.sre_constants import *
|
||||
|
||||
SPECIAL_CHARS = ".\\[{()*+?^$|"
|
||||
REPEAT_CHARS = "*+?{"
|
||||
diff --git a/tests/plugins/test_simply.py b/tests/plugins/test_simply.py
|
||||
index 1a33c63..7d5a32f 100644
|
||||
--- a/tests/plugins/test_simply.py
|
||||
+++ b/tests/plugins/test_simply.py
|
||||
@@ -5,6 +5,7 @@ from os import path
|
||||
import json
|
||||
|
||||
from ..utils import *
|
||||
+from gixy.formatters.base import BaseFormatter
|
||||
from gixy.core.manager import Manager as Gixy
|
||||
from gixy.core.plugins_manager import PluginsManager
|
||||
from gixy.core.config import Config
|
||||
@@ -3,7 +3,6 @@
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
fetchpatch,
|
||||
libiconv,
|
||||
testers,
|
||||
nix-update-script,
|
||||
@@ -13,27 +12,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "maturin";
|
||||
version = "1.8.3";
|
||||
version = "1.8.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PyO3";
|
||||
repo = "maturin";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-qMiFHoEm6Q3Pwz8Gv6U75rTKO2Pj81g9rhqdyYJKOys=";
|
||||
hash = "sha256-Dfq8kBg6gk1j/Y1flOb2yw9hhY40n5gi4h08znI2Yw8=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-7YPUTTRo9+aBmVXLq5NfU+t5VPxfEQc4+rdQnPN+AZ0=";
|
||||
|
||||
patches = [
|
||||
# Sorts RECORD file in wheel archives to make them deterministic. See: https://github.com/NixOS/nixpkgs/issues/384708
|
||||
# Remove on next bump https://github.com/PyO3/maturin/pull/2550
|
||||
(fetchpatch {
|
||||
name = "wheel-deterministic-record.patch";
|
||||
url = "https://github.com/PyO3/maturin/commit/bade37e108514f4288c1dd6457119a257bf95db4.patch";
|
||||
hash = "sha256-jcZ/NMHKFYQuOfR+fu5UPykEljUq3l/+ZAx0Tlyu3Zw=";
|
||||
})
|
||||
];
|
||||
cargoHash = "sha256-LDVmNtpu+J8rnSlpTslwm6QcyN6E3ZlVdpmowKc/kZo=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libiconv
|
||||
|
||||
@@ -150,6 +150,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"django-allauth"
|
||||
"redis"
|
||||
];
|
||||
|
||||
dependencies =
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
callPackage,
|
||||
makeSetupHook,
|
||||
valkey,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
makeSetupHook {
|
||||
@@ -13,5 +14,6 @@ makeSetupHook {
|
||||
};
|
||||
passthru.tests = {
|
||||
simple = callPackage ./test.nix { };
|
||||
python3-valkey = python3Packages.valkey;
|
||||
};
|
||||
} ./redis-test-hook.sh
|
||||
|
||||
@@ -7,18 +7,30 @@ redisStart() {
|
||||
redisTestPort=6379
|
||||
fi
|
||||
|
||||
mkdir "$NIX_BUILD_TOP/run"
|
||||
|
||||
if [[ "${REDIS_SOCKET:-}" == "" ]]; then
|
||||
mkdir -p "$NIX_BUILD_TOP/run/"
|
||||
REDIS_SOCKET="$NIX_BUILD_TOP/run/redis.sock"
|
||||
fi
|
||||
export REDIS_SOCKET
|
||||
|
||||
REDIS_CONF="$NIX_BUILD_TOP/run/redis.conf"
|
||||
export REDIS_CONF
|
||||
|
||||
cat <<EOF > "$REDIS_CONF"
|
||||
unixsocket ${REDIS_SOCKET}
|
||||
port ${redisTestPort}
|
||||
protected-mode no
|
||||
enable-debug-command yes
|
||||
enable-module-command yes
|
||||
EOF
|
||||
|
||||
echo 'starting redis'
|
||||
|
||||
# Note about Darwin: unless the output is redirected, the parent process becomes launchd instead of bash.
|
||||
# This would leave the Redis process running in case of a test failure (the postCheckHook would not be executed),
|
||||
# hanging the Nix build forever.
|
||||
@server@ --unixsocket "$REDIS_SOCKET" --port "$redisTestPort" > /dev/null 2>&1 &
|
||||
@server@ "$REDIS_CONF" > /dev/null 2>&1 &
|
||||
REDIS_PID=$!
|
||||
|
||||
echo 'waiting for redis to be ready'
|
||||
|
||||
@@ -0,0 +1,483 @@
|
||||
From 9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e Mon Sep 17 00:00:00 2001
|
||||
From: Serhiy Storchaka <storchaka@gmail.com>
|
||||
Date: Mon, 12 May 2025 20:42:23 +0300
|
||||
Subject: [PATCH] gh-133767: Fix use-after-free in the unicode-escape decoder
|
||||
with an error handler (GH-129648)
|
||||
|
||||
If the error handler is used, a new bytes object is created to set as
|
||||
the object attribute of UnicodeDecodeError, and that bytes object then
|
||||
replaces the original data. A pointer to the decoded data will became invalid
|
||||
after destroying that temporary bytes object. So we need other way to return
|
||||
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().
|
||||
|
||||
_PyBytes_DecodeEscape() does not have such issue, because it does not
|
||||
use the error handlers registry, but it should be changed for compatibility
|
||||
with _PyUnicode_DecodeUnicodeEscapeInternal().
|
||||
---
|
||||
Include/internal/pycore_bytesobject.h | 5 +-
|
||||
Include/internal/pycore_unicodeobject.h | 12 +++--
|
||||
Lib/test/test_codeccallbacks.py | 39 +++++++++++++-
|
||||
Lib/test/test_codecs.py | 52 +++++++++++++++----
|
||||
...-05-09-20-22-54.gh-issue-133767.kN2i3Q.rst | 2 +
|
||||
Objects/bytesobject.c | 41 ++++++++-------
|
||||
Objects/unicodeobject.c | 46 +++++++++-------
|
||||
Parser/string_parser.c | 26 ++++++----
|
||||
8 files changed, 160 insertions(+), 63 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2025-05-09-20-22-54.gh-issue-133767.kN2i3Q.rst
|
||||
|
||||
diff --git a/Include/internal/pycore_bytesobject.h b/Include/internal/pycore_bytesobject.h
|
||||
index 300e7f4896a39e..8ea9b3ebb88454 100644
|
||||
--- a/Include/internal/pycore_bytesobject.h
|
||||
+++ b/Include/internal/pycore_bytesobject.h
|
||||
@@ -20,8 +20,9 @@ extern PyObject* _PyBytes_FromHex(
|
||||
|
||||
// Helper for PyBytes_DecodeEscape that detects invalid escape chars.
|
||||
// Export for test_peg_generator.
|
||||
-PyAPI_FUNC(PyObject*) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
|
||||
- const char *, const char **);
|
||||
+PyAPI_FUNC(PyObject*) _PyBytes_DecodeEscape2(const char *, Py_ssize_t,
|
||||
+ const char *,
|
||||
+ int *, const char **);
|
||||
|
||||
|
||||
// Substring Search.
|
||||
diff --git a/Include/internal/pycore_unicodeobject.h b/Include/internal/pycore_unicodeobject.h
|
||||
index c85d53b89accdb..3791b913c17546 100644
|
||||
--- a/Include/internal/pycore_unicodeobject.h
|
||||
+++ b/Include/internal/pycore_unicodeobject.h
|
||||
@@ -139,14 +139,18 @@ extern PyObject* _PyUnicode_DecodeUnicodeEscapeStateful(
|
||||
// Helper for PyUnicode_DecodeUnicodeEscape that detects invalid escape
|
||||
// chars.
|
||||
// Export for test_peg_generator.
|
||||
-PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeInternal(
|
||||
+PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeInternal2(
|
||||
const char *string, /* Unicode-Escape encoded string */
|
||||
Py_ssize_t length, /* size of string */
|
||||
const char *errors, /* error handling */
|
||||
Py_ssize_t *consumed, /* bytes consumed */
|
||||
- const char **first_invalid_escape); /* on return, points to first
|
||||
- invalid escaped char in
|
||||
- string. */
|
||||
+ int *first_invalid_escape_char, /* on return, if not -1, contain the first
|
||||
+ invalid escaped char (<= 0xff) or invalid
|
||||
+ octal escape (> 0xff) in string. */
|
||||
+ const char **first_invalid_escape_ptr); /* on return, if not NULL, may
|
||||
+ point to the first invalid escaped
|
||||
+ char in string.
|
||||
+ May be NULL if errors is not NULL. */
|
||||
|
||||
/* --- Raw-Unicode-Escape Codecs ---------------------------------------------- */
|
||||
|
||||
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py
|
||||
index 86e5e5c1474674..a767f67a02cf56 100644
|
||||
--- a/Lib/test/test_codeccallbacks.py
|
||||
+++ b/Lib/test/test_codeccallbacks.py
|
||||
@@ -2,6 +2,7 @@
|
||||
import codecs
|
||||
import html.entities
|
||||
import itertools
|
||||
+import re
|
||||
import sys
|
||||
import unicodedata
|
||||
import unittest
|
||||
@@ -1125,7 +1126,7 @@ def test_bug828737(self):
|
||||
text = 'abc<def>ghi'*n
|
||||
text.translate(charmap)
|
||||
|
||||
- def test_mutatingdecodehandler(self):
|
||||
+ def test_mutating_decode_handler(self):
|
||||
baddata = [
|
||||
("ascii", b"\xff"),
|
||||
("utf-7", b"++"),
|
||||
@@ -1160,6 +1161,42 @@ def mutating(exc):
|
||||
for (encoding, data) in baddata:
|
||||
self.assertEqual(data.decode(encoding, "test.mutating"), "\u4242")
|
||||
|
||||
+ def test_mutating_decode_handler_unicode_escape(self):
|
||||
+ decode = codecs.unicode_escape_decode
|
||||
+ def mutating(exc):
|
||||
+ if isinstance(exc, UnicodeDecodeError):
|
||||
+ r = data.get(exc.object[:exc.end])
|
||||
+ if r is not None:
|
||||
+ exc.object = r[0] + exc.object[exc.end:]
|
||||
+ return ('\u0404', r[1])
|
||||
+ raise AssertionError("don't know how to handle %r" % exc)
|
||||
+
|
||||
+ codecs.register_error('test.mutating2', mutating)
|
||||
+ data = {
|
||||
+ br'\x0': (b'\\', 0),
|
||||
+ br'\x3': (b'xxx\\', 3),
|
||||
+ br'\x5': (b'x\\', 1),
|
||||
+ }
|
||||
+ def check(input, expected, msg):
|
||||
+ with self.assertWarns(DeprecationWarning) as cm:
|
||||
+ self.assertEqual(decode(input, 'test.mutating2'), (expected, len(input)))
|
||||
+ self.assertIn(msg, str(cm.warning))
|
||||
+
|
||||
+ check(br'\x0n\z', '\u0404\n\\z', r'"\z" is an invalid escape sequence')
|
||||
+ check(br'\x0n\501', '\u0404\n\u0141', r'"\501" is an invalid octal escape sequence')
|
||||
+ check(br'\x0z', '\u0404\\z', r'"\z" is an invalid escape sequence')
|
||||
+
|
||||
+ check(br'\x3n\zr', '\u0404\n\\zr', r'"\z" is an invalid escape sequence')
|
||||
+ check(br'\x3zr', '\u0404\\zr', r'"\z" is an invalid escape sequence')
|
||||
+ check(br'\x3z5', '\u0404\\z5', r'"\z" is an invalid escape sequence')
|
||||
+ check(memoryview(br'\x3z5x')[:-1], '\u0404\\z5', r'"\z" is an invalid escape sequence')
|
||||
+ check(memoryview(br'\x3z5xy')[:-2], '\u0404\\z5', r'"\z" is an invalid escape sequence')
|
||||
+
|
||||
+ check(br'\x5n\z', '\u0404\n\\z', r'"\z" is an invalid escape sequence')
|
||||
+ check(br'\x5n\501', '\u0404\n\u0141', r'"\501" is an invalid octal escape sequence')
|
||||
+ check(br'\x5z', '\u0404\\z', r'"\z" is an invalid escape sequence')
|
||||
+ check(memoryview(br'\x5zy')[:-1], '\u0404\\z', r'"\z" is an invalid escape sequence')
|
||||
+
|
||||
# issue32583
|
||||
def test_crashing_decode_handler(self):
|
||||
# better generating one more character to fill the extra space slot
|
||||
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
|
||||
index 94fcf98e75721f..d42270da15ee32 100644
|
||||
--- a/Lib/test/test_codecs.py
|
||||
+++ b/Lib/test/test_codecs.py
|
||||
@@ -1196,23 +1196,39 @@ def test_escape(self):
|
||||
check(br"[\1010]", b"[A0]")
|
||||
check(br"[\x41]", b"[A]")
|
||||
check(br"[\x410]", b"[A0]")
|
||||
+
|
||||
+ def test_warnings(self):
|
||||
+ decode = codecs.escape_decode
|
||||
+ check = coding_checker(self, decode)
|
||||
for i in range(97, 123):
|
||||
b = bytes([i])
|
||||
if b not in b'abfnrtvx':
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\%c" is an invalid escape sequence' % i):
|
||||
check(b"\\" + b, b"\\" + b)
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\%c" is an invalid escape sequence' % (i-32)):
|
||||
check(b"\\" + b.upper(), b"\\" + b.upper())
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\8" is an invalid escape sequence'):
|
||||
check(br"\8", b"\\8")
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
check(br"\9", b"\\9")
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\\xfa" is an invalid escape sequence') as cm:
|
||||
check(b"\\\xfa", b"\\\xfa")
|
||||
for i in range(0o400, 0o1000):
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\%o" is an invalid octal escape sequence' % i):
|
||||
check(rb'\%o' % i, bytes([i & 0o377]))
|
||||
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\z" is an invalid escape sequence'):
|
||||
+ self.assertEqual(decode(br'\x\z', 'ignore'), (b'\\z', 4))
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\501" is an invalid octal escape sequence'):
|
||||
+ self.assertEqual(decode(br'\x\501', 'ignore'), (b'A', 6))
|
||||
+
|
||||
def test_errors(self):
|
||||
decode = codecs.escape_decode
|
||||
self.assertRaises(ValueError, decode, br"\x")
|
||||
@@ -2661,24 +2677,40 @@ def test_escape_decode(self):
|
||||
check(br"[\x410]", "[A0]")
|
||||
check(br"\u20ac", "\u20ac")
|
||||
check(br"\U0001d120", "\U0001d120")
|
||||
+
|
||||
+ def test_decode_warnings(self):
|
||||
+ decode = codecs.unicode_escape_decode
|
||||
+ check = coding_checker(self, decode)
|
||||
for i in range(97, 123):
|
||||
b = bytes([i])
|
||||
if b not in b'abfnrtuvx':
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\%c" is an invalid escape sequence' % i):
|
||||
check(b"\\" + b, "\\" + chr(i))
|
||||
if b.upper() not in b'UN':
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\%c" is an invalid escape sequence' % (i-32)):
|
||||
check(b"\\" + b.upper(), "\\" + chr(i-32))
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\8" is an invalid escape sequence'):
|
||||
check(br"\8", "\\8")
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
check(br"\9", "\\9")
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\\xfa" is an invalid escape sequence') as cm:
|
||||
check(b"\\\xfa", "\\\xfa")
|
||||
for i in range(0o400, 0o1000):
|
||||
- with self.assertWarns(DeprecationWarning):
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\%o" is an invalid octal escape sequence' % i):
|
||||
check(rb'\%o' % i, chr(i))
|
||||
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\z" is an invalid escape sequence'):
|
||||
+ self.assertEqual(decode(br'\x\z', 'ignore'), ('\\z', 4))
|
||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||
+ r'"\\501" is an invalid octal escape sequence'):
|
||||
+ self.assertEqual(decode(br'\x\501', 'ignore'), ('\u0141', 6))
|
||||
+
|
||||
def test_decode_errors(self):
|
||||
decode = codecs.unicode_escape_decode
|
||||
for c, d in (b'x', 2), (b'u', 4), (b'U', 4):
|
||||
diff --git a/Misc/NEWS.d/next/Security/2025-05-09-20-22-54.gh-issue-133767.kN2i3Q.rst b/Misc/NEWS.d/next/Security/2025-05-09-20-22-54.gh-issue-133767.kN2i3Q.rst
|
||||
new file mode 100644
|
||||
index 00000000000000..39d2f1e1a892cf
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2025-05-09-20-22-54.gh-issue-133767.kN2i3Q.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Fix use-after-free in the "unicode-escape" decoder with a non-"strict" error
|
||||
+handler.
|
||||
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
|
||||
index fc407ec6bf99d6..87ea1162e03513 100644
|
||||
--- a/Objects/bytesobject.c
|
||||
+++ b/Objects/bytesobject.c
|
||||
@@ -1075,10 +1075,11 @@ _PyBytes_FormatEx(const char *format, Py_ssize_t format_len,
|
||||
}
|
||||
|
||||
/* Unescape a backslash-escaped string. */
|
||||
-PyObject *_PyBytes_DecodeEscape(const char *s,
|
||||
+PyObject *_PyBytes_DecodeEscape2(const char *s,
|
||||
Py_ssize_t len,
|
||||
const char *errors,
|
||||
- const char **first_invalid_escape)
|
||||
+ int *first_invalid_escape_char,
|
||||
+ const char **first_invalid_escape_ptr)
|
||||
{
|
||||
int c;
|
||||
char *p;
|
||||
@@ -1092,7 +1093,8 @@ PyObject *_PyBytes_DecodeEscape(const char *s,
|
||||
return NULL;
|
||||
writer.overallocate = 1;
|
||||
|
||||
- *first_invalid_escape = NULL;
|
||||
+ *first_invalid_escape_char = -1;
|
||||
+ *first_invalid_escape_ptr = NULL;
|
||||
|
||||
end = s + len;
|
||||
while (s < end) {
|
||||
@@ -1130,9 +1132,10 @@ PyObject *_PyBytes_DecodeEscape(const char *s,
|
||||
c = (c<<3) + *s++ - '0';
|
||||
}
|
||||
if (c > 0377) {
|
||||
- if (*first_invalid_escape == NULL) {
|
||||
- *first_invalid_escape = s-3; /* Back up 3 chars, since we've
|
||||
- already incremented s. */
|
||||
+ if (*first_invalid_escape_char == -1) {
|
||||
+ *first_invalid_escape_char = c;
|
||||
+ /* Back up 3 chars, since we've already incremented s. */
|
||||
+ *first_invalid_escape_ptr = s - 3;
|
||||
}
|
||||
}
|
||||
*p++ = c;
|
||||
@@ -1173,9 +1176,10 @@ PyObject *_PyBytes_DecodeEscape(const char *s,
|
||||
break;
|
||||
|
||||
default:
|
||||
- if (*first_invalid_escape == NULL) {
|
||||
- *first_invalid_escape = s-1; /* Back up one char, since we've
|
||||
- already incremented s. */
|
||||
+ if (*first_invalid_escape_char == -1) {
|
||||
+ *first_invalid_escape_char = (unsigned char)s[-1];
|
||||
+ /* Back up one char, since we've already incremented s. */
|
||||
+ *first_invalid_escape_ptr = s - 1;
|
||||
}
|
||||
*p++ = '\\';
|
||||
s--;
|
||||
@@ -1195,18 +1199,19 @@ PyObject *PyBytes_DecodeEscape(const char *s,
|
||||
Py_ssize_t Py_UNUSED(unicode),
|
||||
const char *Py_UNUSED(recode_encoding))
|
||||
{
|
||||
- const char* first_invalid_escape;
|
||||
- PyObject *result = _PyBytes_DecodeEscape(s, len, errors,
|
||||
- &first_invalid_escape);
|
||||
+ int first_invalid_escape_char;
|
||||
+ const char *first_invalid_escape_ptr;
|
||||
+ PyObject *result = _PyBytes_DecodeEscape2(s, len, errors,
|
||||
+ &first_invalid_escape_char,
|
||||
+ &first_invalid_escape_ptr);
|
||||
if (result == NULL)
|
||||
return NULL;
|
||||
- if (first_invalid_escape != NULL) {
|
||||
- unsigned char c = *first_invalid_escape;
|
||||
- if ('4' <= c && c <= '7') {
|
||||
+ if (first_invalid_escape_char != -1) {
|
||||
+ if (first_invalid_escape_char > 0xff) {
|
||||
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
|
||||
- "b\"\\%.3s\" is an invalid octal escape sequence. "
|
||||
+ "b\"\\%o\" is an invalid octal escape sequence. "
|
||||
"Such sequences will not work in the future. ",
|
||||
- first_invalid_escape) < 0)
|
||||
+ first_invalid_escape_char) < 0)
|
||||
{
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
@@ -1216,7 +1221,7 @@ PyObject *PyBytes_DecodeEscape(const char *s,
|
||||
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
|
||||
"b\"\\%c\" is an invalid escape sequence. "
|
||||
"Such sequences will not work in the future. ",
|
||||
- c) < 0)
|
||||
+ first_invalid_escape_char) < 0)
|
||||
{
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
|
||||
index f3f0c9646a652e..cd26494ad8f1d6 100644
|
||||
--- a/Objects/unicodeobject.c
|
||||
+++ b/Objects/unicodeobject.c
|
||||
@@ -6596,13 +6596,15 @@ _PyUnicode_GetNameCAPI(void)
|
||||
/* --- Unicode Escape Codec ----------------------------------------------- */
|
||||
|
||||
PyObject *
|
||||
-_PyUnicode_DecodeUnicodeEscapeInternal(const char *s,
|
||||
+_PyUnicode_DecodeUnicodeEscapeInternal2(const char *s,
|
||||
Py_ssize_t size,
|
||||
const char *errors,
|
||||
Py_ssize_t *consumed,
|
||||
- const char **first_invalid_escape)
|
||||
+ int *first_invalid_escape_char,
|
||||
+ const char **first_invalid_escape_ptr)
|
||||
{
|
||||
const char *starts = s;
|
||||
+ const char *initial_starts = starts;
|
||||
_PyUnicodeWriter writer;
|
||||
const char *end;
|
||||
PyObject *errorHandler = NULL;
|
||||
@@ -6610,7 +6612,8 @@ _PyUnicode_DecodeUnicodeEscapeInternal(const char *s,
|
||||
_PyUnicode_Name_CAPI *ucnhash_capi;
|
||||
|
||||
// so we can remember if we've seen an invalid escape char or not
|
||||
- *first_invalid_escape = NULL;
|
||||
+ *first_invalid_escape_char = -1;
|
||||
+ *first_invalid_escape_ptr = NULL;
|
||||
|
||||
if (size == 0) {
|
||||
if (consumed) {
|
||||
@@ -6698,9 +6701,12 @@ _PyUnicode_DecodeUnicodeEscapeInternal(const char *s,
|
||||
}
|
||||
}
|
||||
if (ch > 0377) {
|
||||
- if (*first_invalid_escape == NULL) {
|
||||
- *first_invalid_escape = s-3; /* Back up 3 chars, since we've
|
||||
- already incremented s. */
|
||||
+ if (*first_invalid_escape_char == -1) {
|
||||
+ *first_invalid_escape_char = ch;
|
||||
+ if (starts == initial_starts) {
|
||||
+ /* Back up 3 chars, since we've already incremented s. */
|
||||
+ *first_invalid_escape_ptr = s - 3;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
WRITE_CHAR(ch);
|
||||
@@ -6795,9 +6801,12 @@ _PyUnicode_DecodeUnicodeEscapeInternal(const char *s,
|
||||
goto error;
|
||||
|
||||
default:
|
||||
- if (*first_invalid_escape == NULL) {
|
||||
- *first_invalid_escape = s-1; /* Back up one char, since we've
|
||||
- already incremented s. */
|
||||
+ if (*first_invalid_escape_char == -1) {
|
||||
+ *first_invalid_escape_char = c;
|
||||
+ if (starts == initial_starts) {
|
||||
+ /* Back up one char, since we've already incremented s. */
|
||||
+ *first_invalid_escape_ptr = s - 1;
|
||||
+ }
|
||||
}
|
||||
WRITE_ASCII_CHAR('\\');
|
||||
WRITE_CHAR(c);
|
||||
@@ -6842,19 +6851,20 @@ _PyUnicode_DecodeUnicodeEscapeStateful(const char *s,
|
||||
const char *errors,
|
||||
Py_ssize_t *consumed)
|
||||
{
|
||||
- const char *first_invalid_escape;
|
||||
- PyObject *result = _PyUnicode_DecodeUnicodeEscapeInternal(s, size, errors,
|
||||
+ int first_invalid_escape_char;
|
||||
+ const char *first_invalid_escape_ptr;
|
||||
+ PyObject *result = _PyUnicode_DecodeUnicodeEscapeInternal2(s, size, errors,
|
||||
consumed,
|
||||
- &first_invalid_escape);
|
||||
+ &first_invalid_escape_char,
|
||||
+ &first_invalid_escape_ptr);
|
||||
if (result == NULL)
|
||||
return NULL;
|
||||
- if (first_invalid_escape != NULL) {
|
||||
- unsigned char c = *first_invalid_escape;
|
||||
- if ('4' <= c && c <= '7') {
|
||||
+ if (first_invalid_escape_char != -1) {
|
||||
+ if (first_invalid_escape_char > 0xff) {
|
||||
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
|
||||
- "\"\\%.3s\" is an invalid octal escape sequence. "
|
||||
+ "\"\\%o\" is an invalid octal escape sequence. "
|
||||
"Such sequences will not work in the future. ",
|
||||
- first_invalid_escape) < 0)
|
||||
+ first_invalid_escape_char) < 0)
|
||||
{
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
@@ -6864,7 +6874,7 @@ _PyUnicode_DecodeUnicodeEscapeStateful(const char *s,
|
||||
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
|
||||
"\"\\%c\" is an invalid escape sequence. "
|
||||
"Such sequences will not work in the future. ",
|
||||
- c) < 0)
|
||||
+ first_invalid_escape_char) < 0)
|
||||
{
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
diff --git a/Parser/string_parser.c b/Parser/string_parser.c
|
||||
index d3631b114c5a3c..ebe68989d1af58 100644
|
||||
--- a/Parser/string_parser.c
|
||||
+++ b/Parser/string_parser.c
|
||||
@@ -196,15 +196,18 @@ decode_unicode_with_escapes(Parser *parser, const char *s, size_t len, Token *t)
|
||||
len = (size_t)(p - buf);
|
||||
s = buf;
|
||||
|
||||
- const char *first_invalid_escape;
|
||||
- v = _PyUnicode_DecodeUnicodeEscapeInternal(s, (Py_ssize_t)len, NULL, NULL, &first_invalid_escape);
|
||||
+ int first_invalid_escape_char;
|
||||
+ const char *first_invalid_escape_ptr;
|
||||
+ v = _PyUnicode_DecodeUnicodeEscapeInternal2(s, (Py_ssize_t)len, NULL, NULL,
|
||||
+ &first_invalid_escape_char,
|
||||
+ &first_invalid_escape_ptr);
|
||||
|
||||
// HACK: later we can simply pass the line no, since we don't preserve the tokens
|
||||
// when we are decoding the string but we preserve the line numbers.
|
||||
- if (v != NULL && first_invalid_escape != NULL && t != NULL) {
|
||||
- if (warn_invalid_escape_sequence(parser, s, first_invalid_escape, t) < 0) {
|
||||
- /* We have not decref u before because first_invalid_escape points
|
||||
- inside u. */
|
||||
+ if (v != NULL && first_invalid_escape_ptr != NULL && t != NULL) {
|
||||
+ if (warn_invalid_escape_sequence(parser, s, first_invalid_escape_ptr, t) < 0) {
|
||||
+ /* We have not decref u before because first_invalid_escape_ptr
|
||||
+ points inside u. */
|
||||
Py_XDECREF(u);
|
||||
Py_DECREF(v);
|
||||
return NULL;
|
||||
@@ -217,14 +220,17 @@ decode_unicode_with_escapes(Parser *parser, const char *s, size_t len, Token *t)
|
||||
static PyObject *
|
||||
decode_bytes_with_escapes(Parser *p, const char *s, Py_ssize_t len, Token *t)
|
||||
{
|
||||
- const char *first_invalid_escape;
|
||||
- PyObject *result = _PyBytes_DecodeEscape(s, len, NULL, &first_invalid_escape);
|
||||
+ int first_invalid_escape_char;
|
||||
+ const char *first_invalid_escape_ptr;
|
||||
+ PyObject *result = _PyBytes_DecodeEscape2(s, len, NULL,
|
||||
+ &first_invalid_escape_char,
|
||||
+ &first_invalid_escape_ptr);
|
||||
if (result == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (first_invalid_escape != NULL) {
|
||||
- if (warn_invalid_escape_sequence(p, s, first_invalid_escape, t) < 0) {
|
||||
+ if (first_invalid_escape_ptr != NULL) {
|
||||
+ if (warn_invalid_escape_sequence(p, s, first_invalid_escape_ptr, t) < 0) {
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
From 6204ab9f989be3841c8c47e1e2cfe6a658fe16d5 Mon Sep 17 00:00:00 2001
|
||||
From: Seth Michael Larson <seth@python.org>
|
||||
Date: Tue, 28 Jan 2025 14:09:00 -0600
|
||||
Subject: [PATCH 1/4] gh-105704: Disallow square brackets ( and ) in domain
|
||||
names for parsed URLs
|
||||
|
||||
---
|
||||
Lib/test/test_urlparse.py | 14 +++++++++++++
|
||||
Lib/urllib/parse.py | 20 +++++++++++++++++--
|
||||
...-01-28-14-08-03.gh-issue-105704.EnhHxu.rst | 4 ++++
|
||||
3 files changed, 36 insertions(+), 2 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
|
||||
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
|
||||
index 4516bdea6adb19..0f15a0998ff2ea 100644
|
||||
--- a/Lib/test/test_urlparse.py
|
||||
+++ b/Lib/test/test_urlparse.py
|
||||
@@ -1412,6 +1412,20 @@ def test_invalid_bracketed_hosts(self):
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'Scheme://user@[0439:23af::2309::fae7:1234]/Path?Query')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'Scheme://user@[0439:23af:2309::fae7:1234:2342:438e:192.0.2.146]/Path?Query')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'Scheme://user@]v6a.ip[/Path')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip]')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip].suffix')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip]/')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip].suffix/')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip]?')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip].suffix?')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]/')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix/')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]?')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix?')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@prefix.[v6a.ip]')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@[v6a.ip].suffix')
|
||||
|
||||
def test_splitting_bracketed_hosts(self):
|
||||
p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]/path?query')
|
||||
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
|
||||
index c412c729852272..9d51f4c6812b57 100644
|
||||
--- a/Lib/urllib/parse.py
|
||||
+++ b/Lib/urllib/parse.py
|
||||
@@ -439,6 +439,23 @@ def _checknetloc(netloc):
|
||||
raise ValueError("netloc '" + netloc + "' contains invalid " +
|
||||
"characters under NFKC normalization")
|
||||
|
||||
+def _check_bracketed_netloc(netloc):
|
||||
+ # Note that this function must mirror the splitting
|
||||
+ # done in NetlocResultMixins._hostinfo().
|
||||
+ hostname_and_port = netloc.rpartition('@')[2]
|
||||
+ before_bracket, have_open_br, bracketed = hostname_and_port.partition('[')
|
||||
+ if have_open_br:
|
||||
+ # No data is allowed before a bracket.
|
||||
+ if before_bracket:
|
||||
+ raise ValueError("Invalid IPv6 URL")
|
||||
+ hostname, _, port = bracketed.partition(']')
|
||||
+ # No data is allowed after the bracket but before the port delimiter.
|
||||
+ if port and not port.startswith(":"):
|
||||
+ raise ValueError("Invalid IPv6 URL")
|
||||
+ else:
|
||||
+ hostname, _, port = hostname_and_port.partition(':')
|
||||
+ _check_bracketed_host(hostname)
|
||||
+
|
||||
# Valid bracketed hosts are defined in
|
||||
# https://www.rfc-editor.org/rfc/rfc3986#page-49 and https://url.spec.whatwg.org/
|
||||
def _check_bracketed_host(hostname):
|
||||
@@ -505,8 +522,7 @@ def _urlsplit(url, scheme=None, allow_fragments=True):
|
||||
(']' in netloc and '[' not in netloc)):
|
||||
raise ValueError("Invalid IPv6 URL")
|
||||
if '[' in netloc and ']' in netloc:
|
||||
- bracketed_host = netloc.partition('[')[2].partition(']')[0]
|
||||
- _check_bracketed_host(bracketed_host)
|
||||
+ _check_bracketed_netloc(netloc)
|
||||
if allow_fragments and '#' in url:
|
||||
url, fragment = url.split('#', 1)
|
||||
if '?' in url:
|
||||
diff --git a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
new file mode 100644
|
||||
index 00000000000000..aaeac71678de87
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
@@ -0,0 +1,4 @@
|
||||
+When using ``urllib.parse.urlsplit()`` and ``urlparse()`` host parsing would
|
||||
+not reject domain names containing square brackets (``[`` and ``]``). Square
|
||||
+brackets are only valid for IPv6 and IPvFuture hosts according to `RFC 3986
|
||||
+Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
|
||||
|
||||
From 3ab35e8d890e2c5d4e6b0c0299f94775a3ded9ae Mon Sep 17 00:00:00 2001
|
||||
From: Seth Michael Larson <sethmichaellarson@gmail.com>
|
||||
Date: Thu, 30 Jan 2025 09:50:14 -0600
|
||||
Subject: [PATCH 2/4] Use Sphinx references
|
||||
|
||||
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
||||
---
|
||||
.../Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
index aaeac71678de87..fb8674f558db59 100644
|
||||
--- a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
+++ b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
@@ -1,4 +1,4 @@
|
||||
-When using ``urllib.parse.urlsplit()`` and ``urlparse()`` host parsing would
|
||||
+When using :func:`urllib.parse.urlsplit()` and :func:`urllib.parse.urlparse()` host parsing would
|
||||
not reject domain names containing square brackets (``[`` and ``]``). Square
|
||||
brackets are only valid for IPv6 and IPvFuture hosts according to `RFC 3986
|
||||
Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
|
||||
|
||||
From ebf92bb4d323d41778e5de6df177b26f18ecf7f9 Mon Sep 17 00:00:00 2001
|
||||
From: Seth Michael Larson <seth@python.org>
|
||||
Date: Thu, 30 Jan 2025 11:10:35 -0600
|
||||
Subject: [PATCH 3/4] Add mismatched bracket test cases, fix news format
|
||||
|
||||
---
|
||||
Lib/test/test_urlparse.py | 10 ++++++++++
|
||||
.../2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst | 8 ++++----
|
||||
2 files changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
|
||||
index 0f15a0998ff2ea..f8ce61b2b49621 100644
|
||||
--- a/Lib/test/test_urlparse.py
|
||||
+++ b/Lib/test/test_urlparse.py
|
||||
@@ -1426,6 +1426,16 @@ def test_invalid_bracketed_hosts(self):
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix?')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@prefix.[v6a.ip]')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@[v6a.ip].suffix')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip]')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://]v6a.ip[')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://]v6a.ip')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip[')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip].suffix')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix]v6a.ip[suffix')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix]v6a.ip')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip[suffix')
|
||||
|
||||
def test_splitting_bracketed_hosts(self):
|
||||
p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]/path?query')
|
||||
diff --git a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
index fb8674f558db59..bff1bc6b0d609c 100644
|
||||
--- a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
+++ b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
|
||||
@@ -1,4 +1,4 @@
|
||||
-When using :func:`urllib.parse.urlsplit()` and :func:`urllib.parse.urlparse()` host parsing would
|
||||
-not reject domain names containing square brackets (``[`` and ``]``). Square
|
||||
-brackets are only valid for IPv6 and IPvFuture hosts according to `RFC 3986
|
||||
-Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
|
||||
+When using :func:`urllib.parse.urlsplit` and :func:`urllib.parse.urlparse` host
|
||||
+parsing would not reject domain names containing square brackets (``[`` and
|
||||
+``]``). Square brackets are only valid for IPv6 and IPvFuture hosts according to
|
||||
+`RFC 3986 Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
|
||||
|
||||
From 2817b2e29c8b28a24f9eb97abce1e1b60b1162fa Mon Sep 17 00:00:00 2001
|
||||
From: Seth Michael Larson <seth@python.org>
|
||||
Date: Thu, 30 Jan 2025 13:01:19 -0600
|
||||
Subject: [PATCH 4/4] Add more test coverage for ports
|
||||
|
||||
---
|
||||
Lib/test/test_urlparse.py | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
|
||||
index f8ce61b2b49621..b51cc006b73280 100644
|
||||
--- a/Lib/test/test_urlparse.py
|
||||
+++ b/Lib/test/test_urlparse.py
|
||||
@@ -1424,6 +1424,15 @@ def test_invalid_bracketed_hosts(self):
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix/')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]?')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix?')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:a')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:a')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:a1')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:a1')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:1a')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:1a')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:/')
|
||||
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:?')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@prefix.[v6a.ip]')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@[v6a.ip].suffix')
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip')
|
||||
@@ -1438,14 +1447,16 @@ def test_invalid_bracketed_hosts(self):
|
||||
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip[suffix')
|
||||
|
||||
def test_splitting_bracketed_hosts(self):
|
||||
- p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]/path?query')
|
||||
+ p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]:1234/path?query')
|
||||
self.assertEqual(p1.hostname, 'v6a.ip')
|
||||
self.assertEqual(p1.username, 'user')
|
||||
self.assertEqual(p1.path, '/path')
|
||||
+ self.assertEqual(p1.port, 1234)
|
||||
p2 = urllib.parse.urlsplit('scheme://user@[0439:23af:2309::fae7%test]/path?query')
|
||||
self.assertEqual(p2.hostname, '0439:23af:2309::fae7%test')
|
||||
self.assertEqual(p2.username, 'user')
|
||||
self.assertEqual(p2.path, '/path')
|
||||
+ self.assertIs(p2.port, None)
|
||||
p3 = urllib.parse.urlsplit('scheme://user@[0439:23af:2309::fae7:1234:192.0.2.146%test]/path?query')
|
||||
self.assertEqual(p3.hostname, '0439:23af:2309::fae7:1234:192.0.2.146%test')
|
||||
self.assertEqual(p3.username, 'user')
|
||||
@@ -17,14 +17,14 @@
|
||||
passthruFun = import ./passthrufun.nix args;
|
||||
|
||||
sources = {
|
||||
python312 = {
|
||||
python313 = {
|
||||
sourceVersion = {
|
||||
major = "3";
|
||||
minor = "12";
|
||||
patch = "10";
|
||||
minor = "13";
|
||||
patch = "3";
|
||||
suffix = "";
|
||||
};
|
||||
hash = "sha256-B6tpdHRZXgbwZkdBfTx/qX3tB6/Bp+RFTFY5kZtG6uo=";
|
||||
hash = "sha256-QPhovL3rgUmjFJWAu5v9QHszIc1I8L5jGvlVrJLA4EE=";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -67,26 +67,26 @@
|
||||
inherit passthruFun;
|
||||
};
|
||||
|
||||
python312 = callPackage ./cpython (
|
||||
{
|
||||
self = __splicedPackages.python312;
|
||||
inherit passthruFun;
|
||||
}
|
||||
// sources.python312
|
||||
);
|
||||
|
||||
python313 = callPackage ./cpython {
|
||||
self = __splicedPackages.python313;
|
||||
python312 = callPackage ./cpython {
|
||||
self = __splicedPackages.python312;
|
||||
sourceVersion = {
|
||||
major = "3";
|
||||
minor = "13";
|
||||
patch = "3";
|
||||
minor = "12";
|
||||
patch = "10";
|
||||
suffix = "";
|
||||
};
|
||||
hash = "sha256-QPhovL3rgUmjFJWAu5v9QHszIc1I8L5jGvlVrJLA4EE=";
|
||||
hash = "sha256-B6tpdHRZXgbwZkdBfTx/qX3tB6/Bp+RFTFY5kZtG6uo=";
|
||||
inherit passthruFun;
|
||||
};
|
||||
|
||||
python313 = callPackage ./cpython (
|
||||
{
|
||||
self = __splicedPackages.python313;
|
||||
inherit passthruFun;
|
||||
}
|
||||
// sources.python313
|
||||
);
|
||||
|
||||
python314 = callPackage ./cpython {
|
||||
self = __splicedPackages.python314;
|
||||
sourceVersion = {
|
||||
@@ -139,7 +139,7 @@
|
||||
"libffi"
|
||||
];
|
||||
}
|
||||
// sources.python312
|
||||
// sources.python313
|
||||
)).overrideAttrs
|
||||
(old: {
|
||||
# TODO(@Artturin): Add this to the main cpython expr
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "absl-py";
|
||||
version = "2.2.1";
|
||||
version = "2.2.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-py";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-FCmilW9/gWdlV1QA+4INVa5cDafiAl9GwO/4YyU0ZY4=";
|
||||
hash = "sha256-KsaFfdq6+Pc8k0gM1y+HJ1v6VrTAK7TBgh92BSFuc+Q=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
pythonAtLeast,
|
||||
|
||||
# buildInputs
|
||||
@@ -34,24 +33,16 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "accelerate";
|
||||
version = "1.5.2";
|
||||
version = "1.7.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "huggingface";
|
||||
repo = "accelerate";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-J4eDm/PcyKK3256l6CAWUj4AWTB6neTKgxbBmul0BPE=";
|
||||
hash = "sha256-nZoa2Uwd8cHl0H4LM8swHjce7HktpGdcD+6ykfoQ90M=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix tests on darwin: https://github.com/huggingface/accelerate/pull/3464
|
||||
(fetchpatch {
|
||||
url = "https://github.com/huggingface/accelerate/commit/8b31a2fe2c6d0246fff9885fb1f8456fb560abc7.patch";
|
||||
hash = "sha256-Ek9Ou4Y/H1jt3qanf2g3HowBoTsN/bn4yV9O3ogcXMo=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ llvmPackages.openmp ];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
@@ -94,6 +85,9 @@ buildPythonPackage rec {
|
||||
"test_no_split_modules"
|
||||
"test_remote_code"
|
||||
"test_transformers_model"
|
||||
"test_extract_model_keep_torch_compile"
|
||||
"test_extract_model_remove_torch_compile"
|
||||
"test_regions_are_compiled"
|
||||
|
||||
# nondeterministic, tests GC behaviour by thresholding global ram usage
|
||||
"test_free_memory_dereferences_prepared_components"
|
||||
|
||||
@@ -8,25 +8,22 @@
|
||||
dill,
|
||||
fetchFromGitHub,
|
||||
moto,
|
||||
poetry-core,
|
||||
poetry-dynamic-versioning,
|
||||
pytest-asyncio,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aioboto3";
|
||||
version = "13.4.0";
|
||||
version = "14.2.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "terrycain";
|
||||
repo = "aioboto3";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-o3PynPW6nPvbBrsw+HU2fJheVRpCHCb0EnJdmseorsE=";
|
||||
hash = "sha256-RzaMsJtGvC6IILgwj09kymw+Hv3gjyBf2PHBzYC9itE=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
@@ -34,8 +31,8 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
poetry-dynamic-versioning
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
@@ -58,6 +55,10 @@ buildPythonPackage rec {
|
||||
++ moto.optional-dependencies.server
|
||||
++ lib.flatten (builtins.attrValues optional-dependencies);
|
||||
|
||||
disabledTests = [
|
||||
"test_patches"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "aioboto3" ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
aiohttp,
|
||||
aioitertools,
|
||||
botocore,
|
||||
@@ -24,16 +23,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiobotocore";
|
||||
version = "2.19.0";
|
||||
version = "2.22.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aio-libs";
|
||||
repo = "aiobotocore";
|
||||
tag = version;
|
||||
hash = "sha256-8wtWIkGja4zb2OoYALH9hTR6i90sIjIjYWTUulfYIYA=";
|
||||
hash = "sha256-Zzwj0osXqWSCWsuxlpiqpptzjLhFwlqfXqiWMP7CgXg=";
|
||||
};
|
||||
|
||||
# Relax version constraints: aiobotocore works with newer botocore versions
|
||||
@@ -75,7 +72,6 @@ buildPythonPackage rec {
|
||||
# Test requires network access
|
||||
"tests/test_version.py"
|
||||
# Test not compatible with latest moto
|
||||
"tests/boto_tests/unit/test_eventstream.py"
|
||||
"tests/python3.8/test_eventstreams.py"
|
||||
"tests/test_basic_s3.py"
|
||||
"tests/test_batch.py"
|
||||
@@ -94,7 +90,7 @@ buildPythonPackage rec {
|
||||
meta = {
|
||||
description = "Python client for amazon services";
|
||||
homepage = "https://github.com/aio-libs/aiobotocore";
|
||||
changelog = "https://github.com/aio-libs/aiobotocore/releases/tag/${src.tag}";
|
||||
changelog = "https://github.com/aio-libs/aiobotocore/blob/${src.tag}/CHANGES.rst";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ teh ];
|
||||
};
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiodns";
|
||||
version = "3.3.0";
|
||||
version = "3.4.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "saghul";
|
||||
repo = "aiodns";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-soWGqBKg/Qkm8lE7gKRIKspbtuZq+iTAbDkcQnAV0jc=";
|
||||
hash = "sha256-y3QuMj2y/V6orM+1+cbUCgj0UL8sXQVzLLYXLnBdlio=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -37,6 +37,7 @@ buildPythonPackage rec {
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"asyncio_dgram"
|
||||
"frozenlist"
|
||||
"typing-extensions"
|
||||
];
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'version = "0.0.0"' 'version = "${version}"'
|
||||
--replace-fail 'version = "0.0.0"' 'version = "${version}"' \
|
||||
--replace-fail 'setuptools>=68.0,<79.1' setuptools
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiohttp";
|
||||
version = "3.11.15";
|
||||
version = "3.11.18";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aio-libs";
|
||||
repo = "aiohttp";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-cmPvhSnkocq87lJUtdQSs9QuJlgZB8p5m1pZs2bplh4=";
|
||||
hash = "sha256-+vnrYdUz1Stti9XE99InAouKN5kfTSaOuEG9Anxb3gs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -115,6 +115,8 @@ buildPythonPackage rec {
|
||||
"test_requote_redirect_url_default"
|
||||
# don't run benchmarks
|
||||
"test_import_time"
|
||||
# racy
|
||||
"test_uvloop_secure_https_proxy"
|
||||
]
|
||||
# these tests fail with python310 but succeeds with 11+
|
||||
++ lib.optionals isPy310 [
|
||||
|
||||
@@ -30,19 +30,20 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ansible-runner";
|
||||
version = "2.4.0";
|
||||
version = "2.4.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ansible";
|
||||
repo = "ansible-runner";
|
||||
tag = version;
|
||||
hash = "sha256-lmaYTdJ7NlaCJ5/CVds6Xzwbe45QXbtS3h8gi5xqvUc=";
|
||||
hash = "sha256-Fyavc13TRHbslRVoBawyBgvUKhuIZsxBc7go66axE0Y=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail '"setuptools>=45, <=69.0.2", "setuptools-scm[toml]>=6.2, <=8.0.4"' '"setuptools", "setuptools-scm"'
|
||||
--replace-fail "setuptools>=45, <=70.0.0" setuptools \
|
||||
--replace-fail "setuptools-scm[toml]>=6.2, <=8.1.0" setuptools-scm
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -90,6 +90,7 @@ buildPythonPackage rec {
|
||||
"pyarrow"
|
||||
|
||||
"pydot"
|
||||
"redis"
|
||||
];
|
||||
|
||||
sourceRoot = "${src.name}/sdks/python";
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "appnope";
|
||||
version = "0.1.3";
|
||||
version = "0.1.4";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "minrk";
|
||||
repo = "appnope";
|
||||
rev = version;
|
||||
hash = "sha256-JYzNOPD1ofOrtZK5TTKxbF1ausmczsltR7F1Vwss8Sw=";
|
||||
hash = "sha256-We7sZKVbQFIMdZpS+VMdi0RH1O/qtFNrfJNg/98tO5A=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "argcomplete";
|
||||
version = "3.5.3";
|
||||
version = "3.6.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = "kislyuk";
|
||||
repo = "argcomplete";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-rxo27SCOQxauMbC7GK3co/HZK8cRqbqHyk9ORQYHta4=";
|
||||
hash = "sha256-2o0gQtkQP9cax/8SUd9+65TwAIAjBYnI+ufuzZtrVyo=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "astroid";
|
||||
version = "3.3.8"; # Check whether the version is compatible with pylint
|
||||
version = "3.3.10"; # Check whether the version is compatible with pylint
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -21,7 +21,7 @@ buildPythonPackage rec {
|
||||
owner = "PyCQA";
|
||||
repo = "astroid";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-KKQuLomCHhVYMX1gE9WuqbXOfsf2izGlLE0Ml62gY3k=";
|
||||
hash = "sha256-q4ZPXz2xaKJ39q6g1c9agktKSCfbRp+3INDfXg/wP8k=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
@@ -33,6 +33,11 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# requires mypy
|
||||
"tests/test_raw_building.py"
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
inherit pylint;
|
||||
};
|
||||
|
||||
@@ -44,6 +44,8 @@ buildPythonPackage rec {
|
||||
# Tests require networking
|
||||
"examples"
|
||||
"test/integration"
|
||||
# requires yet to be packaged aws-cryptographic-material-providers
|
||||
"test/mpl"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
|
||||
@@ -25,7 +25,7 @@ buildPythonPackage rec {
|
||||
owner = "boto";
|
||||
repo = "boto3";
|
||||
tag = version;
|
||||
hash = "sha256-89GUr0isFEKmBevWgPW5z4uU1zOTQ1kM8RX1mlsvdXw=";
|
||||
hash = "sha256-OYD/PC/UO6jqBBlMwXJE+5kdIIX72C1Bpz4iswmQ/IA=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "botocore";
|
||||
version = "1.36.21"; # N.B: if you change this, change boto3 and awscli to a matching version
|
||||
version = "1.38.9"; # N.B: if you change this, change boto3 and awscli to a matching version
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "boto";
|
||||
repo = "botocore";
|
||||
tag = version;
|
||||
hash = "sha256-wk3KCRagEju4ywJfoBR8/4dH3xYgzGgaSHavDYCd5XY=";
|
||||
hash = "sha256-rFLnSM7SwzXS08+Qde2FqU+sP5SIVAawP34iG8keAtM=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "bottle";
|
||||
version = "0.13.2";
|
||||
version = "0.13.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-5TgDudKYx9ND0Aun0nsAWUFfBLn29AuNWLW/kUup00g=";
|
||||
hash = "sha256-HCOuswqooT85xgwNpJRTDd1d49ojW8QxuBilDZmd5J8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pytestCheckHook,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "brotli";
|
||||
version = "1.1.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
@@ -19,6 +20,8 @@ buildPythonPackage rec {
|
||||
forceFetchGit = true;
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
# only returns information how to really build
|
||||
dontConfigure = true;
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
let
|
||||
self = buildPythonPackage rec {
|
||||
pname = "calver";
|
||||
version = "2025.04.01";
|
||||
version = "2025.04.17";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "di";
|
||||
repo = "calver";
|
||||
rev = version;
|
||||
hash = "sha256-F7OnhwlwCw6cZeigmzyyIkttQMfxFoC2ynpxw0FGYMo=";
|
||||
tag = version;
|
||||
hash = "sha256-C0l/SThDhA1DnOeMJfuh3d8R606nzyQag+cg7QqvYWY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -34,16 +34,12 @@ let
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "calver" ];
|
||||
|
||||
passthru.tests.calver = self.overridePythonAttrs { doCheck = true; };
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/di/calver/releases/tag/${src.rev}";
|
||||
changelog = "https://github.com/di/calver/releases/tag/${src.tag}";
|
||||
description = "Setuptools extension for CalVer package versions";
|
||||
homepage = "https://github.com/di/calver";
|
||||
license = lib.licenses.asl20;
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cattrs";
|
||||
version = "24.1.2";
|
||||
version = "24.1.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-attrs";
|
||||
repo = "cattrs";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-LSP8a/JduK0h9GytfbN7/CjFlnGGChaa3VbbCHQ3AFE=";
|
||||
hash = "sha256-yrrb2Lvq7zMzeOLr8wwxVsKmPYEZxzDKR2mnCMNuHdE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "certifi";
|
||||
version = "2025.01.31";
|
||||
version = "2025.04.26";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
owner = pname;
|
||||
repo = "python-certifi";
|
||||
rev = version;
|
||||
hash = "sha256-LHoFI9+vrrrRzyhWNchQYp4AAiFcQwZHdeNzMjTJ8jk=";
|
||||
hash = "sha256-OJ/XzywazpG0QpGTjTcLv1tDSqVdVP7xvp/tnyPPZzQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "charset-normalizer";
|
||||
version = "3.4.1";
|
||||
version = "3.4.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
@@ -22,14 +22,9 @@ buildPythonPackage rec {
|
||||
owner = "Ousret";
|
||||
repo = "charset_normalizer";
|
||||
tag = version;
|
||||
hash = "sha256-z6XUXfNJ4+2Gq2O13MgF1D3j/bVBjgAG2wCWLaNgADE=";
|
||||
hash = "sha256-PkFmNEMdp9duDCqMTKooOLAOCqHf3IjrGlr8jKYT2WE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "mypy>=1.4.1,<=1.14.0" mypy
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
mypy
|
||||
setuptools
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
lib,
|
||||
attrs,
|
||||
authlib,
|
||||
avro,
|
||||
azure-identity,
|
||||
azure-keyvault-keys,
|
||||
boto3,
|
||||
buildPythonPackage,
|
||||
cacert,
|
||||
cachetools,
|
||||
fastavro,
|
||||
fetchFromGitHub,
|
||||
@@ -13,7 +14,9 @@
|
||||
google-api-core,
|
||||
google-cloud-kms,
|
||||
hvac,
|
||||
httpx,
|
||||
jsonschema,
|
||||
orjson,
|
||||
protobuf,
|
||||
pyflakes,
|
||||
pyrsistent,
|
||||
@@ -29,7 +32,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "confluent-kafka";
|
||||
version = "2.8.0";
|
||||
version = "2.10.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -38,7 +41,7 @@ buildPythonPackage rec {
|
||||
owner = "confluentinc";
|
||||
repo = "confluent-kafka-python";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-EDEp260G/t7s17RlbT+Bcl7FZlVQFagNijDNw53DFpY=";
|
||||
hash = "sha256-JJSGYGM/ukEABgzlHbw8xJr1HKVm/EW6EXEIJQBSCt8=";
|
||||
};
|
||||
|
||||
buildInputs = [ rdkafka ];
|
||||
@@ -74,11 +77,17 @@ buildPythonPackage rec {
|
||||
pyyaml
|
||||
# TODO: tink
|
||||
];
|
||||
schema-registry = [ requests ];
|
||||
schema-registry = [
|
||||
attrs
|
||||
authlib
|
||||
cachetools
|
||||
httpx
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
cachetools
|
||||
orjson
|
||||
pyflakes
|
||||
pytestCheckHook
|
||||
requests-mock
|
||||
@@ -95,6 +104,10 @@ buildPythonPackage rec {
|
||||
"tests/schema_registry/test_avro_serdes.py"
|
||||
"tests/schema_registry/test_json_serdes.py"
|
||||
"tests/schema_registry/test_proto_serdes.py"
|
||||
# missing tink dependency
|
||||
"tests/schema_registry/test_config.py"
|
||||
# crashes the test runner on shutdown
|
||||
"tests/test_KafkaError.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
let
|
||||
contourpy = buildPythonPackage rec {
|
||||
pname = "contourpy";
|
||||
version = "1.3.1";
|
||||
version = "1.3.2";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -40,7 +40,7 @@ let
|
||||
owner = "contourpy";
|
||||
repo = "contourpy";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-vZO9hHPHlfZhK/icJYE6nQPCPdXAYZFe1GF5X25MUcQ=";
|
||||
hash = "sha256-mtD54KfCm1vNBjcGuAKqRpKF+FLy3WmTYo7FLoE01QY=";
|
||||
};
|
||||
|
||||
# prevent unnecessary references to the build python when cross compiling
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
fetchFromGitHub,
|
||||
isPyPy,
|
||||
libiconv,
|
||||
libxcrypt,
|
||||
openssl,
|
||||
pkg-config,
|
||||
pretend,
|
||||
@@ -23,7 +22,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cryptography";
|
||||
version = "44.0.2"; # Also update the hash in vectors.nix
|
||||
version = "45.0.2"; # Also update the hash in vectors.nix
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -32,13 +31,13 @@ buildPythonPackage rec {
|
||||
owner = "pyca";
|
||||
repo = "cryptography";
|
||||
tag = version;
|
||||
hash = "sha256-nXwW6v+U47/+CmjhREHcuQ7QQi/b26gagWBQ3F16DuQ=";
|
||||
hash = "sha256-SjlzEyX30b3LbEH5NOhCJvds9KuguTTdF2A0kbIysA4=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-HbUsV+ABE89UvhCRZYXr+Q/zRDKUy+HgCVdQFHqaP4o=";
|
||||
hash = "sha256-dKwNnWBzBM9QEcRbbvkNhFJnFxFakqZ/MS7rqE8/tNQ=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -57,8 +56,7 @@ buildPythonPackage rec {
|
||||
[ openssl ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libiconv
|
||||
]
|
||||
++ lib.optionals (pythonOlder "3.9") [ libxcrypt ];
|
||||
];
|
||||
|
||||
dependencies = lib.optionals (!isPyPy) [ cffi ];
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ buildPythonPackage rec {
|
||||
src = fetchPypi {
|
||||
pname = "cryptography_vectors";
|
||||
inherit version;
|
||||
hash = "sha256-qzLhVrbn6vbYxyejIkWWfczgSUhzAUgvyjjAxf3ITks=";
|
||||
hash = "sha256-U+PmRHxCmYVM+Rlb3Bn3sEZg3II/0upEaDBcIsrsGac=";
|
||||
};
|
||||
|
||||
build-system = [ flit-core ];
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "curve25519-donna";
|
||||
version = "1.3";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1w0vkjyh4ki9n98lr2hg09f1lr1g3pz48kshrlic01ba6pasj60q";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python wrapper for the portable curve25519-donna implementation";
|
||||
homepage = "http://code.google.com/p/curve25519-donna/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dacite";
|
||||
version = "1.8.1";
|
||||
version = "1.9.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@@ -17,7 +17,7 @@ buildPythonPackage rec {
|
||||
owner = "konradhalas";
|
||||
repo = pname;
|
||||
tag = "v${version}";
|
||||
hash = "sha256-lvObQ+jyBH2s4GOwyDXEAYmG7ZGQN9WDqL8ftNItPCQ=";
|
||||
hash = "sha256-mAPqWvBpkTbtzHpwtCSDXMNkoc8/hbRH3OIEeK2yStU=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "datetime";
|
||||
version = "5.4";
|
||||
version = "5.5";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = "zopefoundation";
|
||||
repo = "datetime";
|
||||
tag = version;
|
||||
hash = "sha256-k4q9n3uikz+B9CUyqQTgl61OTKDWMsyhAt2gB1HWGRw=";
|
||||
hash = "sha256-VgIEpa3WpxfIUpBjXMor/xEEu+sp7z/EsLYEvU0RzWk=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
stdenv,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
flit-core,
|
||||
|
||||
# dependencies
|
||||
orderly-set,
|
||||
@@ -27,18 +27,18 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "deepdiff";
|
||||
version = "8.4.1";
|
||||
version = "8.5.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "seperman";
|
||||
repo = "deepdiff";
|
||||
tag = version;
|
||||
hash = "sha256-RXr+6DLzhnuow9JNqqnNmuehE89eOY4oYn4tw4VSI+A=";
|
||||
hash = "sha256-JIxlWy2uVpI98BmpH2+EyOxfYBoO2G2S0D9krduVo08=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
flit-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
stdenv,
|
||||
libiconv,
|
||||
pkg-config,
|
||||
polars,
|
||||
pytestCheckHook,
|
||||
pytest-benchmark,
|
||||
pytest-cov,
|
||||
@@ -19,17 +20,17 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "deltalake";
|
||||
version = "0.20.1";
|
||||
version = "0.25.5";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-serMb6Rirmw+QLpET3NT2djBoFBW/TGu1/5qYjiYpKE=";
|
||||
hash = "sha256-Fz5Lg/z/EPJkdK4RcWHD8r3V9EwwwgRjwktri1IOdlY=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
hash = "sha256-WGnjVYws8ZZMv0MvBrohozxQuyOImktaLxuvAIiH+U0=";
|
||||
hash = "sha256-6SGVKJu01MzZxJv29PZKea+Z2YwAnvzbdDlnA4R6Az0=";
|
||||
};
|
||||
|
||||
env.OPENSSL_NO_VENDOR = 1;
|
||||
@@ -61,6 +62,7 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pandas
|
||||
polars
|
||||
pytest-benchmark
|
||||
pytest-cov
|
||||
pytest-mock
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dill";
|
||||
version = "0.3.9";
|
||||
version = "0.4.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -22,7 +22,7 @@ buildPythonPackage rec {
|
||||
owner = "uqfoundation";
|
||||
repo = pname;
|
||||
tag = version;
|
||||
hash = "sha256-p+W0ppNMfSgplKsQjaTnTrMvQ5poF/E/xSzsiLf9h58=";
|
||||
hash = "sha256-RIyWTeIkK5cS4Fh3TK48XLa/EU9Iwlvcml0CTs5+Uh8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
|
||||
@@ -9,19 +9,22 @@
|
||||
mysqlclient,
|
||||
psycopg,
|
||||
dj-database-url,
|
||||
python,
|
||||
django-rq,
|
||||
fakeredis,
|
||||
pytestCheckHook,
|
||||
pytest-django,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django-tasks";
|
||||
version = "0.6.1";
|
||||
version = "0.7.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RealOrangeOne";
|
||||
repo = "django-tasks";
|
||||
tag = version;
|
||||
hash = "sha256-MLztM4jVQV2tHPcIExbPGX+hCHSTqaQJeTbQqaVA3V4=";
|
||||
hash = "sha256-AWsqAvn11uklrFXtiV2a6fR3owZ02osEzrdHZgDKkOM=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
@@ -47,15 +50,25 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
dj-database-url
|
||||
django-rq
|
||||
fakeredis
|
||||
pytestCheckHook
|
||||
pytest-django
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
disabledTests = [
|
||||
# AssertionError: Lists differ: [] != ['Starting worker for queues=default', ...
|
||||
"test_verbose_logging"
|
||||
# AssertionError: '' != 'Deleted 0 task result(s)'
|
||||
"test_doesnt_prune_new_task"
|
||||
# AssertionError: '' != 'Would delete 1 task result(s)'
|
||||
"test_dry_run"
|
||||
# AssertionError: '' != 'Deleted 1 task result(s)'
|
||||
"test_prunes_tasks"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export DJANGO_SETTINGS_MODULE="tests.settings"
|
||||
${python.interpreter} -m manage test --noinput
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch2,
|
||||
hatchling,
|
||||
jupyter,
|
||||
nbconvert,
|
||||
@@ -11,11 +10,12 @@
|
||||
pillow,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
torch,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "einops";
|
||||
version = "0.8.0";
|
||||
version = "0.8.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -24,18 +24,9 @@ buildPythonPackage rec {
|
||||
owner = "arogozhnikov";
|
||||
repo = pname;
|
||||
tag = "v${version}";
|
||||
hash = "sha256-6x9AttvSvgYrHaS5ESKOwyEnXxD2BitYTGtqqSKur+0=";
|
||||
hash = "sha256-J9m5LMOleHf2UziUbOtwf+DFpu/wBDcAyHUor4kqrR8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/arogozhnikov/einops/pull/325
|
||||
(fetchpatch2 {
|
||||
name = "numpy_2-compatibility.patch";
|
||||
url = "https://github.com/arogozhnikov/einops/commit/11680b457ce2216d9827330d0b794565946847d7.patch";
|
||||
hash = "sha256-OKWp319ClYarNrek7TdRHt+NKTOEfBdJaV0U/6vLeMc=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ hatchling ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
@@ -45,6 +36,7 @@ buildPythonPackage rec {
|
||||
parameterized
|
||||
pillow
|
||||
pytestCheckHook
|
||||
torch
|
||||
];
|
||||
|
||||
env.EINOPS_TEST_BACKENDS = "numpy";
|
||||
@@ -61,13 +53,16 @@ buildPythonPackage rec {
|
||||
"test_all_notebooks"
|
||||
"test_dl_notebook_with_all_backends"
|
||||
"test_backends_installed"
|
||||
# depends on tensorflow, which is not available on Python 3.13
|
||||
"test_notebook_2_with_all_backends"
|
||||
];
|
||||
|
||||
disabledTestPaths = [ "tests/test_layers.py" ];
|
||||
disabledTestPaths = [ "einops/tests/test_layers.py" ];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/arogozhnikov/einops/releases/tag/${src.tag}";
|
||||
description = "Flexible and powerful tensor operations for readable and reliable code";
|
||||
homepage = "https://github.com/arogozhnikov/einops";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
opentelemetry-sdk,
|
||||
orjson,
|
||||
pytest-asyncio,
|
||||
pytest-cov-stub,
|
||||
pytest-httpserver,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "elastic-transport";
|
||||
version = "8.17.0";
|
||||
version = "8.17.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -30,17 +31,12 @@ buildPythonPackage rec {
|
||||
owner = "elastic";
|
||||
repo = "elastic-transport-python";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-ZCzG7a/SWvUDWiIWwzVfj4JG/w7XUa25yKuuR53XCEQ=";
|
||||
hash = "sha256-LWSvE88wEwMxRi6IZsMkIRP8UTRfImC9QZnuka1oiso=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace " --cov-report=term-missing --cov=elastic_transport" ""
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
urllib3
|
||||
certifi
|
||||
];
|
||||
@@ -52,6 +48,7 @@ buildPythonPackage rec {
|
||||
opentelemetry-sdk
|
||||
orjson
|
||||
pytest-asyncio
|
||||
pytest-cov-stub
|
||||
pytest-httpserver
|
||||
pytestCheckHook
|
||||
requests
|
||||
@@ -87,7 +84,7 @@ buildPythonPackage rec {
|
||||
|
||||
meta = with lib; {
|
||||
description = "Transport classes and utilities shared among Python Elastic client libraries";
|
||||
homepage = "https://github.com/elasticsearch/elastic-transport-python";
|
||||
homepage = "https://github.com/elastic/elastic-transport-python";
|
||||
changelog = "https://github.com/elastic/elastic-transport-python/releases/tag/${src.tag}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "elasticsearch-dsl";
|
||||
version = "8.17.1";
|
||||
version = "8.18.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
src = fetchPypi {
|
||||
pname = "elasticsearch_dsl";
|
||||
inherit version;
|
||||
hash = "sha256-2BcGmb/bT+f6s4VM2sMZotbd26opyep5k9LsIgVttaA=";
|
||||
hash = "sha256-djRl26nq4Wat0QVn6STGVzCqEigZsIv+mgd+kbE7MNE=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -7,25 +7,31 @@
|
||||
hatchling,
|
||||
orjson,
|
||||
pyarrow,
|
||||
python-dateutil,
|
||||
pythonOlder,
|
||||
requests,
|
||||
typing-extensions,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "elasticsearch";
|
||||
version = "8.17.2";
|
||||
version = "8.18.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-/38duK7v2HzrpO3OOqQHCZRYLmzwKdLme3TmbWNFCds=";
|
||||
hash = "sha256-mYA18XqMH7p64msYPcp5fc+V24baan7LpW0xr8QPB8c=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [ elastic-transport ];
|
||||
dependencies = [
|
||||
elastic-transport
|
||||
python-dateutil
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
requests = [ requests ];
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "eventlet";
|
||||
version = "0.38.2";
|
||||
version = "0.40.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "eventlet";
|
||||
repo = "eventlet";
|
||||
tag = version;
|
||||
hash = "sha256-oQCHnW+t4VczEFvV7neLUQTCCwRigJsUGpTRkivdyjU=";
|
||||
hash = "sha256-fzCN+idYQ97nuDVfYn6VYQFBaaMxmnjWzFrmn+Aj+u4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "exceptiongroup";
|
||||
version = "1.2.2";
|
||||
version = "1.3.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
owner = "agronholm";
|
||||
repo = "exceptiongroup";
|
||||
tag = version;
|
||||
hash = "sha256-k88+9FpB/aBun73SnsN6GsBceSUekT8Ig1XBt3hO4ok=";
|
||||
hash = "sha256-b3Z1NsYKp0CecUq8kaC/j3xR/ZZHDIw4MhUeadizz88=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flit-scm ];
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "faker";
|
||||
version = "37.1.0";
|
||||
version = "37.3.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-rZ3GajuEiIuDfKcp6FKZqWtY/a7wMj7QuqzpPJYUrwY=";
|
||||
hash = "sha256-d7eeeiIo1XF1Ezrwu83SbcYj34HbOQ7lL1EE1GwBDy8=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fakeredis";
|
||||
version = "2.26.2";
|
||||
version = "2.29.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||
owner = "dsoftwareinc";
|
||||
repo = "fakeredis-py";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-jD0e04ltH1MjExfrPsR6LUn4X0/qoJZWzX9i2A58HHI=";
|
||||
hash = "sha256-wBUsoPmTIE3VFvmMnW4B9Unw/V63dIvsBTYCloElamA=";
|
||||
};
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fastavro";
|
||||
version = "1.10.0";
|
||||
version = "1.11.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
tag = version;
|
||||
hash = "sha256-/YZFrEs7abm+oPn9yyLMV1X/G5VZ/s+ThpvzoQtYQu0=";
|
||||
hash = "sha256-I8Te1Ae20UrE5qI2nwktU0Ubip7Jx4/NWteSKsSz7tg=";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
|
||||
@@ -23,6 +23,8 @@ buildPythonPackage rec {
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
pythonRelaxDeps = [ "cryptography" ];
|
||||
|
||||
dependencies = [ cryptography ];
|
||||
|
||||
optional-dependencies = {
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "flask-cors";
|
||||
version = "5.0.1";
|
||||
version = "6.0.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "corydolphin";
|
||||
repo = "flask-cors";
|
||||
tag = version;
|
||||
hash = "sha256-UVMZGdUpEKx5w85sSe8wSzjNYjsKPdbyBX7/QHJ3cyQ=";
|
||||
hash = "sha256-J9OTWVS0GXxfSedfHeifaJ0LR8xFKksf0RGsKSc581E=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "flask";
|
||||
version = "3.1.0";
|
||||
version = "3.1.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-X4c8UYTIl8jZ0bBd8ePQGxSRDOaWB6EXvTJ3CYpYNqw=";
|
||||
hash = "sha256-KEx7jy9Yy3N/DPHDD9fq8Mz83hlgmdJOzt4/wgBapZ4=";
|
||||
};
|
||||
|
||||
build-system = [ flit-core ];
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "frozenlist";
|
||||
version = "1.5.0";
|
||||
version = "1.6.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -22,7 +22,7 @@ buildPythonPackage rec {
|
||||
owner = "aio-libs";
|
||||
repo = "frozenlist";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-yhoJc9DR3vL2E9srN3F4VksIor324H9dUarzzmoc4/A=";
|
||||
hash = "sha256-x2o4eiSDxA7nvrifzvV38kjIGmOY8gaQrPNDhCupovg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fsspec";
|
||||
version = "2025.3.1";
|
||||
version = "2025.3.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fsspec";
|
||||
repo = "filesystem_spec";
|
||||
tag = version;
|
||||
hash = "sha256-85/IOxR77ozlVCVtZZ8hVmmIBFpSBn6v7zkv+vT445k=";
|
||||
hash = "sha256-FsgDILnnr+WApoTv/y1zVFSeBNysvkizdKtMeRegbfI=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gcsfs";
|
||||
version = "2025.3.1";
|
||||
version = "2025.3.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@@ -29,7 +29,7 @@ buildPythonPackage rec {
|
||||
owner = "fsspec";
|
||||
repo = "gcsfs";
|
||||
tag = version;
|
||||
hash = "sha256-mlEo83Q4Y7i8Za7q+oE0OILWyH4vW49rkG8ijyLehAY=";
|
||||
hash = "sha256-aXBlj9ej3Ya7h4x/akl/iX6dDS/SgkkEsOQ2E9KmCDU=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
@@ -40,9 +41,18 @@ buildPythonPackage rec {
|
||||
hash = "sha256-SZizjwkx8dsnaobDYpeQm9jeXZ4PlzYyjIScnQrH63Q=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Remove geom_almost_equals, because it broke with shapely 2.1.0 and is not being updated
|
||||
url = "https://github.com/geopandas/geopandas/commit/0e1f871a02e9612206dcadd6817284131026f61c.patch";
|
||||
excludes = [ "CHANGELOG.md" ];
|
||||
hash = "sha256-n9AmmbjjNwV66lxDQV2hfkVVfxRgMfEGfHZT6bql684=";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
packaging
|
||||
pandas
|
||||
pyogrio
|
||||
|
||||
@@ -1,27 +1,25 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
google-auth,
|
||||
google-auth-httplib2,
|
||||
google-api-core,
|
||||
httplib2,
|
||||
uritemplate,
|
||||
setuptools,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-api-python-client";
|
||||
version = "2.166.0";
|
||||
version = "2.169.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "google_api_python_client";
|
||||
inherit version;
|
||||
hash = "sha256-uM+EO9nXNsE0rvds8dx6R8koOi7yQme5cge53UOzDvc=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "google-api-python-client";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-XJwZ/gWL2pO9P+HuN6BtVbacNjwbZV2jW6FVLgNsj/0=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
@@ -34,12 +32,9 @@ buildPythonPackage rec {
|
||||
uritemplate
|
||||
];
|
||||
|
||||
# No tests included in archive
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "googleapiclient" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Official Python client library for Google's discovery based APIs";
|
||||
longDescription = ''
|
||||
These client libraries are officially supported by Google. However, the
|
||||
@@ -49,7 +44,7 @@ buildPythonPackage rec {
|
||||
'';
|
||||
homepage = "https://github.com/google/google-api-python-client";
|
||||
changelog = "https://github.com/googleapis/google-api-python-client/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.sarahec ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
flask,
|
||||
google-auth,
|
||||
httplib2,
|
||||
mock,
|
||||
pytest-localserver,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-auth-httplib2";
|
||||
version = "0.2.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-OKp7rfSPl08euYYXlOnAyyoFEaTsBnmx+IbRCPVkDgU=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "google-auth-library-python-httplib2";
|
||||
tag = "v${version}";
|
||||
sha256 = "sha256-qY00u1srwAw68VXewZDOsWZrtHpi5UoRZfesSY7mTk8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
google-auth
|
||||
httplib2
|
||||
];
|
||||
@@ -37,11 +39,11 @@ buildPythonPackage rec {
|
||||
pytest-localserver
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Google Authentication Library: httplib2 transport";
|
||||
homepage = "https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2";
|
||||
changelog = "https://github.com/googleapis/google-auth-library-python-httplib2/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.sarahec ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
google-auth,
|
||||
requests-oauthlib,
|
||||
@@ -13,13 +13,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-auth-oauthlib";
|
||||
version = "1.2.1";
|
||||
version = "1.2.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "google_auth_oauthlib";
|
||||
inherit version;
|
||||
hash = "sha256-r9DK0JKi6qU82OgphVfW3hA0xstKdAUAtTV7ZIr5cmM=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "google-auth-library-python-oauthlib";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nkXS1vNsq7k30EmNHclRblsmGTMYuIAaHuaVDORqRmc=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
@@ -57,7 +58,10 @@ buildPythonPackage rec {
|
||||
homepage = "https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib";
|
||||
changelog = "https://github.com/googleapis/google-auth-library-python-oauthlib/blob/v${version}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ terlar ];
|
||||
maintainers = with lib.maintainers; [
|
||||
sarahec
|
||||
terlar
|
||||
];
|
||||
mainProgram = "google-oauthlib-tool";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
aiohttp,
|
||||
aioresponses,
|
||||
buildPythonPackage,
|
||||
cachetools,
|
||||
cryptography,
|
||||
fetchPypi,
|
||||
flask,
|
||||
freezegun,
|
||||
grpcio,
|
||||
@@ -17,7 +16,6 @@
|
||||
pytest-asyncio,
|
||||
pytest-localserver,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
pyu2f,
|
||||
requests,
|
||||
responses,
|
||||
@@ -27,15 +25,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-auth";
|
||||
version = "2.38.0";
|
||||
version = "2.40.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "google_auth";
|
||||
inherit version;
|
||||
hash = "sha256-goURNgfTuAo/FUO3WWJEe6ign+hXg0MqeE/e72rAlMQ=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "google-auth-library-python";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-jO6brNdTH8BitLKKP/nwrlUo5hfQnThT/bPbzefvRbM=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
@@ -79,6 +76,13 @@ buildPythonPackage rec {
|
||||
responses
|
||||
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
||||
|
||||
disabledTestPaths = [
|
||||
"samples/"
|
||||
"system_tests/"
|
||||
# Requires a running aiohttp event loop
|
||||
"tests_async/"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"google.auth"
|
||||
"google.oauth2"
|
||||
@@ -91,7 +95,7 @@ buildPythonPackage rec {
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Google Auth Python Library";
|
||||
longDescription = ''
|
||||
This library simplifies using Google's various server-to-server
|
||||
@@ -99,7 +103,7 @@ buildPythonPackage rec {
|
||||
'';
|
||||
homepage = "https://github.com/googleapis/google-auth-library-python";
|
||||
changelog = "https://github.com/googleapis/google-auth-library-python/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.sarahec ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
google-api-core,
|
||||
google-cloud-access-context-manager,
|
||||
google-cloud-org-policy,
|
||||
@@ -14,8 +14,8 @@
|
||||
protobuf,
|
||||
pytest-asyncio,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -23,14 +23,15 @@ buildPythonPackage rec {
|
||||
version = "3.30.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "google_cloud_asset";
|
||||
inherit version;
|
||||
hash = "sha256-oPAkm/y8RO9/iYC2IUJN58/ilYjS2skMtYzMyBDQU8w=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "google-cloud-python";
|
||||
tag = "google-cloud-asset-v${version}";
|
||||
sha256 = "sha256-4Ifg9igzsVR8pWH/lcrGwCnByqYQjPKChNPJGmmQbKI=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/packages/google-cloud-asset";
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@@ -64,11 +65,18 @@ buildPythonPackage rec {
|
||||
"google.cloud.asset_v1p5beta1"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"google-cloud-asset-v([0-9.]+)"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Python Client for Google Cloud Asset API";
|
||||
homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-asset";
|
||||
changelog = "https://github.com/googleapis/google-cloud-python/blob/google-cloud-asset-v${version}/packages/google-cloud-asset/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.sarahec ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
google-api-core,
|
||||
grpc-google-iam-v1,
|
||||
libcst,
|
||||
mock,
|
||||
nix-update-script,
|
||||
proto-plus,
|
||||
protobuf,
|
||||
pytest-asyncio,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-cloud-datacatalog";
|
||||
version = "3.26.1";
|
||||
version = "3.27.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "google_cloud_datacatalog";
|
||||
inherit version;
|
||||
hash = "sha256-qKCBos0KyFEZBHSNLmsU3CR3nmXiFht1zH4QdINlokg=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "google-cloud-python";
|
||||
tag = "google-cloud-datacatalog-v${version}";
|
||||
hash = "sha256-4Ifg9igzsVR8pWH/lcrGwCnByqYQjPKChNPJGmmQbKI=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/packages/google-cloud-datacatalog";
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@@ -45,11 +46,18 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "google.cloud.datacatalog" ];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"google-cloud-datacatalog-v([0-9.]+)"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Google Cloud Data Catalog API API client library";
|
||||
homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-datacatalog";
|
||||
changelog = "https://github.com/googleapis/google-cloud-python/blob/google-cloud-datacatalog-v${version}/packages/google-cloud-datacatalog/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.sarahec ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
grpc,
|
||||
protobuf,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "googleapis-common-protos";
|
||||
version = "1.69.2";
|
||||
version = "1.70.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "googleapis_common_protos";
|
||||
inherit version;
|
||||
hash = "sha256-PhuQSiejPIIbS3Sf0x0zTAycMOYRMCPUleSJeaPcnF8=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "google-cloud-python";
|
||||
rev = "googleapis-common-protos-v${version}";
|
||||
hash = "sha256-E1LISOLQcXqUMTTPLR+lwkR6gF1fuGGB44j38cIK/Z4=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/packages/googleapis-common-protos";
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@@ -28,6 +29,13 @@ buildPythonPackage rec {
|
||||
protobuf
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"googleapis-common-protos-v([0-9.]+)"
|
||||
];
|
||||
};
|
||||
|
||||
# does not contain tests
|
||||
doCheck = false;
|
||||
|
||||
@@ -39,11 +47,11 @@ buildPythonPackage rec {
|
||||
"google.type"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Common protobufs used in Google APIs";
|
||||
homepage = "https://github.com/googleapis/python-api-common-protos";
|
||||
changelog = "https://github.com/googleapis/python-api-common-protos/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.sarahec ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pyparsing,
|
||||
future,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
}:
|
||||
@@ -24,7 +23,6 @@ buildPythonPackage rec {
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyparsing
|
||||
future
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "granian";
|
||||
version = "2.2.5";
|
||||
version = "2.3.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emmett-framework";
|
||||
repo = "granian";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-fToH8sKh0M75D9YuyqkMEqY+cQio1NUmYdk/TEGy3fk=";
|
||||
hash = "sha256-LDO5lyEk9ZJOfccVNYU6mIGJV952Z7NgMweQWclxQ9o=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit pname version src;
|
||||
hash = "sha256-ThH4sk3yLvR9bklosUhCbklkcbpLW/5I1ukBNxUyqr8=";
|
||||
hash = "sha256-NYOORW3OQXSqmDMsFWjNl6UmN1RO/hAz+nuLfm/y6Uk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with rustPlatform; [
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
let
|
||||
greenlet = buildPythonPackage rec {
|
||||
pname = "greenlet";
|
||||
version = "3.2.1";
|
||||
version = "3.2.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-n03UtJRrFLs78Dj4Hh0uU1t9lPGypZ/boSk82cGgpNc=";
|
||||
hash = "sha256-rQU9NEIaLeu6Rao8w5rPRUrLzQJbP8Gp+KDe4jer1IU=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -99,10 +99,13 @@ buildPythonPackage rec {
|
||||
# Test is flaky
|
||||
"test_stdin_read_warning"
|
||||
# httpbin compatibility issues
|
||||
"test_compress_form"
|
||||
"test_binary_suppresses_when_terminal"
|
||||
"test_binary_suppresses_when_not_terminal_but_pretty"
|
||||
"test_binary_included_and_correct_when_suitable"
|
||||
# charset-normalizer compat issue
|
||||
# https://github.com/httpie/cli/issues/1628
|
||||
"test_terminal_output_response_charset_detection"
|
||||
"test_terminal_output_request_charset_detection"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Test is flaky
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "humanize";
|
||||
version = "4.12.2";
|
||||
version = "4.12.3";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@@ -22,7 +22,7 @@ buildPythonPackage rec {
|
||||
owner = "python-humanize";
|
||||
repo = "humanize";
|
||||
tag = version;
|
||||
hash = "sha256-MGWjh7C9JXTwH+eLyrjU0pjcZ2+oH925eiqHgBS8198=";
|
||||
hash = "sha256-VsB59tS2KRZ0JKd1FzA+RTEzpkUyj9RhhSopseHg+m8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "hypothesis";
|
||||
version = "6.130.12";
|
||||
version = "6.131.17";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@@ -33,7 +33,7 @@ buildPythonPackage rec {
|
||||
owner = "HypothesisWorks";
|
||||
repo = "hypothesis";
|
||||
rev = "hypothesis-python-${version}";
|
||||
hash = "sha256-6p7OCjeZKZJ+3MDfdi+9XffET95pXGC6nzhTiMiEVQA=";
|
||||
hash = "sha256-bNaDC2n0VaI7L4/FdD8eQ4cqn5ewquy89wV/pQn9uo0=";
|
||||
};
|
||||
|
||||
# I tried to package sphinx-selective-exclude, but it throws
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ijson";
|
||||
version = "3.3.0";
|
||||
version = "3.4.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-fxcua6G+4NTI+OvWOVd7/kKd7g8/lndaBnuLrkSS2KA=";
|
||||
hash = "sha256-X3TcutnVksQo08o5V/cRWkJonufulBRYhgkAI2rpuxM=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "importlib-metadata";
|
||||
version = "8.6.1";
|
||||
version = "8.7.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||
src = fetchPypi {
|
||||
pname = "importlib_metadata";
|
||||
inherit version;
|
||||
hash = "sha256-MQtB11VEXXRWn5k8z8IoOCldn+AFQlCU+tlT1/FchYA=";
|
||||
hash = "sha256-0TuBrSI7iQqhbFRx8qwwVs92xfEPgtb5KS8LQV84kAA=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jaraco-path";
|
||||
version = "3.7.1";
|
||||
version = "3.7.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jaraco";
|
||||
repo = "jaraco.path";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-i6FPM4aPfpwLdde1COXZNoKel3sRK8PXnkzy50XvVdw=";
|
||||
hash = "sha256-uLkNMhB7aeDJ3fF0Ynjd8MD6+CTKKH8vsB5cH9RPcok=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools-scm ];
|
||||
@@ -26,7 +26,7 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/jaraco/jaraco.path/blob/${src.rev}/NEWS.rst";
|
||||
changelog = "https://github.com/jaraco/jaraco.path/blob/${src.tag}/NEWS.rst";
|
||||
description = "Miscellaneous path functions";
|
||||
homepage = "https://github.com/jaraco/jaraco.path";
|
||||
license = lib.licenses.mit;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jira";
|
||||
version = "3.9.4";
|
||||
version = "3.10.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -33,7 +33,7 @@ buildPythonPackage rec {
|
||||
owner = "pycontribs";
|
||||
repo = "jira";
|
||||
tag = version;
|
||||
hash = "sha256-P3dbrBKpHvLNIA+JBeSXEQl4QVZ0FdKkNIU8oPHWw6k=";
|
||||
hash = "sha256-y8b+hHx/5mtFbA2jWyA1AI2Ez+VnUtqLZALM4DVAgLM=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "joblib";
|
||||
version = "1.4.2";
|
||||
version = "1.5.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-I4LFgWsmNvvSCgng9Ona1HNnZf37fcpYKUO5wTZrPw4=";
|
||||
hash = "sha256-2HV/lVOJo916IxUuQ7wpfC4MLTBgBW2tD+78iKBpObU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "json5";
|
||||
version = "0.10.0";
|
||||
version = "0.12.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = "dpranke";
|
||||
repo = "pyjson5";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-J5xZN6o9UwvCdrzEY6o3NxYaxbtiUhmTtCQJia4JmI4=";
|
||||
hash = "sha256-xBErTbC/cw+1bAVPIyN0+0aPmWblNtnsbIKEZ+XIyUQ=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jsonschema-specifications";
|
||||
version = "2024.10.1";
|
||||
version = "2025.4.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||
src = fetchPypi {
|
||||
pname = "jsonschema_specifications";
|
||||
inherit version;
|
||||
hash = "sha256-Dzi4NjmVjOEVLQKn8GKQLEHI/SDVWLDDQ0QpLUF64nI=";
|
||||
hash = "sha256-YwFZyfTb6hYaaiIFwwEcxPGP84Gxif/0i7Obm/Jq5gg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -34,6 +34,19 @@ buildPythonPackage rec {
|
||||
hash = "sha256-q8BoF/pUTW2GMKBhNsqWDBto5+nASanWifS9AcNRc8Q=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "setuptools~=69.2.0" "setuptools" \
|
||||
--replace-fail "wheel~=0.44.0" "wheel" \
|
||||
--replace-fail "cython>=0.29.1,<=3.0.11" "cython" \
|
||||
--replace-fail "packaging~=24.0" packaging
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace kivy/lib/mtdev.py \
|
||||
--replace-fail "LoadLibrary('libmtdev.so.1')" "LoadLibrary('${mtdev}/lib/libmtdev.so.1')"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
cython
|
||||
@@ -89,18 +102,6 @@ buildPythonPackage rec {
|
||||
]
|
||||
);
|
||||
|
||||
postPatch =
|
||||
''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "setuptools~=69.2.0" "setuptools" \
|
||||
--replace-fail "wheel~=0.44.0" "wheel" \
|
||||
--replace-fail "cython>=0.29.1,<=3.0.11" "cython"
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace kivy/lib/mtdev.py \
|
||||
--replace-fail "LoadLibrary('libmtdev.so.1')" "LoadLibrary('${mtdev}/lib/libmtdev.so.1')"
|
||||
'';
|
||||
|
||||
/*
|
||||
We cannot run tests as Kivy tries to import itself before being fully
|
||||
installed.
|
||||
@@ -109,8 +110,9 @@ buildPythonPackage rec {
|
||||
pythonImportsCheck = [ "kivy" ];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/kivy/kivy/releases/tag/${src.tag}";
|
||||
description = "Library for rapid development of hardware-accelerated multitouch applications";
|
||||
homepage = "https://pypi.python.org/pypi/kivy";
|
||||
homepage = "https://github.com/kivy/kivy";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ risson ];
|
||||
};
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "kombu";
|
||||
version = "5.5.2";
|
||||
version = "5.5.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-LdJ+yE/YQ6Tgpxh0JDE/h1FLNEgSy5jCXa3a+7an/w4=";
|
||||
hash = "sha256-AhoOEfz82bAmDvH7ZAiMDpK+uXbrWcHfyn3dStRWLqI=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -50,7 +50,10 @@ buildPythonPackage rec {
|
||||
|
||||
build-system = [ pdm-backend ];
|
||||
|
||||
pythonRelaxDeps = [ "tenacity" ];
|
||||
pythonRelaxDeps = [
|
||||
"packaging"
|
||||
"tenacity"
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
jsonpatch
|
||||
|
||||
@@ -14,22 +14,18 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "libpass";
|
||||
version = "1.9.0";
|
||||
version = "1.9.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ThirVondukr";
|
||||
repo = "passlib";
|
||||
tag = version;
|
||||
hash = "sha256-Q5OEQkty0/DugRvF5LA+PaDDlF/6ysx4Nel5K2kH5s4=";
|
||||
hash = "sha256-G6Fu1RjVb+OPdxt2hWpgAzTefRA41S0zV4hSvvCEWEA=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
argon2 = [ argon2-cffi ];
|
||||
bcrypt = [ bcrypt ];
|
||||
|
||||
@@ -22,11 +22,12 @@
|
||||
redis,
|
||||
setuptools,
|
||||
typing-extensions,
|
||||
valkey,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "limits";
|
||||
version = "4.0.1";
|
||||
version = "5.2.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -41,7 +42,7 @@ buildPythonPackage rec {
|
||||
postFetch = ''
|
||||
rm "$out/limits/_version.py"
|
||||
'';
|
||||
hash = "sha256-JXXjRVn3RQMqNYRYXF4LuV2DHzVF8PTeGepFkt4jDFM=";
|
||||
hash = "sha256-0D44XaSZtebMnn9mqXbaE7FB7usdu/eZ/4UE3Ye0oyA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -80,6 +81,7 @@ buildPythonPackage rec {
|
||||
# ];
|
||||
async-mongodb = [ motor ];
|
||||
async-etcd = [ aetcd ];
|
||||
valkey = [ valkey ];
|
||||
};
|
||||
|
||||
env = {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
diff --git a/tests/aio/test_storage.py b/tests/aio/test_storage.py
|
||||
index 9817d8d..1382c89 100644
|
||||
index 43fc5b1..9aa86ed 100644
|
||||
--- a/tests/aio/test_storage.py
|
||||
+++ b/tests/aio/test_storage.py
|
||||
@@ -96,102 +96,6 @@ class TestBaseStorage:
|
||||
"uri, args, expected_instance, fixture",
|
||||
[
|
||||
pytest.param("async+memory://", {}, MemoryStorage, None, id="in-memory"),
|
||||
@@ -153,94 +153,6 @@ class TestBaseStorage:
|
||||
marks=pytest.mark.memory,
|
||||
id="in-memory",
|
||||
),
|
||||
- pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {},
|
||||
@@ -93,23 +93,15 @@ index 9817d8d..1382c89 100644
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+etcd://localhost:2379",
|
||||
- {},
|
||||
- EtcdStorage,
|
||||
- lf("etcd"),
|
||||
- marks=pytest.mark.etcd,
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
class TestConcreteStorages:
|
||||
diff --git a/tests/test_storage.py b/tests/test_storage.py
|
||||
index c3961e7..4250dbf 100644
|
||||
index f9698c0..2062e3a 100644
|
||||
--- a/tests/test_storage.py
|
||||
+++ b/tests/test_storage.py
|
||||
@@ -101,110 +101,6 @@ class TestBaseStorage:
|
||||
@@ -148,102 +148,6 @@ class TestBaseStorage:
|
||||
"uri, args, expected_instance, fixture",
|
||||
[
|
||||
pytest.param("memory://", {}, MemoryStorage, None, id="in-memory"),
|
||||
@@ -208,280 +200,198 @@ index c3961e7..4250dbf 100644
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "etcd://localhost:2379",
|
||||
- {},
|
||||
- EtcdStorage,
|
||||
- lf("etcd"),
|
||||
- marks=pytest.mark.etcd,
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
class TestConcreteStorages:
|
||||
diff --git a/tests/utils.py b/tests/utils.py
|
||||
index b8350b7..be9167b 100644
|
||||
index 3341bcf..6dc2bc3 100644
|
||||
--- a/tests/utils.py
|
||||
+++ b/tests/utils.py
|
||||
@@ -66,75 +66,6 @@ all_storage = pytest.mark.parametrize(
|
||||
"uri, args, fixture",
|
||||
[
|
||||
pytest.param("memory://", {}, None, marks=pytest.mark.memory, id="in-memory"),
|
||||
- pytest.param(
|
||||
- "redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis_basic",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "memcached://localhost:22122",
|
||||
- {},
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "memcached://localhost:22122,localhost:22123",
|
||||
- {},
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "etcd://localhost:2379",
|
||||
- {},
|
||||
- lf("etcd"),
|
||||
- marks=[pytest.mark.etcd, pytest.mark.flaky],
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
@@ -90,186 +90,11 @@ ALL_STORAGES = {
|
||||
"memory": pytest.param(
|
||||
"memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- "redis": pytest.param(
|
||||
- "redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis_basic",
|
||||
- ),
|
||||
- "memcached": pytest.param(
|
||||
- "memcached://localhost:22122",
|
||||
- {},
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- "memcached-cluster": pytest.param(
|
||||
- "memcached://localhost:22122,localhost:22123",
|
||||
- {},
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- "redis-cluster": pytest.param(
|
||||
- "redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- "redis-cluster_auth": pytest.param(
|
||||
- "redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- "redis-ssl-cluster": pytest.param(
|
||||
- "redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- "redis-sentinel": pytest.param(
|
||||
- "redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- "mongodb": pytest.param(
|
||||
- "mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- "valkey": pytest.param(
|
||||
- "valkey://localhost:12379",
|
||||
- {},
|
||||
- lf("valkey_basic"),
|
||||
- marks=pytest.mark.valkey,
|
||||
- id="valkey_basic",
|
||||
- ),
|
||||
- "valkey-cluster": pytest.param(
|
||||
- "valkey+cluster://localhost:2001/",
|
||||
- {},
|
||||
- lf("valkey_cluster"),
|
||||
- marks=pytest.mark.valkey_cluster,
|
||||
- id="valkey-cluster",
|
||||
- ),
|
||||
}
|
||||
ALL_STORAGES_ASYNC = {
|
||||
"memory": pytest.param(
|
||||
"async+memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- "redis": pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- "memcached": pytest.param(
|
||||
- "async+memcached://localhost:22122",
|
||||
- {
|
||||
- "implementation": ASYNC_MEMCACHED_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- "memcached-cluster": pytest.param(
|
||||
- "async+memcached://localhost:22122,localhost:22123",
|
||||
- {
|
||||
- "implementation": ASYNC_MEMCACHED_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- "memcached-sasl": pytest.param(
|
||||
- "async+memcached://user:password@localhost:22124",
|
||||
- {
|
||||
- "implementation": ASYNC_MEMCACHED_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("memcached_sasl"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-sasl",
|
||||
- ),
|
||||
- "redis-cluster": pytest.param(
|
||||
- "async+redis+cluster://localhost:7001/",
|
||||
- {
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- "redis-cluster-auth": pytest.param(
|
||||
- "async+redis+cluster://:sekret@localhost:8400/",
|
||||
- {
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- "redis-ssl-cluster": pytest.param(
|
||||
- "async+redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- "redis-sentinel": pytest.param(
|
||||
- "async+redis+sentinel://localhost:26379/mymaster",
|
||||
- {
|
||||
- "use_replicas": False,
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- "mongodb": pytest.param(
|
||||
- "async+mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- "valkey": pytest.param(
|
||||
- "async+valkey://localhost:12379",
|
||||
- {},
|
||||
- lf("valkey_basic"),
|
||||
- marks=pytest.mark.valkey,
|
||||
- id="valkey_basic",
|
||||
- ),
|
||||
- "valkey-cluster": pytest.param(
|
||||
- "async+valkey+cluster://localhost:2001/",
|
||||
- {},
|
||||
- lf("valkey_cluster"),
|
||||
- marks=pytest.mark.valkey_cluster,
|
||||
- id="valkey-cluster",
|
||||
- ),
|
||||
}
|
||||
|
||||
@@ -142,54 +73,6 @@ moving_window_storage = pytest.mark.parametrize(
|
||||
"uri, args, fixture",
|
||||
[
|
||||
pytest.param("memory://", {}, None, marks=pytest.mark.memory, id="in-memory"),
|
||||
- pytest.param(
|
||||
- "redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -199,75 +82,6 @@ async_all_storage = pytest.mark.parametrize(
|
||||
pytest.param(
|
||||
"async+memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+memcached://localhost:22122",
|
||||
- {},
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+memcached://localhost:22122,localhost:22123",
|
||||
- {},
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+etcd://localhost:2379",
|
||||
- {},
|
||||
- lf("etcd"),
|
||||
- marks=[pytest.mark.etcd, pytest.mark.flaky],
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -277,53 +91,5 @@ async_moving_window_storage = pytest.mark.parametrize(
|
||||
pytest.param(
|
||||
"async+memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
all_storage = pytest.mark.parametrize("uri, args, fixture", ALL_STORAGES.values())
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
|
||||
# build-system
|
||||
cython,
|
||||
@@ -17,23 +18,27 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "lxml";
|
||||
version = "5.3.1";
|
||||
version = "5.4.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lxml";
|
||||
repo = "lxml";
|
||||
tag = "lxml-${version}";
|
||||
hash = "sha256-TGv2ZZQ7GU+fAWRApESUL1bbxQobbmLai8wr09xYOUw=";
|
||||
hash = "sha256-yp0Sb/0Em3HX1XpDNFpmkvW/aXwffB4D1sDYEakwKeY=";
|
||||
};
|
||||
|
||||
# setuptoolsBuildPhase needs dependencies to be passed through nativeBuildInputs
|
||||
nativeBuildInputs = [
|
||||
libxml2.dev
|
||||
libxslt.dev
|
||||
build-system = [
|
||||
cython
|
||||
setuptools
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ];
|
||||
|
||||
# required for build time dependency check
|
||||
nativeBuildInputs = [
|
||||
libxml2.dev
|
||||
libxslt.dev
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxml2
|
||||
libxslt
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "lz4";
|
||||
version = "4.4.3";
|
||||
version = "4.4.4";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
@@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||
owner = "python-lz4";
|
||||
repo = "python-lz4";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-Jnmi2eyTGbPuqw0llQ5xpUWlj+8QvRHMwkak/GsypU0=";
|
||||
hash = "sha256-RoM2U47T5WLepJlbJhJAeqKRP8Zf3twndqmMSViI5Z8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "makefun";
|
||||
version = "1.15.6";
|
||||
version = "1.16.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-JrxjRCphgvt17+2LUXQd0tHbLxdr7Ixk4gpYYla48Uk=";
|
||||
hash = "sha256-4UYBgxVwv/H21+aIKLzTDS9YVvJLrV3gzLIpIc7ryUc=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mako";
|
||||
version = "1.3.9";
|
||||
version = "1.3.10";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -32,7 +32,7 @@ buildPythonPackage rec {
|
||||
owner = "sqlalchemy";
|
||||
repo = "mako";
|
||||
tag = "rel_${lib.replaceStrings [ "." ] [ "_" ] version}";
|
||||
hash = "sha256-BC1PSmMG9KzD+w8tDUW9WXJS25HNsELgwDpkTHYO9j0=";
|
||||
hash = "sha256-lxGlYyKbrDpr2LHcsqTow+s2l8+g+63M5j8xJt++tGo=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "markdown";
|
||||
version = "3.7";
|
||||
version = "3.8";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||
owner = "Python-Markdown";
|
||||
repo = "markdown";
|
||||
tag = version;
|
||||
hash = "sha256-bIBen693MC56k4LZ+8vhbvP+E3myFXoaXpNHOlnIdG8=";
|
||||
hash = "sha256-H1xvDM2ShiPbfcpW+XGrxCxtaRFVaquuMuGg1RhjeNA=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
@@ -35,7 +35,7 @@ buildPythonPackage rec {
|
||||
pythonImportsCheck = [ "markdown" ];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/Python-Markdown/markdown/blob/${src.rev}/docs/changelog.md";
|
||||
changelog = "https://github.com/Python-Markdown/markdown/blob/${src.tag}/docs/changelog.md";
|
||||
description = "Python implementation of John Gruber's Markdown";
|
||||
mainProgram = "markdown_py";
|
||||
homepage = "https://github.com/Python-Markdown/markdown";
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "markdownify";
|
||||
version = "0.14.1";
|
||||
version = "1.1.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -21,7 +21,7 @@ buildPythonPackage rec {
|
||||
owner = "matthewwithanm";
|
||||
repo = "python-markdownify";
|
||||
tag = version;
|
||||
hash = "sha256-YJdR1wV72f9/tWQhuhGwScuRcE243fCP+wnYAzBOoV8=";
|
||||
hash = "sha256-eU0F3nc96q2U/3PGM/gnrRCmetIqutDugz6q+PIb8CU=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "marshmallow-oneofschema";
|
||||
version = "3.1.1";
|
||||
version = "3.2.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
owner = "marshmallow-code";
|
||||
repo = "marshmallow-oneofschema";
|
||||
tag = version;
|
||||
hash = "sha256-HXuyUxU8bT5arpUzmgv7m+X2fNT0qHY8S8Rz6klOGiA=";
|
||||
hash = "sha256-Hk36wxZV1hVqIbqDOkEDlqABRKE6s/NyA/yBEXzj/yM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flit-core ];
|
||||
|
||||
@@ -80,7 +80,7 @@ let
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "3.10.1";
|
||||
version = "3.10.3";
|
||||
pname = "matplotlib";
|
||||
pyproject = true;
|
||||
|
||||
@@ -88,7 +88,7 @@ buildPythonPackage rec {
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-6NLQ44gbEpJoWFv0dlrT7nOkWR13uaGMIUrH46efsro=";
|
||||
hash = "sha256-L4LSxbt66TqqpM1CrKZdds5jdvgzBPo6YwtWmsonTfA=";
|
||||
};
|
||||
|
||||
env.XDG_RUNTIME_DIR = "/tmp";
|
||||
|
||||
@@ -2,38 +2,87 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
pythonOlder,
|
||||
|
||||
# build-system, dependencies
|
||||
meson,
|
||||
ninja,
|
||||
pyproject-metadata,
|
||||
tomli,
|
||||
typing-extensions,
|
||||
pythonOlder,
|
||||
|
||||
# tests
|
||||
cython,
|
||||
pytestCheckHook,
|
||||
pytest-mock,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "meson-python";
|
||||
version = "0.17.1";
|
||||
format = "pyproject";
|
||||
version = "0.18.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version;
|
||||
pname = "meson_python";
|
||||
hash = "sha256-77kfafLhnu97yaRx7SpOcwCIzGs56srz5J/E+TDrX4M=";
|
||||
hash = "sha256-xWqZ7J32aaQGYv5GlgMhr25LFBBsFNsihwnBYo4jhI0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
meson
|
||||
ninja
|
||||
pyproject-metadata
|
||||
tomli
|
||||
] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
|
||||
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
meson
|
||||
ninja
|
||||
pyproject-metadata
|
||||
tomli
|
||||
] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
|
||||
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
cython
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Tests require a Git checkout
|
||||
"test_configure_data"
|
||||
"test_contents"
|
||||
"test_contents"
|
||||
"test_contents_license_file"
|
||||
"test_contents_subdirs"
|
||||
"test_contents_unstaged"
|
||||
"test_detect_wheel_tag_module"
|
||||
"test_detect_wheel_tag_script"
|
||||
"test_dynamic_version"
|
||||
"test_editable_install"
|
||||
"test_editable_verbose"
|
||||
"test_editble_reentrant"
|
||||
"test_entrypoints"
|
||||
"test_executable_bit"
|
||||
"test_executable_bit"
|
||||
"test_generated_files"
|
||||
"test_install_subdir"
|
||||
"test_license_pep639"
|
||||
"test_limited_api"
|
||||
"test_link_library_in_subproject"
|
||||
"test_local_lib"
|
||||
"test_long_path"
|
||||
"test_meson_build_metadata"
|
||||
"test_pep621_metadata"
|
||||
"test_pure"
|
||||
"test_purelib_and_platlib"
|
||||
"test_reproducible"
|
||||
"test_rpath"
|
||||
"test_scipy_like"
|
||||
"test_sharedlib_in_package"
|
||||
"test_symlinks"
|
||||
"test_uneeded_rpath"
|
||||
"test_user_args"
|
||||
"test_vendored_meson"
|
||||
];
|
||||
|
||||
setupHooks = [ ./add-build-flags.sh ];
|
||||
|
||||
meta = {
|
||||
@@ -42,5 +91,6 @@ buildPythonPackage rec {
|
||||
homepage = "https://github.com/mesonbuild/meson-python";
|
||||
license = [ lib.licenses.mit ];
|
||||
maintainers = with lib.maintainers; [ doronbehar ];
|
||||
teams = [ lib.teams.python ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,16 +10,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mistune";
|
||||
version = "3.1.2";
|
||||
version = "3.1.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lepture";
|
||||
repo = "mistune";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-XvDp+X/+s6TsUC889qjTGzrde6s/BYoXUw2AblaATnI=";
|
||||
hash = "sha256-aD+c41nuSmLUoYzK8adP0eLYRU0FihHEqG4e0b0GZ9k=";
|
||||
};
|
||||
|
||||
dependencies = lib.optionals (pythonOlder "3.11") [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
flit-core,
|
||||
pytestCheckHook,
|
||||
six,
|
||||
@@ -10,15 +10,17 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "more-itertools";
|
||||
version = "10.6.0";
|
||||
format = "pyproject";
|
||||
version = "10.7.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-LNf60QCcMcyftqA1EIUJ5lR1R6enODdPEL1JoJ6z7js=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "more-itertools";
|
||||
repo = "more-itertools";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-4ZzuWVRrihhEoYRDAoYLZINR11iHs0sXF/bRm6gQoEA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flit-core ];
|
||||
build-system = [ flit-core ];
|
||||
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
@@ -32,6 +34,7 @@ buildPythonPackage rec {
|
||||
homepage = "https://more-itertools.readthedocs.org";
|
||||
changelog = "https://more-itertools.readthedocs.io/en/stable/versions.html";
|
||||
description = "Expansion of the itertools module";
|
||||
downloadPage = "https://github.com/more-itertools/more-itertools";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user