⬆️ deps: Update dependencies (non-major) #33
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.22.0->0.23.0==0.7.3->==0.8.2Release Notes
pyo3/pyo3 (pyo3)
v0.23.3Compare Source
Packaging
python3-dll-adependency to 0.2.11. #4749Fixed
abi3features enabled. #4733generate-import-libfeature. #4749PYO3_CONFIG_FILEwould not reconfigure PyO3 for the new interpreter. #4758v0.23.2Compare Source
Added
IntoPyObjectExttrait. #4708Fixed
abi3orabi3-pyxxfeatures are enabled. #4719ambiguous_associated_itemslint error in#[pyclass]and#[derive(IntoPyObject)]macros. #4725v0.23.1Compare Source
Re-release of 0.23.0 with fixes to docs.rs build.
v0.23.0Compare Source
Packaging
hashbrownoptional dependency to include version 0.15. #4604eyreoptional dependency to 0.6.8. #4617hashbrownoptional dependency to 0.14.5. #4617indexmapoptional dependency to 2.5.0. #4617num-complexoptional dependency to 0.4.6. #4617chrono-tzoptional dependency to 0.10. #4617Added
IntoPyObject(fallible) conversion trait to convert from Rust to Python values. #4060#[pyclass(str="<format string>")]option to generate__str__based on aDisplayimplementation or format string. #4233PartialEqforBound<'py, PyInt>withu8,u16,u32,u64,u128,usize,i8,i16,i32,i64,i128andisize. #4317PartialEq<f64>andPartialEq<f32>forBound<'py, PyFloat>. #4348as_superandinto_supermethods forBound<T: PyClass>. #4351PyCFunctionFastandPyCFunctionFastWithKeywords#4415PyMutexon Python 3.13 and newer. #4421PyDict::locked_for_eachto iterate efficiently on freethreaded Python. #4439PyObject_GetOptionalAttr,PyObject_GetOptionalAttrString,PyObject_HasAttrWithError,PyObject_HasAttrStringWithError,Py_CONSTANT_*constants,Py_GetConstant,Py_GetConstantBorrowed, andPyType_GetModuleByDefon Python 3.13 and newer. #4447IntoPyObject. #4495Borrowed::as_ptr. #4520PyImport_AddModuleRef. #4529PyAnyMethods::try_iter. #4553pyo3::sync::with_critical_section, a wrapper around the Python Critical Section API added in Python 3.13. #4587#[pymodule(gil_used = false)]option to declare that a module supports the free-threaded build. #4588PyModule::gil_usedmethod to declare that a module supports the free-threaded build. #4588PyDateTime_CAPSULE_NAME. #4634PyMappingProxytype to represent themappingproxyPython class. #4644PyList_ExtendandPyList_Clear. #4667IntoPyObjectRef. #4674pyo3::sync::OnceExtandpyo3::sync::OnceLockExttraits. #4676Changed
IntoPyObjectoverIntoPy<Py<PyAny>>>for#[pyfunction]and#[pymethods]return types. #4060#[pyclass]and#[pyo3(..)]attributes. #4243#[pymodule]are automatically treated as submodules (noPyInit_entrypoint is created). #4308PyAnyMethods::is_ellipsis(Py::is_ellipsiswas deprecated in PyO3 0.20). #4322PyLongin favor ofPyInt. #4347IntoPyDict::into_py_dict_boundtoIntoPyDict::into_py_dict. #4388PyModule::from_codenow expects&CStras arguments instead of&str. #4404#[pyfunction]s when compiling on abi3 for Python 3.10 and up. #4415CopyandClonefromPyObjectstruct FFI definition. #4434Python::evalandPython::runnow take a&CStrinstead of&str. #4435IPowModulo,PyClassAttributeDef,PyGetterDef,PyMethodDef,PyMethodDefType, andPySetterDeffrom PyO3's public API. #4441IntoPyObjectimpls forVec<u8>,&[u8],[u8; N],Cow<[u8]>andSmallVec<[u8; N]>now convert into Pythonbytesrather than alistof integers. #4442IntoPyDict::into_py_dictis now fallible due toIntoPyObjectmigration. #4493abi3feature will now override config files provided viaPYO3_BUILD_CONFIG. #4497GILProtectedstruct on free-threaded Python. #4504PyListMethods::get_item_uncheckedon free-threaded Python. #4539GILOnceCell::import. #4542PyAnyMethods::iterin favour ofPyAnyMethods::try_iter. #4553#[pyclass]macro now requires a types to beSync. (Except for#[pyclass(unsendable)]types). #4566PyList::newandPyTuple::neware now fallible due toIntoPyObjectmigration. #4580PyErr::matchesis now fallible due toIntoPyObjectmigration. #4595ToPyObjectin favour ofIntoPyObject#4595PyWeakrefMethods::get_option. #4597PyWeakrefMethodstrait. #4598PyNativeTypeInitializerandPyObjectInitfrom the PyO3 public API. #4611IntoPyin favor ofIntoPyObject#4618PyErr::take()andPyErr::fetch()on Python 3.11 and older. #4655IntoPy::type_outputtoIntoPyObject::type_output. #4657PyMapping::keys,PyMapping::valuesandPyMapping::itemstoBound<'py, PyList>instead ofBound<'py, PySequence>. #4661IntoPyObjectby reference or by value together withClone. This makesPy<T>available as field type. #4694Removed
PyUnicodein favour ofPyString. #4370gil-refsfeature. #4378_Py_IMMORTAL_REFCNT,_Py_IsImmortal,_Py_TPFLAGS_STATIC_BUILTIN,_Py_Dealloc,_Py_IncRef,_Py_DecRef. #4447_Py_c_sum,_Py_c_diff,_Py_c_neg,_Py_c_prod,_Py_c_quot,_Py_c_pow,_Py_c_abs. #4521_borrowedmethods ofPyWeakRefandPyWeakRefProxy. #4528_PyErr_ChainExceptions. #4534Fixed
lib_dirwhen cross-compiling. #4389Py_Isfor PyPy on 3.10 to call the function defined by PyPy. #4447#[cfg]attributes for simple enum variants. #4509non_snake_casemethod names inside#[pymethods]generated code. #4567#[derive(FromPyObject)]generic struct with trait bounds. #4645#[classmethod]and#[staticmethod]on magic methods. #4654unsafe_op_in_unsafe_fnin generated macro code. #4674#[pyclass] enums with custom__eq__implementation. #4692non_upper_case_globalslint firing for generated__match_args__on complex enums. #4705astral-sh/ruff (ruff)
v0.8.2Compare Source
Preview features
airflow] Avoid deprecated values (AIR302) (#14582)airflow] Extend removed names forAIR302(#14734)ruff] Extendunnecessary-regular-expressionto non-literal strings (RUF055) (#14679)ruff] Implementused-dummy-variable(RUF052) (#14611)ruff] Implementunnecessary-cast-to-int(RUF046) (#14697)Rule changes
airflow] CheckAIR001from builtin or providersoperatorsmodule (#14631)flake8-pytest-style] Remove@inpytest.mark.parametrizerule messages (#14770)pandas-vet] Skip rules if thepandamodule hasn't been seen (#14671)pylint] Fix false negatives forasciiandsortedinlen-as-condition(PLC1802) (#14692)refurb] Guardhashlibimports and markhashlib-digest-hexfix as safe (FURB181) (#14694)Configuration
flake8-import-conventions] Improve syntax check for aliases supplied in configuration forunconventional-import-alias(ICN001) (#14745)Bug fixes
@no_type_checkcontexts (F821,F722) (#14615) (#14726)pep8-naming] Avoid false positive forclass Bar(type(foo))(N804) (#14683)pycodestyle] Handle f-strings properly forinvalid-escape-sequence(W605) (#14748)pylint] Ignore@overloadinPLR0904(#14730)refurb] Handle non-finite decimals inverbose-decimal-constructor(FURB157) (#14596)ruff] Avoid emittingassignment-in-assertwhen all references to the assigned variable are themselves insideasserts (RUF018) (#14661)Documentation
flake8-use-pathlibrules (#14741)flake8-comprehensionsrules (#14729)flake8-type-checking] ExpandsTC006docs to better explain itself (#14749)v0.8.1Compare Source
Preview features
**) in overlong f-string expressions (#14489)airflow] Avoid implicitscheduleargument toDAGand@dag(AIR301) (#14581)flake8-builtins] Exempt private built-in modules (A005) (#14505)flake8-pytest-style] Fixpytest.mark.parametrizerules to check calls instead of decorators (#14515)flake8-type-checking] Implementruntime-cast-value(TC006) (#14511)flake8-type-checking] Implementunquoted-type-alias(TC007) andquoted-type-alias(TC008) (#12927)flake8-use-pathlib] RecommendPath.iterdir()overos.listdir()(PTH208) (#14509)pylint] Extendinvalid-envvar-defaultto detectos.environ.get(PLW1508) (#14512)pylint] Implementlen-test(PLC1802) (#14309)refurb] Fix bug where methods defined using lambdas were flagged byFURB118(#14639)ruff] Auto-addrprefix when string has no backslashes forunraw-re-pattern(RUF039) (#14536)ruff] Implementinvalid-assert-message-literal-argument(RUF040) (#14488)ruff] Implementunnecessary-nested-literal(RUF041) (#14323)ruff] Implementunnecessary-regular-expression(RUF055) (#14659)Rule changes
pep8-naming] Eliminate false positives for single-letter names (N811,N814) (#14584)pyflakes] Avoid false positives in@no_type_checkcontexts (F821,F722) (#14615)ruff] Detect redirected-noqa in file-level comments (RUF101) (#14635)ruff] Mark fixes forunsorted-dunder-allandunsorted-dunder-slotsas unsafe when there are complex comments in the sequence (RUF022,RUF023) (#14560)Bug fixes
None | Noneforredundant-none-literal(PYI061) andnever-union(RUF020) (#14583, #14589)flake8-bugbear] Fixmutable-contextvar-defaultto resolve annotated function calls properly (B039) (#14532)flake8-pyi,ruff] Fix traversal of nested literals and unions (PYI016,PYI051,PYI055,PYI062,RUF041) (#14641)flake8-pyi] Avoid rewriting invalid type expressions inunnecessary-type-union(PYI055) (#14660)flake8-type-checking] Avoid syntax errors and type checking problem for quoted annotations autofix (TC003,TC006) (#14634)pylint] Do not wrap function calls in parentheses in the fix for unnecessary-dunder-call (PLC2801) (#14601)ruff] Handleattrs'sauto_attribscorrectly (RUF009) (#14520)v0.8.0Compare Source
Check out the blog post for a migration guide and overview of the changes!
Breaking changes
See also, the "Remapped rules" section which may result in disabled rules.
Default to Python 3.9
Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version is configured using
ruff.target-versionorproject.requires-python(#13896)Changed location of
pydoclintdiagnosticspydoclintdiagnostics now point to the first-line of the problematic docstring. Previously, this was not the case.If you've opted into these preview rules but have them suppressed using
noqacomments insome places, this change may mean that you need to move the
noqasuppressioncomments. Most users should be unaffected by this change.
Use XDG (i.e.
~/.local/bin) instead of the Cargo home directory in the standalone installerPreviously, Ruff's installer used
$CARGO_HOMEor~/.cargo/binfor its target install directory. Now, Ruff will be installed into$XDG_BIN_HOME,$XDG_DATA_HOME/../bin, or~/.local/bin(in that order).This change is only relevant to users of the standalone Ruff installer (using the shell or PowerShell script). If you installed Ruff using uv or pip, you should be unaffected.
Changes to the line width calculation
Ruff now uses a new version of the unicode-width Rust crate to calculate the line width. In very rare cases, this may lead to lines containing Unicode characters being reformatted, or being considered too long when they were not before (
E501).Removed Rules
The following deprecated rules have been removed:
missing-type-self(ANN101)missing-type-cls(ANN102)syntax-error(E999)pytest-missing-fixture-name-underscore(PT004)pytest-incorrect-fixture-name-underscore(PT005)unpacked-list-comprehension(UP027)Remapped rules
The following rules have been remapped to new rule codes:
flake8-type-checking:TCHtoTCStabilization
The following rules have been stabilized and are no longer in preview:
builtin-import-shadowing(A004)mutable-contextvar-default(B039)fast-api-redundant-response-model(FAST001)fast-api-non-annotated-dependency(FAST002)dict-index-missing-items(PLC0206)pep484-style-positional-only-argument(PYI063)redundant-final-literal(PYI064)bad-version-info-order(PYI066)parenthesize-chained-operators(RUF021)unsorted-dunder-all(RUF022)unsorted-dunder-slots(RUF023)assert-with-print-message(RUF030)unnecessary-default-type-args(UP043)The following behaviors have been stabilized:
ambiguous-variable-name(E741): Violations in stub files are now ignored. Stub authors typically don't control variable names.printf-string-formatting(UP031): Report allprintf-like usages even if no autofix is availableThe following fixes have been stabilized:
zip-instead-of-pairwise(RUF007)Preview features
flake8-datetimez] Exemptmin.time()andmax.time()(DTZ901) (#14394)flake8-pie] Mark fix as unsafe if the following statement is a string literal (PIE790) (#14393)flake8-pyi] New ruleredundant-none-literal(PYI061) (#14316)flake8-pyi] Add autofix forredundant-numeric-union(PYI041) (#14273)ruff] New rulemap-int-version-parsing(RUF048) (#14373)ruff] New ruleredundant-bool-literal(RUF038) (#14319)ruff] New ruleunraw-re-pattern(RUF039) (#14446)pycodestyle] Exemptpytest.importorskip()calls (E402) (#14474)pylint] Autofix suggests using sets when possible (PLR1714) (#14372)Rule changes
invalid-pyproject-toml(RUF200): Updated to reflect the provisionally accepted PEP 639.flake8-pyi] Avoid panic in unfixable case (PYI041) (#14402)flake8-type-checking] Correctly handle quotes in subscript expression when generating an autofix (#14371)pylint] Suggest correct autofix for__contains__(PLC2801) (#14424)Configuration
ignores a rule that has been removed (#14435)lint.flake8-import-conventions.aliasesonly uses valid module names and aliases (#14477)v0.7.4Compare Source
Preview features
flake8-datetimez] Detect usages ofdatetime.max/datetime.min(DTZ901) (#14288)flake8-logging] Implementroot-logger-calls(LOG015) (#14302)flake8-no-pep420] Detect empty implicit namespace packages (INP001) (#14236)flake8-pyi] Add "replace withSelf" fix (PYI019) (#14238)perflint] Implement quick-fix formanual-list-comprehension(PERF401) (#13919)pylint] Implementshallow-copy-environ(W1507) (#14241)ruff] Implementnone-not-at-end-of-union(RUF036) (#14314)ruff] Implementationunsafe-markup-callfromflake8-markupsafeplugin (RUF035) (#14224)ruff] Report problems forattrsdataclasses (RUF008,RUF009) (#14327)Rule changes
flake8-boolean-trap] Exclude dunder methods that define operators (FBT001) (#14203)flake8-pyi] Add "replace withSelf" fix (PYI034) (#14217)flake8-pyi] Always autofixduplicate-union-members(PYI016) (#14270)flake8-pyi] Improve autofix for nested and mixed type unions forunnecessary-type-union(PYI055) (#14272)flake8-pyi] Mark fix as unsafe when type annotation contains comments forduplicate-literal-member(PYI062) (#14268)Server
ruff.configuration(#14352)Bug fixes
PLC014(useless-import-alias) andI002(missing-required-import) by consideringlint.isort.required-importsforPLC014(#14287)flake8-type-checking] Skip quoting annotation if it becomes invalid syntax (TCH001)flake8-pyi] Avoid usingtyping.Selfin stub files pre-Python 3.11 (PYI034) (#14230)flake8-pytest-style] Flagpytest.raisescall with keyword argumentexpected_exception(PT011) (#14298)flake8-simplify] Infer "unknown" truthiness for literal iterables whose items are all unpacks (SIM222) (#14263)flake8-type-checking] Fix false positives fortyping.Annotated(TCH001) (#14311)pylint] Allowawaitat the top-level scope of a notebook (PLE1142) (#14225)pylint] Fix miscellaneous issues inawait-outside-asyncdetection (PLE1142) (#14218)pyupgrade] Avoid applying PEP 646 rewrites in invalid contexts (UP044) (#14234)pyupgrade] Detect permutations in redundant open modes (UP015) (#14255)refurb] Avoid triggeringhardcoded-string-charsetfor reordered sets (FURB156) (#14233)refurb] Further special cases added toverbose-decimal-constructor(FURB157) (#14216)refurb] UseUserStringinstead of non-existentUserStr(FURB189) (#14209)ruff] Avoid treating lowercase letters as# noqacodes (RUF100) (#14229)ruff] Do not report whenOptionalhas no type arguments (RUF013) (#14181)Documentation
F704,PLE1142(#14266)Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.