Skip to content

Commit ac2588a

Browse files
Merge branch 'main' into generates_main_code
2 parents 467dc51 + fe5c437 commit ac2588a

File tree

16 files changed

+262
-225
lines changed

16 files changed

+262
-225
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ steps:
1111
matrix:
1212
setup:
1313
python:
14-
- "3.8"
1514
- "3.9"
1615
- "3.10"
1716
- "3.11"
@@ -24,7 +23,7 @@ steps:
2423
- "test"
2524
adjustments:
2625
- with:
27-
python: "3.8"
26+
python: "3.9"
2827
connection: "urllib3"
2928
nox_session: "test_otel"
3029
- with:

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
41+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
4242
nox-session: [""]
4343
runs-on: ["ubuntu-latest"]
4444

docs/reference/esql-pandas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ You can now analyze the data with Pandas or you can also continue transforming t
355355

356356
## Analyze the data with Pandas [analyze-data]
357357

358-
In the next example, the [STATS … BY](elasticsearch://reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command is utilized to count how many employees are speaking a given language. The results are sorted with the `languages` column using [SORT](elasticsearch://reference/query-languages/esql/commands/processing-commands.md#esql-sort):
358+
In the next example, the [STATS … BY](elasticsearch://reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command is utilized to count how many employees are speaking a given language. The results are sorted with the `languages` column using [SORT](elasticsearch://reference/query-languages/esql/commands/processing-commands.md#esql-sort):
359359

360360
```python
361361
response = client.esql.query(

docs/reference/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This page guides you through the installation process of the Python client, show
1111

1212
### Requirements [_requirements]
1313

14-
* [Python](https://www.python.org/) 3.8 or newer
14+
* [Python](https://www.python.org/) 3.9 or newer
1515
* [`pip`](https://pip.pypa.io/en/stable/), installed by default alongside Python
1616

1717

elasticsearch/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
# Ensure that a compatible version of elastic-transport is installed.
3030
_version_groups = tuple(int(x) for x in re.search(r"^(\d+)\.(\d+)\.(\d+)", _elastic_transport_version).groups()) # type: ignore[union-attr]
31-
if _version_groups < (8, 0, 0) or _version_groups > (9, 0, 0):
31+
if _version_groups < (9, 1, 0) or _version_groups > (10, 0, 0):
3232
raise ImportError(
3333
"An incompatible version of elastic-transport is installed. Must be between "
34-
"v8.0.0 and v9.0.0. Install the correct version with the following command: "
35-
"$ python -m pip install 'elastic-transport>=8, <9'"
34+
"v9.1.0 and v10.0.0. Install the correct version with the following command: "
35+
"$ python -m pip install 'elastic-transport>=9.1, <10'"
3636
)
3737

3838
_version_groups = re.search(r"^(\d+)\.(\d+)\.(\d+)", __versionstr__).groups() # type: ignore[assignment, union-attr]

elasticsearch/_otel.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ def span(
6767
*,
6868
endpoint_id: str | None,
6969
path_parts: Mapping[str, str],
70-
) -> Generator[OpenTelemetrySpan, None, None]:
70+
) -> Generator[OpenTelemetrySpan]:
7171
if not self.enabled or self.tracer is None:
7272
yield OpenTelemetrySpan(None)
7373
return
7474

7575
span_name = endpoint_id or method
7676
with self.tracer.start_as_current_span(span_name) as otel_span:
7777
otel_span.set_attribute("http.request.method", method)
78-
otel_span.set_attribute("db.system", "elasticsearch")
78+
otel_span.set_attribute("db.system.name", "elasticsearch")
7979
if endpoint_id is not None:
80-
otel_span.set_attribute("db.operation", endpoint_id)
80+
otel_span.set_attribute("db.operation.name", endpoint_id)
8181
for key, value in path_parts.items():
82-
otel_span.set_attribute(f"db.elasticsearch.path_parts.{key}", value)
82+
otel_span.set_attribute(f"db.operation.parameter.{key}", value)
8383

8484
yield OpenTelemetrySpan(
8585
otel_span,
@@ -88,20 +88,20 @@ def span(
8888
)
8989

9090
@contextlib.contextmanager
91-
def helpers_span(self, span_name: str) -> Generator[OpenTelemetrySpan, None, None]:
91+
def helpers_span(self, span_name: str) -> Generator[OpenTelemetrySpan]:
9292
if not self.enabled or self.tracer is None:
9393
yield OpenTelemetrySpan(None)
9494
return
9595

9696
with self.tracer.start_as_current_span(span_name) as otel_span:
97-
otel_span.set_attribute("db.system", "elasticsearch")
98-
otel_span.set_attribute("db.operation", span_name)
97+
otel_span.set_attribute("db.system.name", "elasticsearch")
98+
otel_span.set_attribute("db.operation.name", span_name)
9999
# Without a request method, Elastic APM does not display the traces
100100
otel_span.set_attribute("http.request.method", "null")
101101
yield OpenTelemetrySpan(otel_span)
102102

103103
@contextlib.contextmanager
104-
def use_span(self, span: OpenTelemetrySpan) -> Generator[None, None, None]:
104+
def use_span(self, span: OpenTelemetrySpan) -> Generator[None]:
105105
if not self.enabled or self.tracer is None or span.otel_span is None:
106106
yield
107107
return

elasticsearch/dsl/document_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def __init__(self, name: str, bases: Tuple[type, ...], attrs: Dict[str, Any]):
171171
# # ignore attributes
172172
# field10: ClassVar[string] = "a regular class variable"
173173
annotations = attrs.get("__annotations__", {})
174-
fields = set([n for n in attrs if isinstance(attrs[n], Field)])
174+
fields = {n for n in attrs if isinstance(attrs[n], Field)}
175175
fields.update(annotations.keys())
176176
field_defaults = {}
177177
for name in fields:

examples/fastapi-apm/dockerfiles/Dockerfile.app

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8
1+
FROM python:3.9
22

33
EXPOSE 9292
44
WORKDIR /

examples/fastapi-apm/dockerfiles/Dockerfile.ping

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8
1+
FROM python:3.9
22
WORKDIR /
33
RUN python -m pip install \
44
--no-cache \

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ def pytest_argv():
4444
]
4545

4646

47-
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
47+
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
4848
def test(session):
4949
session.install("-e", ".[dev]", env=INSTALL_ENV, silent=False)
5050

5151
session.run(*pytest_argv(), *session.posargs)
5252

5353

54-
@nox.session(python=["3.8", "3.13"])
54+
@nox.session(python=["3.9", "3.13"])
5555
def test_otel(session):
5656
session.install(
5757
".[dev]",

0 commit comments

Comments
 (0)