Skip to content

go_test: change directory before use init() functions run#2696

Merged
jayconrod merged 6 commits intobazel-contrib:masterfrom
dragonsinth:test_init
Oct 30, 2020
Merged

go_test: change directory before use init() functions run#2696
jayconrod merged 6 commits intobazel-contrib:masterfrom
dragonsinth:test_init

Conversation

@dragonsinth
Copy link
Copy Markdown
Contributor

Fixes #1918 go_test: data not available in init()

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

Forces a new package, go/tools/test_init to have its package initializer run before any Go user code can be initialized. This package sets the correct working directory, PWD, and TMPDIR to match bazel standards.

Which issues(s) does this PR fix?

Fixes #1918

@dragonsinth
Copy link
Copy Markdown
Contributor Author

Looks like I have some things to fix!

Copy link
Copy Markdown
Collaborator

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. Couple comments below.

Comment thread BUILD.bazel Outdated
"//go/platform:internal_cgo_off": None,
"//conditions:default": ":cgo_context_data",
}),
test_init = "//go/tools/test_init",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be an implicit dependency of go_test.

coverdata is a little different, because every go_library might need to import it. test_init only needs to be imported by go_test archives.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for being so dense, but how do I do that exactly? I tried doing that first, but I could never figure out exactly how and where to add this dep without following the coverdata pattern. I can try hacking at this more and give more detail on exactly what I ran into.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_testmain_additional_srcs is a better pattern to follow. Add an attribute to go_test that starts with _. It should be an attr.label with a default value pointing to that go_library target.

Copy link
Copy Markdown
Contributor Author

@dragonsinth dragonsinth Oct 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm close, but I'm missing something. I added this:

--- a/go/private/rules/test.bzl
+++ b/go/private/rules/test.bzl
@@ -137,12 +137,14 @@ def _go_test_impl(ctx):
         resolve = None,
     )
     test_deps = external_archive.direct + [external_archive]
