Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/patch-it-dev/patch-it-plugins.svg)](https://pkg.go.dev/github.com/patch-it-dev/patch-it-plugins)
[![Go version](https://img.shields.io/github/go-mod/go-version/patch-it-dev/patch-it-plugins)](go.mod)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-3f5bf0)](LICENSE)
[![Plugins](https://img.shields.io/badge/plugins-23-3f5bf0)](docs/plugins.md)
[![Plugins](https://img.shields.io/badge/plugins-24-3f5bf0)](docs/plugins.md)
[![Docs](https://img.shields.io/badge/docs-docs.patch--it.dev-3f5bf0)](https://docs.patch-it.dev)
[![Discussions](https://img.shields.io/github/discussions/patch-it-dev/patch-it-plugins)](https://github.com/patch-it-dev/patch-it-plugins/discussions)

Expand Down
12 changes: 11 additions & 1 deletion docs/plugins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "Generated from the plugin registry and docs/plugins.md by `make plugins-json` (go run ./cmd/list-plugins). Don't edit by hand.",
"$schema": "./plugins.schema.json",
"count": 23,
"count": 24,
"plugins": [
{
"id": "algolia-ingestion",
Expand Down Expand Up @@ -123,6 +123,16 @@
"status": "live",
"provider_page": "providers/mongodb-atlas.md"
},
{
"id": "newrelic",
"provider": "New Relic",
"layer": "sdk",
"watches": "Members removed in the New Relic Python agent 11.0.0",
"format": "removedmembers",
"source_url": "https://github.com/newrelic/docs-website/blob/f0b4f817bf9a7b76a78e26609369a8a7ce764c8e/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110000.mdx",
"status": "live",
"provider_page": "providers/newrelic.md"
},
{
"id": "numpy",
"provider": "NumPy",
Expand Down
3 changes: 2 additions & 1 deletion docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The table between the `plugins:start` and `plugins:end` markers is also publishe
| [`redis`](https://github.com/patch-it-dev/patch-it-plugins/blob/main/providers/redis.md) | Redis | runtime | Commands removed entirely from Redis's own command catalog between two snapshots | `catalog` | [redis/redis-doc `commands.json`](https://github.com/redis/redis-doc/blob/master/commands.json) | live |
| [`cloudflare`](https://github.com/patch-it-dev/patch-it-plugins/blob/main/providers/cloudflare.md) | Cloudflare | API | REST API operations Cloudflare deprecates, breaking on their end-of-life date when it gives one | `feed` | [Cloudflare API deprecations (RSS)](https://developers.cloudflare.com/fundamentals/api/reference/deprecations/index.xml) | live |
| [`posthog`](https://github.com/patch-it-dev/patch-it-plugins/blob/main/providers/posthog.md) | PostHog | SDK | Members removed in the posthog Python SDK 8.0.0 | `removedmembers` | [posthog-python 7.x to 8.0 migration guide](https://github.com/PostHog/posthog-python/blob/posthog-v8.0.0/docs/migration-7.x-to-8.0.md) | live |
| [`newrelic`](https://github.com/patch-it-dev/patch-it-plugins/blob/main/providers/newrelic.md) | New Relic | SDK | Members removed in the New Relic Python agent 11.0.0 | `removedmembers` | [Python agent 11.0.0 release notes](https://github.com/newrelic/docs-website/blob/f0b4f817bf9a7b76a78e26609369a8a7ce764c8e/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110000.mdx) | live |
<!-- plugins:end -->

## The columns
Expand All @@ -46,4 +47,4 @@ The table between the `plugins:start` and `plugins:end` markers is also publishe
| Source | The provider's own public page or file the plugin reads. Every event links back to it. |
| Status | `live`: in the code on `main`. patch-it's hosted ingestion service runs it daily from the next release, which is cut automatically. `planned`: accepted, not written yet. `paused`: in the code but deliberately switched off, with the reason in the row. |

Some plugins read one pinned release (`anthropic` 1.0.0, `numpy` 2.0.0, `posthog` 8.0.0, `textual` 0.86.0, `urllib3` 2.0.0): a newer release of the same package is a new entry in that plugin, not a new row, unless it changes the format.
Some plugins read one pinned release (`anthropic` 1.0.0, `newrelic` 11.0.0, `numpy` 2.0.0, `posthog` 8.0.0, `textual` 0.86.0, `urllib3` 2.0.0): a newer release of the same package is a new entry in that plugin, not a new row, unless it changes the format.
20 changes: 16 additions & 4 deletions plugins/removedmembers/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ var (
// "§, §, and §" (each § a code span).
nameList = regexp.MustCompile(`^§(?:(?:,| and|, and| or|, or) §)*$`)
delimCell = regexp.MustCompile(`^:?-{3,}:?$`)
// A cell that is only a link around one code span: "[`name`](url)".
linkedSpan = regexp.MustCompile("^\\[(`[^`]+`)\\]\\([^()\\s]*\\)$")
)

// parseMarkdown reads a Markdown pipe table: the first one under the heading
Expand All @@ -24,7 +26,8 @@ var (
// cell is nothing but code spans naming members ("`A`, `B`"). A cell of prose
// ("The `backoff` dependency") or a span that isn't a name code writes
// ("`gzip=True`") drops the whole row; a name in g.EnvVars drops that name. The replacement is the second cell
// only when it's exactly one code span naming a member.
// only when it's exactly one code span naming a member, or a link around one;
// g.Paths applies to it as to the removed names.
func parseMarkdown(page []byte, g Guide) ([]Removal, error) {
lines := strings.Split(strings.ReplaceAll(string(page), "\r\n", "\n"), "\n")
inFence := false
Expand Down Expand Up @@ -88,6 +91,10 @@ func parseMarkdown(page []byte, g Guide) ([]Removal, error) {
continue
}
repl := soleName(cells[1], g.Module)
replPath := repl
if p, ok := g.Paths[repl]; ok {
replPath = p
}
for _, n := range names {
r := Removal{Member: n, Guideline: guideline, Excerpt: excerpt}
if p, ok := g.Paths[n]; ok {
Expand All @@ -99,7 +106,7 @@ func parseMarkdown(page []byte, g Guide) ([]Removal, error) {
case g.StillWork[n] != "":
r.Dropped = g.StillWork[n]
case repl != "" && repl != n:
r.Replacement = repl
r.Replacement = replPath
}
out = append(out, r)
}
Expand Down Expand Up @@ -181,10 +188,15 @@ func memberNames(cell, module string) (names []string, why string) {
}

// soleName is the cell's one name when the cell is exactly one code span
// naming a member, or "".
// naming a member, or a link around one ("[`name`](url)": New Relic's
// release notes link each replacement to its docs page), or "".
func soleName(cell, module string) string {
cell = strings.TrimSpace(cell)
if l := linkedSpan.FindStringSubmatch(cell); l != nil {
cell = l[1]
}
m := codeSpan.FindStringSubmatch(cell)
if m == nil || m[0] != strings.TrimSpace(cell) {
if m == nil || m[0] != cell {
return ""
}
n, ok := cleanName(m[1], module)
Expand Down
90 changes: 90 additions & 0 deletions plugins/removedmembers/newrelic.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package removedmembers

// NewRelic11 is New Relic's release note for the Python agent 11.0.0 (the
// `newrelic` package on PyPI), in newrelic/docs-website at commit
// f0b4f817bf9a7b76a78e26609369a8a7ce764c8e: that repo has no tags, so the
// commit stands in for one. Its "Removed features" section's first table,
// | Legacy API | Replacement API |: "The following APIs have been removed".
// Checked 2026-11-19.
//
// 11.0.0 is yanked on PyPI ("Issues with server-side configuration");
// 11.0.1 has the same public API (newrelic/agent.py and newrelic/api/log.py
// are byte-identical at v11.0.0 and v11.0.1). The version stays 11.0.0, the
// release that made the change.
//
// Names are kept as code writes them after `import newrelic`: the table
// writes them bare, and Paths gives each its module. Every row was checked
// against the agent's code (newrelic/newrelic-python-agent, Apache-2.0) at
// v10.17.0, the release before, and v11.0.0. The six functions were
// re-exported by newrelic/agent.py, the documented way to call the agent's
// API (`import newrelic.agent`), and are gone from it and from their
// newrelic.api modules in 11.0.0. NewRelicLogHandler was only ever
// newrelic.api.log's, never re-exported by newrelic.agent.
//
// Rename or removal: the client applies a renamed_symbol as a rename, so only
// a drop-in replacement is one (DropIns). Its 8 rows:
//
// - `add_custom_parameter` | [`add_custom_attribute`](…): renamed_symbol
// agent.add_custom_parameter -> agent.add_custom_attribute. At v10.17.0
// add_custom_parameter(key, value) only warns and returns
// add_custom_attribute(key, value), which newrelic.agent exports too.
// - `add_custom_parameters` | [`add_custom_attributes`](…): renamed_symbol
// agent.add_custom_parameters -> agent.add_custom_attributes, the same:
// add_custom_parameters(items) returns add_custom_attributes(items).
// - `accept_distributed_trace_payload` | [`accept_distributed_trace_headers`](…):
// removed_symbol. It takes New Relic's own trace payload (what
// create_distributed_trace_payload made); the replacement takes the
// request's headers (traceparent, tracestate, newrelic). Same argument
// positions, different data.
// - `create_distributed_trace_payload` | [`insert_distributed_trace_headers`](…):
// removed_symbol. It takes nothing and returns the payload; the
// replacement fills a list of headers passed in.
// - `get_browser_timing_footer` | The functionality of this has been wrapped
// into [`get_browser_timing_header()`](…): removed_symbol, prose. At
// v10.17.0 the footer already returns "" (and warns); renaming it to the
// header would put the header in a page twice.
// - `record_exception` | [`notice_error()`](…): removed_symbol.
// record_exception(exc, value, tb, params, ignore_errors, application)
// maps to notice_error(error=(exc, value, tb), attributes=params,
// ignore=ignore_errors, application=application): different arguments.
// - `NewRelicLogHandler` | `NewRelicLogForwardingHandler`: removed_symbol
// api.log.NewRelicLogHandler. The old handler takes a license key, a host
// and proxy settings and sends logs itself; the new one takes none of
// them and hands records to the agent's log forwarding.
// - `lambda_handler` & `LambdaHandlerWrapper` | These APIs have moved to the
// [`newrelic-lambda`](…) package: dropped (logged), as "&" isn't one of
// the list separators the reader takes. Both were in newrelic.agent at
// v10.17.0 and are gone at v11.0.0 (newrelic/api/lambda_handler.py with
// them), but the replacement is another package, which a symbol event
// can't say.
//
// 7 events. The section's second table, | Legacy Setting | Replacement
// Setting |, lists configuration settings (newrelic.ini keys), not members
// of the package: only the section's first table is read, so it never is.
var NewRelic11 = Guide{
Package: "newrelic",
Module: "newrelic",
Release: "11.0.0",
Tag: "f0b4f817bf9a7b76a78e26609369a8a7ce764c8e",
Repo: "newrelic/docs-website",
Path: "src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110000.mdx",
Section: "Removed features",
Format: FormatMarkdown,
Header: "Legacy API",
Doc: "release notes",
// The cells link to docs.newrelic.com by path ("/docs/agents/…").
LinkBase: "https://docs.newrelic.com",
Paths: map[string]string{
"accept_distributed_trace_payload": "agent.accept_distributed_trace_payload",
"add_custom_parameter": "agent.add_custom_parameter",
"add_custom_parameters": "agent.add_custom_parameters",
"create_distributed_trace_payload": "agent.create_distributed_trace_payload",
"get_browser_timing_footer": "agent.get_browser_timing_footer",
"record_exception": "agent.record_exception",
"NewRelicLogHandler": "api.log.NewRelicLogHandler",
// The two drop-in replacements, in newrelic.agent at v10.17.0.
"add_custom_attribute": "agent.add_custom_attribute",
"add_custom_attributes": "agent.add_custom_attributes",
},
DropIns: []string{"agent.add_custom_parameter", "agent.add_custom_parameters"},
}
Loading
Loading