nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: pypa/setuptools
Pull request #1293 (2018-03-16 06:28:14)

Don't claim to provide the extra ''
Resolves https://github.com/pypa/setuptools/issues/1292


Patch:
diff --git a/setuptools/dist.py b/setuptools/dist.py
index 33ceb4042..d24958daa 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -389,7 +389,9 @@ class Distribution(Distribution_parse_config_files, _Distribution):
                 # Since this gets called multiple times at points where the
                 # keys have become 'converted' extras, ensure that we are only
                 # truly adding extras we haven't seen before here.
-                self.metadata.provides_extras.add(extra.split(':')[0])
+                extra = extra.split(':')[0]
+                if extra:
+                    self.metadata.provides_extras.add(extra)
 
         self._convert_extras_requirements()
         self._move_install_requirements_markers()


Test patch:
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index ff5fa0a30..d22116715 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -438,6 +438,23 @@ class TestEggInfo(object):
         assert 'Provides-Extra: foobar' in pkg_info_lines
         assert 'Metadata-Version: 2.1' in pkg_info_lines
 
+    def test_doesnt_provides_extra(self, tmpdir_cwd, env):
+        self._setup_script_with_requires(
+            '''install_requires=["spam ; python_version<'3.3'"]''')
+        environ = os.environ.copy().update(
+            HOME=env.paths['home'],
+        )
+        environment.run_setup_py(
+            cmd=['egg_info'],
+            pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]),
+            data_stream=1,
+            env=environ,
+        )
+        egg_info_dir = os.path.join('.', 'foo.egg-info')
+        with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file:
+            pkg_info_text = pkginfo_file.read()
+        assert 'Provides-Extra:' not in pkg_info_text
+
     def test_long_description_content_type(self, tmpdir_cwd, env):
         # Test that specifying a `long_description_content_type` keyword arg to
         # the `setup` function results in writing a `Description-Content-Type`
Repository: pypa/setuptools
Pull request #1594 (2018-11-14 18:08:12)

Backend should not say that setuptools is needed to build


Patch:
diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py
index 0067a7ac3..463d3757a 100644
--- a/setuptools/build_meta.py
+++ b/setuptools/build_meta.py
@@ -112,12 +112,12 @@ def _get_immediate_subdirectories(a_dir):
 
 def get_requires_for_build_wheel(config_settings=None):
     config_settings = _fix_config(config_settings)
-    return _get_build_requires(config_settings, requirements=['setuptools', 'wheel'])
+    return _get_build_requires(config_settings, requirements=['wheel'])
 
 
 def get_requires_for_build_sdist(config_settings=None):
     config_settings = _fix_config(config_settings)
-    return _get_build_requires(config_settings, requirements=['setuptools'])
+    return _get_build_requires(config_settings, requirements=[])
 
 
 def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):


Test patch:
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
index 712e11498..2a0794469 100644
--- a/setuptools/tests/test_build_meta.py
+++ b/setuptools/tests/test_build_meta.py
@@ -112,13 +112,13 @@ def build_backend(tmpdir, request):
 
 def test_get_requires_for_build_wheel(build_backend):
     actual = build_backend.get_requires_for_build_wheel()
-    expected = ['six', 'setuptools', 'wheel']
+    expected = ['six', 'wheel']
     assert sorted(actual) == sorted(expected)
 
 
 def test_get_requires_for_build_sdist(build_backend):
     actual = build_backend.get_requires_for_build_sdist()
-    expected = ['six', 'setuptools']
+    expected = ['six']
     assert sorted(actual) == sorted(expected)
Repository: pypa/setuptools
Pull request #1814 (2019-08-12 23:16:11)

pkg_resources: fix ``Requirement`` hash/equality implementation
## Summary of changes

Take PEP 508 direct URL into account.