-    test_deps.append(go.test_init)
+    print("test_deps[0]:", type(test_deps[0]), test_deps[0])
+    print("_testmain_additional_deps[0]:", type(ctx.files._testmain_additional_deps[0]), ctx.files._testmain_additional_deps[0])
+    print("go.coverdata:", type(go.coverdata), go.coverdata)
     if ctx.configuration.coverage_enabled:
         test_deps.append(go.coverdata)
     test_source = go.library_to_source(go, struct(
         srcs = [struct(files = [main_go] + ctx.files._testmain_additional_srcs)],
-        deps = test_deps,
+        deps = test_deps + ctx.files._testmain_additional_deps,
     ), test_library, False)
     test_archive, executable, runfiles = go.binary(
         go,
@@ -201,6 +203,10 @@ _go_test_kwargs = {
             default = ["@io_bazel_rules_go//go/tools/testwrapper:srcs"],
             allow_files = go_exts,
         ),
+        "_testmain_additional_deps": attr.label_list(
+            providers = [GoLibrary],
+            default = ["@io_bazel_rules_go//go/tools/testinit"],
+        ),
         # Workaround for bazelbuild/bazel#6293. See comment in lcov_merger.sh.
         "_lcov_merger": attr.label(
             executable = True,

But the thing is, when I get to the print statements, the _testmain_additional_deps[0] is a File, whereas go.coverdata is a struct. I can't figure out how to make it be the kind of thing it needs to be. :/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved all the feedback except for this-- I'm a little out of my depth. :(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright.. I finally stumbled my way through this! I needed ctx.attr._testmain_additional_deps to get the actual target, not ctx.files._testmain_additional_deps which only has the output file. Big oof!

Comment thread go/tools/builders/generate_test_main.go Outdated
Comment thread go/tools/test_init/test_init.go Outdated
Comment thread go/tools/test_init/test_init.go Outdated
@dragonsinth
Copy link
Copy Markdown
Contributor Author

dragonsinth commented Oct 29, 2020

@jayconrod does this repo not run correctly under OSX? I'm sorry to be asking such an off topic question, but I can't get things to build on my machine due to '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin_x86_64'. I've reinstalled xcode command line tools, bazel clean expunge, bazel sync, and nothing I've tried lets me get this running locally. (This is on master, not even on my branch.)

@jayconrod
Copy link
Copy Markdown
Collaborator

It should work on macOS. I do most of my development there.

Sounds like a C/C++ toolchain configuration problem? Are you able to build a cc_binary? Not sure I can help much there.

@dragonsinth
Copy link
Copy Markdown
Contributor Author

Sounds like a C/C++ toolchain configuration problem? Are you able to build a cc_binary? Not sure I can help much there.

I was able to get past this-- the problem is only with tests/core/cgo/objc:objc_test. I just commented it out locally and everything else builds fine.

@dragonsinth
Copy link
Copy Markdown
Contributor Author

All feedback should now be addressed.

@dragonsinth dragonsinth requested a review from jayconrod October 29, 2020 19:45
Copy link
Copy Markdown
Collaborator

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks again for working on this!

@jayconrod jayconrod merged commit 9c1568a into bazel-contrib:master Oct 30, 2020
@dragonsinth dragonsinth deleted the test_init branch October 31, 2020 04:59
dragonsinth added a commit to dragonsinth/rules_go that referenced this pull request Oct 31, 2020
@dragonsinth
Copy link
Copy Markdown
Contributor Author

Sweet! Funny enough, I was meaning to add test coverage as well. So I went ahead and opened a new PR.

jayconrod pushed a commit that referenced this pull request Nov 9, 2020
mikedanese added a commit to mikedanese/kubernetes that referenced this pull request Jan 7, 2021
There was a bug with init() but it was resolved in
bazel-contrib/rules_go#2696

Changed to match other fixture methods.

Change-Id: I882b8535e5c5c117fb10c41d34c8eed1ccdb74bb
k8s-publishing-bot pushed a commit to kubernetes/legacy-cloud-providers that referenced this pull request Jan 8, 2021
There was a bug with init() but it was resolved in
bazel-contrib/rules_go#2696

Changed to match other fixture methods.

Change-Id: I882b8535e5c5c117fb10c41d34c8eed1ccdb74bb

Kubernetes-commit: 77261377dec3a22fef6cc7b5eb38322539bddee6
adamzhoul pushed a commit to adamzhoul/kubernetes that referenced this pull request Jan 11, 2021
There was a bug with init() but it was resolved in
bazel-contrib/rules_go#2696

Changed to match other fixture methods.

Change-Id: I882b8535e5c5c117fb10c41d34c8eed1ccdb74bb
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
…#2696)

Bumps [babel](https://github.com/python-babel/babel) from 2.16.0 to
2.17.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/python-babel/babel/releases">babel's
releases</a>.</em></p>
<blockquote>
<h2>v2.17.0</h2>
<p>Happy 2025! This release is being made from FOSDEM 2025, in Brussels,
Belgium. 🇧🇪</p>
<p>Thank you to all contributors, new and old, and here's to another
great year of internationalization and localization!</p>
<hr />
<p>The changelog below is auto-generated by GitHub.</p>
<p>Please see <a
href="https://github.com/python-babel/babel/blob/b50a1d2186c20f3359f7e10853d2b2225a46ed40/CHANGES.rst">CHANGELOG.rst</a>
for additional details.</p>
<hr />
<h2>What's Changed</h2>
<ul>
<li>Fix deprecation warnings for <code>datetime.utcnow()</code> by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1119">python-babel/babel#1119</a></li>
<li>Enclose white spaces in references by <a
href="https://github.com/Dunedan"><code>@​Dunedan</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1105">python-babel/babel#1105</a></li>
<li>Replace <code>str.index</code> with <code>str.find</code> by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1130">python-babel/babel#1130</a></li>
<li>Replace more alternate characters in <code>format_skeleton</code> by
<a href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1122">python-babel/babel#1122</a></li>
<li>Fix extracted lineno with nested calls by <a
href="https://github.com/dylankiss"><code>@​dylankiss</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1126">python-babel/babel#1126</a></li>
<li>&quot;Deleted duplicate code in test&quot; by <a
href="https://github.com/mattdiaz007"><code>@​mattdiaz007</code></a> in
<a
href="https://redirect.github.com/python-babel/babel/pull/1138">python-babel/babel#1138</a></li>
<li>Fix of list index out of range error in PoFileParser.add_message
when translations is empty by <a
href="https://github.com/gabe-sherman"><code>@​gabe-sherman</code></a>
in <a
href="https://redirect.github.com/python-babel/babel/pull/1135">python-babel/babel#1135</a></li>
<li>Make seconds optional in <code>parse_time</code> time formats by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1141">python-babel/babel#1141</a></li>
<li>Mark <code>wraptext</code> deprecated; use <code>TextWrapper</code>
directly in <code>write_po</code> by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1140">python-babel/babel#1140</a></li>
<li>Fix the way obsolete messages are stored by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1132">python-babel/babel#1132</a></li>
<li>Replace <code>OrderedDict</code> with just <code>dict</code> by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1149">python-babel/babel#1149</a></li>
<li>Use CLDR 46 by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1145">python-babel/babel#1145</a></li>
<li>Update CI to use python 3.13 and Ubuntu 24.04 by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1153">python-babel/babel#1153</a></li>
<li>Adjust docs/conf.py to add compatibility with sphinx 8 by <a
href="https://github.com/hrnciar"><code>@​hrnciar</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1155">python-babel/babel#1155</a></li>
<li>Allow specifying an explicit format in parse_date/parse_time by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1131">python-babel/babel#1131</a></li>
<li>Simplify <code>read_mo</code> logic regarding
<code>catalog.charset</code> by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1148">python-babel/babel#1148</a></li>
<li>Bump CI/tool versions by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1160">python-babel/babel#1160</a></li>
<li>fix: check_and_call_extract_file uses the first matching method and
options, instead of the first matching method and last matching options
by <a href="https://github.com/jpmckinney"><code>@​jpmckinney</code></a>
in <a
href="https://redirect.github.com/python-babel/babel/pull/1121">python-babel/babel#1121</a></li>
<li>Prevent wrapping file locations containing white space by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1120">python-babel/babel#1120</a></li>
<li>Add tzdata as dev dependency and sync with tox.ini by <a
href="https://github.com/wandrew004"><code>@​wandrew004</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1159">python-babel/babel#1159</a></li>
<li>Support short and narrow formats for format_timedelta when using
<code>add_direction</code> by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1163">python-babel/babel#1163</a></li>
<li>Improve handling for <code>locale=None</code> by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1164">python-babel/babel#1164</a></li>
<li>Use <code>pytest.raises(match=...)</code> by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1166">python-babel/babel#1166</a></li>
<li>Strip extra leading slashes in <code>/etc/localtime</code> by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1165">python-babel/babel#1165</a></li>
<li>Remove redundant assignment in <code>Catalog.__setitem__</code> by
<a href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1167">python-babel/babel#1167</a></li>
<li>Small cleanups by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1170">python-babel/babel#1170</a></li>
<li>Small test cleanup by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1172">python-babel/babel#1172</a></li>
<li>Add <code>Message.python_brace_format</code> by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1169">python-babel/babel#1169</a></li>
<li>Import <code>Literal</code> from the typing module by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1175">python-babel/babel#1175</a></li>
<li>Prefer LC_MONETARY when formatting currencies by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1173">python-babel/babel#1173</a></li>
<li>Fix dates formatting <code>Y</code>, <code>w</code> and
<code>W</code> symbols for week-numbering by <a
href="https://github.com/jun66j5"><code>@​jun66j5</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1179">python-babel/babel#1179</a></li>
<li>Increase test coverage of the <code>python_format</code> checker by
<a href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1176">python-babel/babel#1176</a></li>
<li>Prepare for 2.17.0 by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/python-babel/babel/pull/1182">python-babel/babel#1182</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Dunedan"><code>@​Dunedan</code></a> made
their first contribution in <a
href="https://redirect.github.com/python-babel/babel/pull/1105">python-babel/babel#1105</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/python-babel/babel/blob/master/CHANGES.rst">babel's
changelog</a>.</em></p>
<blockquote>
<h2>Version 2.17.0</h2>
<p>Happy 2025! This release is being made from FOSDEM 2025, in Brussels,
Belgium.</p>
<p>Thank you to all contributors, new and old,
and here's to another great year of internationalization and
localization!</p>
<p>Features</p>
<pre><code>
* CLDR: Babel now uses CLDR 46, by @tomasr8 in :gh:`1145`
* Dates: Allow specifying an explicit format in parse_date/parse_time by
@tomasr8 in :gh:`1131`
* Dates: More alternate characters are now supported by
`format_skeleton`. By @tomasr8 in :gh:`1122`
* Dates: Support short and narrow formats for format_timedelta when
using `add_direction`, by @akx in :gh:`1163`
* Messages: .po files now enclose white spaces in filenames like GNU
gettext does. By @Dunedan in :gh:`1105`, and @tomasr8 in :gh:`1120`
* Messages: Initial support for `Message.python_brace_format`, by
@tomasr8 in :gh:`1169`
* Numbers: LC_MONETARY is now preferred when formatting currencies, by
@akx in :gh:`1173`
<p>Bugfixes<br />
</code></pre></p>
<ul>
<li>Dates: Make seconds optional in <code>parse_time</code> time formats
by <a href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in
:gh:<code>1141</code></li>
<li>Dates: Replace <code>str.index</code> with <code>str.find</code> by
<a href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in
:gh:<code>1130</code></li>
<li>Dates: Strip extra leading slashes in <code>/etc/localtime</code> by
<a href="https://github.com/akx"><code>@​akx</code></a> in
:gh:<code>1165</code></li>
<li>Dates: Week numbering and formatting of dates with week numbers was
repaired by <a
href="https://github.com/jun66j5"><code>@​jun66j5</code></a> in
:gh:<code>1179</code></li>
<li>General: Improve handling for <code>locale=None</code> by <a
href="https://github.com/akx"><code>@​akx</code></a> in
:gh:<code>1164</code></li>
<li>General: Remove redundant assignment in
<code>Catalog.__setitem__</code> by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in
:gh:<code>1167</code></li>
<li>Messages: Fix extracted lineno with nested calls, by <a
href="https://github.com/dylankiss"><code>@​dylankiss</code></a> in
:gh:<code>1126</code></li>
<li>Messages: Fix of list index out of range when translations is empty,
by <a
href="https://github.com/gabe-sherman"><code>@​gabe-sherman</code></a>
in :gh:<code>1135</code></li>
<li>Messages: Fix the way obsolete messages are stored by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in
:gh:<code>1132</code></li>
<li>Messages: Simplify <code>read_mo</code> logic regarding
<code>catalog.charset</code> by <a
href="https://github.com/tomasr8"><code>@​tomasr8</code></a> in
:gh:<code>1148</code></li>
<li>Messages: Use the first matching method &amp; options, rather than
first matching method &amp; last options, by <a
href="https://github.com/jpmckinney"><code>@​jpmckinney</code></a> in
:gh:<code>1121</code></li>
</ul>
<p>Deprecation and compatibility</p>
<pre><code>
* Dates: Fix deprecation warnings for `datetime.utcnow()` by @tomasr8 in
:gh:`1119`
* Docs: Adjust docs/conf.py to add compatibility with sphinx 8 by
@hrnciar in :gh:`1155`
* General: Import `Literal` from the typing module by @tomasr8 in
:gh:`1175`
* General: Replace `OrderedDict` with just `dict` by @tomasr8 in
:gh:`1149`
* Messages: Mark `wraptext` deprecated; use `TextWrapper` directly in
`write_po` by @akx in :gh:`1140`
<p>Infrastructure</p>
<pre><code>
* Add tzdata as dev dependency and sync with tox.ini by @wandrew004 in
:gh:`1159`
* Duplicate test code was deleted by @mattdiaz007 in :gh:`1138`
* Increase test coverage of the `python_format` checker by @tomasr8 in
:gh:`1176`
* Small cleanups by @akx in :gh:`1160`, :gh:`1166`, :gh:`1170` and
:gh:`1172`
&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;... (truncated)&lt;/p&gt;
&lt;/details&gt;
&lt;details&gt;
&lt;summary&gt;Commits&lt;/summary&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@b50a1d2186c20f3359f7e10853d2b2225a46ed40&quot;&gt;&lt;code&gt;b50a1d2&lt;/code&gt;&lt;/a&gt;
Prepare for 2.17.0 (&lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1182&quot;&gt;#1182&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@5f117b2689573aa98acc8a47108c49b99f4d1394&quot;&gt;&lt;code&gt;5f117b2&lt;/code&gt;&lt;/a&gt;
Increase test coverage of the &lt;code&gt;python_format&lt;/code&gt;
checker (&lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1176&quot;&gt;#1176&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@363ad7531fb5dcdc3e9844573592b0b44afb914b&quot;&gt;&lt;code&gt;363ad75&lt;/code&gt;&lt;/a&gt;
Fix dates formatting &lt;code&gt;Y&lt;/code&gt;,
&lt;code&gt;w&lt;/code&gt; and &lt;code&gt;W&lt;/code&gt; symbols for
week-numbering (&lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1179&quot;&gt;#1179&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@e9c3ef8d0de3080ca59f7f8dbabf9b52983adc7d&quot;&gt;&lt;code&gt;e9c3ef8&lt;/code&gt;&lt;/a&gt;
Merge pull request &lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1173&quot;&gt;#1173&lt;/a&gt;
from python-babel/lc-monetary-2&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@56ef7c7f578a904917464c187e399abb762bd5e3&quot;&gt;&lt;code&gt;56ef7c7&lt;/code&gt;&lt;/a&gt;
Prefer LC_MONETARY when formatting currency&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@aee6d698b541dc50439280d7e093092cc0d4b832&quot;&gt;&lt;code&gt;aee6d69&lt;/code&gt;&lt;/a&gt;
&lt;code&gt;default_locale&lt;/code&gt;: support multiple
keys&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@2d8a808864d1aae5d3d02d4f95917c79740c5d35&quot;&gt;&lt;code&gt;2d8a808&lt;/code&gt;&lt;/a&gt;
Import &lt;code&gt;Literal&lt;/code&gt; &amp;amp;
&lt;code&gt;TypedDict&lt;/code&gt; from the typing module (&lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1175&quot;&gt;#1175&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@98b9562c05e5276038c27ec12c12f3e92dc027b6&quot;&gt;&lt;code&gt;98b9562&lt;/code&gt;&lt;/a&gt;
Add basic support for
&lt;code&gt;Message.python_brace_format&lt;/code&gt; (&lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1169&quot;&gt;#1169&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@0c1091c9de9543e30bc4b845eb10b5bf84516d7b&quot;&gt;&lt;code&gt;0c1091c&lt;/code&gt;&lt;/a&gt;
Small test cleanup (&lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1172&quot;&gt;#1172&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a
href=&quot;python-babel/babel@db4879136a7fbcef475f26b75dbdd65d0ce488f9&quot;&gt;&lt;code&gt;db48791&lt;/code&gt;&lt;/a&gt;
Merge pull request &lt;a
href=&quot;https://redirect.github.com/python-babel/babel/issues/1170&quot;&gt;#1170&lt;/a&gt;
from python-babel/small-cleanup&lt;/li&gt;
&lt;li&gt;Additional commits viewable in &lt;a
href=&quot;python-babel/babel@v2.16.0...v2.17.0&quot;&gt;compare
view&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/details&gt;

&lt;br /&gt;
</code></pre>


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=babel&package-manager=pip&previous-version=2.16.0&new-version=2.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

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 <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

go_test: data not available in init()

2 participants