[orm] [bug] Added new attribute _orm.ORMExecuteState.is_from_statement to
detect statements created using _sql.Select.from_statement(), and
enhanced FromStatement to set _orm.ORMExecuteState.is_select,
_orm.ORMExecuteState.is_insert,
_orm.ORMExecuteState.is_update, and
_orm.ORMExecuteState.is_delete according to the element that is
sent to the _sql.Select.from_statement() method itself.
[orm] [bug] Fixed issue in _orm.selectin_polymorphic() loader option where
attributes defined with _orm.composite() on a superclass would cause
an internal exception on load.
[orm] [bug] [regression] Fixed regression from 1.4 where using _orm.defaultload() in
conjunction with a non-propagating loader like _orm.contains_eager()
would nonetheless propagate the _orm.contains_eager() to a lazy load
operation, causing incorrect queries as this option is only intended to
come from an original load.
[orm] [bug] Fixed issue in ORM Annotated Declarative where typing issue where literals
defined using PEP 695 type aliases would not work with inference of
Enum datatypes. Pull request courtesy of Alc-Alc.
[orm] [bug] Fixed issue in _orm.selectin_polymorphic() loader option where the
SELECT emitted would only accommodate for the child-most class among the
result rows that were returned, leading intermediary-class attributes to be
unloaded if there were no concrete instances of that intermediary-class
present in the result. This issue only presented itself for multi-level
inheritance hierarchies.
[orm] [bug] Fixed issue in _orm.Session.bulk_save_objects() where the form of the
identity key produced when using return_defaults=True would be
incorrect. This could lead to an errors during pickling as well as identity
map mismatches.
This release of the Python agent adds agent_language to lambda metadata, support for injecting the agent into Kubernetes, support for psycopg 3.0+, optimizes plugins list capturing, fixes the Large Language Model event duration units, a crash in ASGI when the Content-Length header is missing, a crash when using OpenAI's .with_raw_response. and .with_streaming_response..
Skip checking for a package version on newrelic hooks that we know do not have versions.
Add support for injecting the agent into Kubernetes
Updates the bootstrap sitecustomize file to support injecting the agent into a Kubernetes cluster.
A full product for agent injection in Kubernetes will be coming soon in public preview.
A new informational only setting called k8s_operator.enabled (with NEW_RELIC_K8S_OPERATOR_ENABLED as an environment variable) was added, which is used to report when the agent is injected into a Kubernetes cluster. This setting does not enable/disable this function of the agent.
New instrumentation for psycopg 3.0+ has been added, providing database tracing for both the Connection and AsyncConnection classes.
Bug fixes
Fix Large Language Model event duration units
Previously, durations on LLM events were recorded in seconds which did not match some of the other language agents. This has been changed to be milliseconds.
Previously, an exception would be raised inside the instrumentation when .with_raw_response. was used. This no longer happens, the instrumentation successfuly records LLM data when .with_raw_response. is used.
Fix crash when using OpenAI's .with_streaming_response.
Previously, an exception would be raised inside the instrumentation when .with_streaming_response. was used. This no longer happens, the instrumentation is just skipped.
Fix a crash in ASGI when the Content-Length header is missing
Previously, an exception would be raised inside the instrumentation that injects the browser agent when an ASGI response was missing the Content-Length header. This issue has been fixed.
Support statement
We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.
See the New Relic Python agent EOL policy for information about agent releases and support dates.
#12355: Fix possible catastrophic performance slowdown on a certain parametrization pattern involving many higher-scoped parameters.
#12367: Fix a regression in pytest 8.2.0 where unittest class instances (a fresh one is created for each test) were not released promptly on test teardown but only on session teardown.
#12381: Fix possible "Directory not empty" crashes arising from concurent cache dir (.pytest_cache) creation. Regressed in pytest 8.2.0.
Improved Documentation
#12290: Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme.
#12356: Added a subsection to the documentation for debugging flaky tests to mention
lack of thread safety in pytest as a possible source of flakyness.
#12363: The documentation webpages now links to a canonical version to reduce outdated documentation in search engine results.
[pycodestyle] Adapt fix for E203 to work identical to ruff format (#10999)
Formatter
Fix formatter instability for lines only consisting of zero-width characters (#11748)
Server
Add supported commands in server capabilities (#11850)
Use real file path when available in ruff server (#11800)
Improve error message when a command is run on an unavailable document (#11823)
Introduce the ruff.printDebugInformation command (#11831)
Tracing system now respects log level and trace level, with options to log to a file (#11747)
CLI
Handle non-printable characters in diff view (#11687)
Bug fixes
[refurb] Avoid suggesting starmap when arguments are used outside call (FURB140) (#11830)
[flake8-bugbear] Avoid panic in B909 when checking large loop blocks (#11772)
[refurb] Fix misbehavior of operator.itemgetter when getter param is a tuple (FURB118) (#11774)
0.4.8
Performance
Linter performance has been improved by around 10% on some microbenchmarks by refactoring the lexer and parser to maintain synchronicity between them (#11457)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the minor-patch group with 5 updates in the / directory:
2.0.29
2.0.30
9.10.0
9.11.0
8.2.1
8.2.2
2.32.2
2.32.3
0.4.6
0.4.9
Updates
sqlalchemy
from 2.0.29 to 2.0.30Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
newrelic
from 9.10.0 to 9.11.0Release notes
Sourced from newrelic's releases.
Commits
16838fb
Fix release strategy (#1166)7c839f0
Merge pull request #1162 from newrelic/develop-k8s-agent-operatord969238
Merge branch 'main' into develop-k8s-agent-operator4ddc5b1
Merge pull request #1165 from newrelic/fix-package-capture18e2974
Merge branch 'main' into develop-k8s-agent-operatorb9ce4e1
Merge branch 'main' into fix-package-capture44ccef0
Merge pull request #1160 from newrelic/fix-bug-in-asgi-wrappere818420
Fixup: remove restatsd070f58
Fixup: remove unused imports7495c9e
Disable package capture when testingUpdates
pytest
from 8.2.1 to 8.2.2Release notes
Sourced from pytest's releases.
Commits
329d371
Prepare release version 8.2.2214d098
Merge pull request #12414 from bluetech/backport-12409153a436
[8.2.x] fixtures: fix catastrophic performance problem inreorder_items
b41d5a5
Merge pull request #12412 from pytest-dev/backport-12408-to-8.2.x9bb73d7
[8.2.x] cacheprovider: fix "Directory not empty" crash from cache directory c...4569a01
[8.2.x] doc: Update trainings/events (#12402)1d103e5
[8.2.x] Clarify pytest_ignore_collect docs (#12386)240a252
[8.2.x] Add html_baseurl to sphinx conf.py (#12372)a5ee3c4
Merge pull request #12370 from pytest-dev/backport-12368-to-8.2.xf7358ae
[8.2.x] unittest: fix class instances no longer released on test teardown sin...Updates
requests
from 2.32.2 to 2.32.3Release notes
Sourced from requests's releases.
Changelog
Sourced from requests's changelog.
Commits
0e322af
v2.32.3e188799
Don't create default SSLContext if ssl module isn't present (#6724)145b539
Merge pull request #6716 from sigmavirus24/bug/6715b1d73dd
Don't use default SSLContext with custom poolmanager kwargs6badbac
Update HISTORY.mda62a2d3
Allow for overriding of specific pool key paramsUpdates
ruff
from 0.4.6 to 0.4.9Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
4f49e91
Bump version to v0.4.9 (#11872)d681a45
Makeruff_db
a required crate forruff_python_semantic
(#11874)89bb07c
UPDATE latest supported versions to 3.13 (#11870)fe462b3
Update Python compatibility to 3.13 (#11861)c5bc368
[red-knot] ImproveVfs
andFileSystem
documentation (#11856)73370fe
Usestarts_with('/')
instead ofis_absolute
to avoid platform specific AP...22b6488
red-knot: Add directory support toMemoryFileSystem
(#11825)d4dd96d
red-knot:source_text
,line_index
, andparsed_module
queries (#11822)efbf7b1
red-knot[salsa part 2]: Setup semantic DB and Jar (#11837)9dc226b
Add supported commands in server capabilities (#11850)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show