Skip to content

Commit 70d8704

Browse files
authored
Fix semantic-conventions build (#87)
It is currently failing (see build failure in #85) due to pallets/markupsafe#282
1 parent c1cfc16 commit 70d8704

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

semantic-conventions/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ packages=find_namespace:
3838
install_requires =
3939
dataclasses~=0.6
4040
ruamel.yaml~=0.16
41-
Jinja2~=2.11
41+
Jinja2~=3.0
4242
mistune==2.0.0a6
4343

4444
[options.packages.find]

semantic-conventions/src/opentelemetry/semconv/templating/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,14 @@ def render(
230230
for semconv in semconvset.models.values():
231231
output_name = self.prefix_output_file(output_file, pattern, semconv)
232232
data = self.get_data_multiple_files(semconv, template_path)
233-
template = env.get_template(file_name, data)
233+
template = env.get_template(file_name, globals=data)
234234
template.globals["now"] = datetime.datetime.utcnow()
235235
template.globals["version"] = os.environ.get("ARTIFACT_VERSION", "dev")
236236
template.globals["Required"] = Required
237237
template.stream(data).dump(output_name)
238238
else:
239239
data = self.get_data_single_file(semconvset, template_path)
240-
template = env.get_template(file_name, data)
240+
template = env.get_template(file_name, globals=data)
241241
template.globals["now"] = datetime.datetime.utcnow()
242242
template.globals["version"] = os.environ.get("ARTIFACT_VERSION", "dev")
243243
template.globals["Required"] = Required

0 commit comments

Comments
 (0)