### Pull Request Checklist
- [x] Changes have tests
- [x] News fragment added in changelog.d. See [documentation](http://setuptools.readthedocs.io/en/latest/developer-guide.html#making-a-pull-request) for details



Patch:
diff --git a/changelog.d/1814.change.rst b/changelog.d/1814.change.rst
new file mode 100644
index 000000000..c936699dd
--- /dev/null
+++ b/changelog.d/1814.change.rst
@@ -0,0 +1,1 @@
+Fix ``pkg_resources.Requirement`` hash/equality implementation: take PEP 508 direct URL into account.
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 1f170cfda..e75769d72 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -3109,6 +3109,7 @@ class Requirement(packaging.requirements.Requirement):
         self.extras = tuple(map(safe_extra, self.extras))
         self.hashCmp = (
             self.key,
+            self.url,
             self.specifier,
             frozenset(self.extras),
             str(self.marker) if self.marker else None,


Test patch:
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index 86afcf741..42c801a74 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -520,6 +520,11 @@ class TestRequirements:
         assert r1 == r2
         assert str(r1) == str(r2)
         assert str(r2) == "Twisted==1.2c1,>=1.2"
+        assert (
+            Requirement("Twisted")
+            !=
+            Requirement("Twisted @ https://localhost/twisted.zip")
+        )
 
     def testBasicContains(self):
         r = Requirement("Twisted>=1.2")
@@ -546,11 +551,23 @@ class TestRequirements:
             ==
             hash((
                 "twisted",
+                None,
                 packaging.specifiers.SpecifierSet(">=1.2"),
                 frozenset(["foo", "bar"]),
                 None
             ))
         )
+        assert (
+            hash(Requirement.parse("Twisted @ https://localhost/twisted.zip"))
+            ==
+            hash((
+                "twisted",
+                "https://localhost/twisted.zip",
+                packaging.specifiers.SpecifierSet(),
+                frozenset(),
+                None
+            ))
+        )
 
     def testVersionEquality(self):
         r1 = Requirement.parse("foo==0.3a2")
Repository: pypa/setuptools
Pull request #1918 (2019-11-25 10:29:13)

wheel: fix `is_compatible` implementation
### Summary of changes

Fix `Wheel.is_compatible` implementation, which I bungled in #1829.

### Pull Request Checklist
- [x] Changes have tests
- [x] News fragment added in changelog.d. See [documentation](http://setuptools.readthedocs.io/en/latest/developer-guide.html#making-a-pull-request) for details



Patch:
diff --git a/changelog.d/1918.change.rst b/changelog.d/1918.change.rst
new file mode 100644
index 000000000..29d004566
--- /dev/null
+++ b/changelog.d/1918.change.rst
@@ -0,0 +1,1 @@
+Fix regression in handling wheels compatibility tags.
diff --git a/setuptools/wheel.py b/setuptools/wheel.py
index 3effd79b3..025aaa828 100644
--- a/setuptools/wheel.py
+++ b/setuptools/wheel.py
@@ -77,7 +77,7 @@ class Wheel:
 
     def is_compatible(self):
         '''Is the wheel is compatible with the current platform?'''
-        supported_tags = set(map(str, sys_tags()))
+        supported_tags = set((t.interpreter, t.abi, t.platform) for t in sys_tags())
         return next((True for t in self.tags() if t in supported_tags), False)
 
     def egg_name(self):


Test patch:
diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py
index d50816c22..55d346c67 100644
--- a/setuptools/tests/test_wheel.py
+++ b/setuptools/tests/test_wheel.py
@@ -18,6 +18,7 @@ import pytest
 
 from pkg_resources import Distribution, PathMetadata, PY_MAJOR
 from setuptools.extern.packaging.utils import canonicalize_name
+from setuptools.extern.packaging.tags import parse_tag
 from setuptools.wheel import Wheel
 
 from .contexts import tempdir
@@ -571,3 +572,11 @@ def test_wheel_no_dist_dir():
                 _check_wheel_install(wheel_path, install_dir, None,
                                      project_name,
                                      version, None)
+
+
+def test_wheel_is_compatible(monkeypatch):
+    def sys_tags():
+        for t in parse_tag('cp36-cp36m-manylinux1_x86_64'):
+            yield t
+    monkeypatch.setattr('setuptools.wheel.sys_tags', sys_tags)
+    assert Wheel('onnxruntime-0.1.2-cp36-cp36m-manylinux1_x86_64.whl').is_compatible()
Repository: JanDeDobbeleer/oh-my-posh
Pull request #489 (2021-03-07 12:58:24)

fix(git): align git commands with posh-git
### Prerequisites

- [ ] I have read and understand the `CONTRIBUTING` guide
- [ ] The commit message follows the [conventional commits][cc] guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

### Description

[Description of the change]

[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary


JanDeDobbeleer: This leverages the [following change](https://github.com/git/git/commit/27344d6a6c8056664966e11acf674e5da6dd7ee3) in git.

Patch:
diff --git a/src/segment_git.go b/src/segment_git.go
index 3146ec94..6f6bd8ca 100644
--- a/src/segment_git.go
+++ b/src/segment_git.go
@@ -272,7 +272,7 @@ func (g *git) getStatusColor(defaultValue string) string {
 }
 
 func (g *git) getGitCommandOutput(args ...string) string {
-	args = append([]string{"-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
+	args = append([]string{"--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
 	val, _ := g.env.runCommand(gitCommand, args...)
 	return val
 }


Test patch:
diff --git a/src/segment_git_test.go b/src/segment_git_test.go
index 060ae0df..16ebaa92 100644
--- a/src/segment_git_test.go
+++ b/src/segment_git_test.go
@@ -54,7 +54,7 @@ func TestEnabledInWorkingTree(t *testing.T) {
 }
 
 func TestGetGitOutputForCommand(t *testing.T) {
-	args := []string{"-c", "core.quotepath=false", "-c", "color.status=false"}
+	args := []string{"--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false"}
 	commandArgs := []string{"symbolic-ref", "--short", "HEAD"}
 	want := "je suis le output"
 	env := new(MockedEnvironment)
@@ -113,7 +113,7 @@ func setupHEADContextEnv(context *detachedContext) *git {
 }
 
 func (m *MockedEnvironment) mockGitCommand(returnValue string, args ...string) {
-	args = append([]string{"-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
+	args = append([]string{"--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
 	m.On("runCommand", "git", args).Return(returnValue, nil)
 }
 
@@ -400,7 +400,7 @@ func TestParseGitStatsInvalidLine(t *testing.T) {
 
 func bootstrapUpstreamTest(upstream string) *git {
 	env := &MockedEnvironment{}
-	env.On("runCommand", "git", []string{"-c", "core.quotepath=false", "-c", "color.status=false", "remote", "get-url", "origin"}).Return(upstream, nil)
+	env.On("runCommand", "git", []string{"--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false", "remote", "get-url", "origin"}).Return(upstream, nil)
 	props := &properties{
 		values: map[Property]interface{}{
 			GithubIcon:    "GH",
Repository: JanDeDobbeleer/oh-my-posh
Pull request #496 (2021-03-08 20:02:09)

fix(aws): hide default when not set
### Prerequisites

- [ ] I have read and understand the `CONTRIBUTING` guide
- [ ] The commit message follows the [conventional commits][cc] guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

### Description

[Description of the change]

[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary



Patch:
diff --git a/src/segment_aws.go b/src/segment_aws.go
index c5e59b33..d3f4024e 100644
--- a/src/segment_aws.go
+++ b/src/segment_aws.go
@@ -40,7 +40,7 @@ func (a *aws) enabled() bool {
 	if a.Profile != "" && a.Region != "" {
 		return true
 	}
-	if a.Profile == "" && a.Region != "" {
+	if a.Profile == "" && a.Region != "" && displayDefaultUser {
 		a.Profile = defaultUser
 		return true
 	}


Test patch:
diff --git a/src/segment_aws_test.go b/src/segment_aws_test.go
index e5781b69..cffb43ff 100644
--- a/src/segment_aws_test.go
+++ b/src/segment_aws_test.go
@@ -19,6 +19,8 @@ func TestAWSSegment(t *testing.T) {
 		Template        string
 		DisplayDefault  bool
 	}{
+		{Case: "enabled with default user", ExpectedString: "default@eu-west", Region: "eu-west", ExpectedEnabled: true, DisplayDefault: true},
+		{Case: "disabled with default user", ExpectedString: "default@eu-west", Region: "eu-west", ExpectedEnabled: false, DisplayDefault: false},
 		{Case: "disabled", ExpectedString: "", ExpectedEnabled: false},
 		{Case: "enabled with default user", ExpectedString: "default@eu-west", Profile: "default", Region: "eu-west", ExpectedEnabled: true, DisplayDefault: true},
 		{Case: "disabled with default user", ExpectedString: "default", Profile: "default", Region: "eu-west", ExpectedEnabled: false, DisplayDefault: false},
Repository: JanDeDobbeleer/oh-my-posh
Pull request #2907 (2022-10-07 19:23:53)

chore: default to go 1.19
### Prerequisites

- [ ] I have read and understood the [contributing guide][CONTRIBUTING.md]
- [ ] The commit message follows the [conventional commits][cc] guidelines
- [ ] Tests for the changes have been added (for bug fixes/features)
- [ ] Docs have been added/updated (for bug fixes/features)

### Description

<!--TemplateBody-->

<!---

Tips:

If you're not comfortable with working with Git, we're working a guide (https://ohmyposh.dev/docs/contributing_git) to help you out.
Oh My Posh advises GitKraken (https://www.gitkraken.com/invite/nQmDPR9D) as your preferred cross platform Git GUI power tool.

-->

[CONTRIBUTING.md]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/CONTRIBUTING.md
[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary



Patch:
diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml
index 72674528..b98f966d 100644
--- a/.github/workflows/code.yml
+++ b/.github/workflows/code.yml
@@ -22,7 +22,7 @@ jobs:
     - name: Install Go
       uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
       with:
-        go-version: 1.18
+        go-version: 1.19
     - name: Checkout code
       uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
     - name: Golang CI
diff --git a/.github/workflows/gomod.yml b/.github/workflows/gomod.yml
index a9e647d8..4053b049 100644
--- a/.github/workflows/gomod.yml
+++ b/.github/workflows/gomod.yml
@@ -12,7 +12,7 @@ jobs:
     - name: Install Go
       uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
       with:
-        go-version: 1.18
+        go-version: 1.19
     - name: Checkout code
       uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
     - name: Check for unused dependencies
diff --git a/src/go.mod b/src/go.mod
index 32d79e54..cfe09dd0 100644
--- a/src/go.mod
+++ b/src/go.mod
@@ -1,6 +1,6 @@
 module oh-my-posh
 
-go 1.18
+go 1.19
 
 require (
 	github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1


Test patch:
diff --git a/src/segments/golang_test.go b/src/segments/golang_test.go
index ef4941d4..6d3fdf94 100644
--- a/src/segments/golang_test.go
+++ b/src/segments/golang_test.go
@@ -46,7 +46,7 @@ func TestGolang(t *testing.T) {
 	}{
 		{Case: "Go 1.15", ExpectedString: "1.15.8", Version: "go version go1.15.8 darwin/amd64"},
 		{Case: "Go 1.16", ExpectedString: "1.16", Version: "go version go1.16 darwin/amd64"},
-		{Case: "go.mod 1.18", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.18"},
+		{Case: "go.mod 1.19", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.19"},
 		{Case: "no go.mod file fallback", ParseModFile: true, ExpectedString: "1.16", Version: "go version go1.16 darwin/amd64"},
 		{
 			Case:                  "invalid go.mod file fallback",
Repository: JanDeDobbeleer/oh-my-posh
Pull request #2983 (2022-10-19 18:54:12)

fix(templates): only match alphanumeric strings
### Prerequisites

- [x] I have read and understood the [contributing guide][CONTRIBUTING.md]
- [x] The commit message follows the [conventional commits][cc] guidelines
- [x] Tests for the changes have been added (for bug fixes/features)
- [x] Docs have been added/updated (for bug fixes/features)

### Description

relates to #2956

<!---

Tips:

If you're not comfortable with working with Git, we're working a guide (https://ohmyposh.dev/docs/contributing_git) to help you out.
Oh My Posh advises GitKraken (https://www.gitkraken.com/invite/nQmDPR9D) as your preferred cross platform Git GUI power tool.

-->

[CONTRIBUTING.md]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/CONTRIBUTING.md
[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary



Patch:
diff --git a/src/template/text.go b/src/template/text.go
index 944a9366..7ef82842 100644
--- a/src/template/text.go
+++ b/src/template/text.go
@@ -4,6 +4,7 @@ import (
 	"bytes"
 	"errors"
 	"oh-my-posh/environment"
+	"oh-my-posh/regex"
 	"strings"
 	"text/template"
 )
@@ -82,15 +83,16 @@ func (t *Text) cleanTemplate() {
 	}
 
 	knownVariable := func(variable string) bool {
-		if variable == "." {
-			return true
-		}
 		variable = strings.TrimPrefix(variable, ".")
 		splitted := strings.Split(variable, ".")
 		if len(splitted) == 0 {
-			return false
+			return true
 		}
 		variable = splitted[0]
+		// check if alphanumeric
+		if !regex.MatchString(`^[a-zA-Z0-9]+$`, variable) {
+			return true
+		}
 		for _, b := range knownVariables {
 			if variable == b {
 				return true


Test patch:
diff --git a/src/template/text_test.go b/src/template/text_test.go
index b02e0116..0e9f379e 100644
--- a/src/template/text_test.go
+++ b/src/template/text_test.go
@@ -225,6 +225,11 @@ func TestCleanTemplate(t *testing.T) {
 		Expected string
 		Template string
 	}{
+		{
+			Case:     "Literal dots",
+			Expected: " ... ",
+			Template: " ... ",
+		},
 		{
 			Case:     "Literal dot",
 			Expected: "hello . what's up",
Repository: JanDeDobbeleer/oh-my-posh
Pull request #2590 (2022-07-29 07:29:31)

fix(ansi): correct osc7 typo
extra \ removed

### Prerequisites

- [X] I have read and understood the [contributing guide][CONTRIBUTING.md]
- [X] The commit message follows the [conventional commits][cc] guidelines
- [ ] Tests for the changes have been added (for bug fixes/features)
- [ ] Docs have been added/updated (for bug fixes/features)

### Description

Fix the extra `\\` added in the commit 7d0ac0a9306085d02f7df655d3c2f6ebe78f2598

<!--TemplateBody-->

<!---

Tips:

If you're not comfortable with working with Git, we're working a guide (https://ohmyposh.dev/docs/contributing_git) to help you out.
Oh My Posh advises GitKraken (https://www.gitkraken.com/invite/nQmDPR9D) as your preferred cross platform Git GUI power tool.

-->

[CONTRIBUTING.md]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/CONTRIBUTING.md
[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary


lnu: @JanDeDobbeleer as requested :)

Patch:
diff --git a/src/color/ansi.go b/src/color/ansi.go
index 932ac132..4d1c5af0 100644
--- a/src/color/ansi.go
+++ b/src/color/ansi.go
@@ -67,7 +67,7 @@ func (a *Ansi) Init(shellName string) {
 		a.hyperlink = "%%{\x1b]8;;%s\x1b\\%%}%s%%{\x1b]8;;\x1b\\%%}"
 		a.hyperlinkRegex = `(?P<STR>%{\x1b]8;;(.+)\x1b\\%}(?P<TEXT>.+)%{\x1b]8;;\x1b\\%})`
 		a.osc99 = "%%{\x1b]9;9;\"%s\"\x1b\\%%}"
-		a.osc7 = "%%{\x1b]7;file:\"//%s/%s\"\x1b\\\\%%}"
+		a.osc7 = "%%{\x1b]7;file:\"//%s/%s\"\x1b\\%%}"
 		a.bold = "%%{\x1b[1m%%}%s%%{\x1b[22m%%}"
 		a.italic = "%%{\x1b[3m%%}%s%%{\x1b[23m%%}"
 		a.underline = "%%{\x1b[4m%%}%s%%{\x1b[24m%%}"
@@ -123,7 +123,7 @@ func (a *Ansi) Init(shellName string) {
 		a.hyperlink = "\x1b]8;;%s\x1b\\%s\x1b]8;;\x1b\\"
 		a.hyperlinkRegex = "(?P<STR>\x1b]8;;(.+)\x1b\\\\\\\\?(?P<TEXT>.+)\x1b]8;;\x1b\\\\)"
 		a.osc99 = "\x1b]9;9;\"%s\"\x1b\\"
-		a.osc7 = "\x1b]7;\"file://%s/%s\"\x1b\\\\"
+		a.osc7 = "\x1b]7;\"file://%s/%s\"\x1b\\"
 		a.bold = "\x1b[1m%s\x1b[22m"
 		a.italic = "\x1b[3m%s\x1b[23m"
 		a.underline = "\x1b[4m%s\x1b[24m"


Test patch:
diff --git a/src/engine/engine_test.go b/src/engine/engine_test.go
index e079836e..782c8b6b 100644
--- a/src/engine/engine_test.go
+++ b/src/engine/engine_test.go
@@ -53,10 +53,10 @@ func TestPrintPWD(t *testing.T) {
 	}{
 		{Case: "Empty PWD"},
 		{Case: "OSC99", PWD: color.OSC99, Expected: "\x1b]9;9;\"pwd\"\x1b\\"},
-		{Case: "OSC7", PWD: color.OSC7, Expected: "\x1b]7;\"file://host/pwd\"\x1b\\\\"},
+		{Case: "OSC7", PWD: color.OSC7, Expected: "\x1b]7;\"file://host/pwd\"\x1b\\"},
 		{Case: "Deprecated OSC99", OSC99: true, Expected: "\x1b]9;9;\"pwd\"\x1b\\"},
 		{Case: "Template (empty)", PWD: "{{ if eq .Shell \"pwsh\" }}osc7{{ end }}"},
-		{Case: "Template (non empty)", PWD: "{{ if eq .Shell \"shell\" }}osc7{{ end }}", Expected: "\x1b]7;\"file://host/pwd\"\x1b\\\\"},
+		{Case: "Template (non empty)", PWD: "{{ if eq .Shell \"shell\" }}osc7{{ end }}", Expected: "\x1b]7;\"file://host/pwd\"\x1b\\"},
 	}
 
 	for _, tc := range cases {
Repository: JanDeDobbeleer/oh-my-posh
Pull request #4940 (2024-05-19 06:38:49)

feat(go): upgrade to 1.22.3
### Prerequisites

- [x] I have read and understood the [contributing guide][CONTRIBUTING.md].
- [x] The commit message follows the [conventional commits][cc] guidelines.
- [x] Tests for the changes have been added (for bug fixes / features).
- [x] Docs have been added/updated (for bug fixes / features).

<!---

Tips:

If you're not comfortable with working with Git,
we're working a guide (https://ohmyposh.dev/docs/contributing_git) to help you out.
Oh My Posh advises GitKraken (https://www.gitkraken.com/invite/nQmDPR9D) as your preferred cross platform Git GUI power tool.

-->

[CONTRIBUTING.md]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/CONTRIBUTING.md
[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary



Patch:
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 726e5dcc..ed76a361 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -8,7 +8,7 @@
       // Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17
       // Append -bullseye or -buster to pin to an OS version.
       // Use -bullseye variants on local arm64/Apple Silicon.
-      "VARIANT": "1-1.22-bullseye",
+      "VARIANT": "1-1.22.3-bullseye",
 
       // Options:
       "POSH_THEME": "/workspaces/oh-my-posh/themes/jandedobbeleer.omp.json",
diff --git a/.github/workflows/composite/bootstrap-go/action.yml b/.github/workflows/composite/bootstrap-go/action.yml
index 63f93482..8a5415e3 100644
--- a/.github/workflows/composite/bootstrap-go/action.yml
+++ b/.github/workflows/composite/bootstrap-go/action.yml
@@ -9,4 +9,4 @@ runs:
   steps:
     - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
       with:
-        go-version: '1.22.0'
+        go-version: '1.22.3'
diff --git a/src/go.mod b/src/go.mod
index 1af30342..668661ac 100644
--- a/src/go.mod
+++ b/src/go.mod
@@ -1,6 +1,6 @@
 module github.com/jandedobbeleer/oh-my-posh/src
 
-go 1.22.0
+go 1.22.3
 
 require (
 	github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161


Test patch:
diff --git a/src/segments/golang_test.go b/src/segments/golang_test.go
index 022c02ee..730516eb 100644
--- a/src/segments/golang_test.go
+++ b/src/segments/golang_test.go
@@ -22,7 +22,7 @@ func TestGolang(t *testing.T) {
 	}{
 		{Case: "Go 1.15", ExpectedString: "1.15.8", Version: "go version go1.15.8 darwin/amd64"},
 		{Case: "Go 1.16", ExpectedString: "1.16", Version: "go version go1.16 darwin/amd64"},
-		{Case: "go.mod 1.22.0", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.22.0"},
+		{Case: "go.mod 1.22.3", ParseModFile: true, HasModFileInParentDir: true, ExpectedString: "1.22.3"},
 		{Case: "no go.mod file fallback", ParseModFile: true, ExpectedString: "1.16", Version: "go version go1.16 darwin/amd64"},
 		{
 			Case:                  "invalid go.mod file fallback",