nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: beeware/briefcase
Pull request #1548 (2023-11-21 16:12:42)

Ensure new Toga projects pass Black
## Changes
- Update app source for Toga projects to pass Black

## Related
- https://github.com/beeware/.github/pull/72
- https://github.com/beeware/briefcase-template/pull/85

## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [X] All new features have been tested
- [X] All new features have been documented
- [X] I have read the **CONTRIBUTING.md** file
- [X] I will abide by the code of conduct


Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6dffce59..27078086 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -142,8 +142,8 @@ jobs:
         name: html-coverage-report-project
         path: htmlcov
 
-  verify-templates:
-    name: Verify Templates
+  verify-projects:
+    name: Verify project
     needs: unit-tests
     uses: beeware/.github/.github/workflows/app-create-verify.yml@main
     with:
diff --git a/changes/1548.misc.rst b/changes/1548.misc.rst
new file mode 100644
index 00000000..6d313010
--- /dev/null
+++ b/changes/1548.misc.rst
@@ -0,0 +1,1 @@
+The Toga app source code for new projects now passes Black.
diff --git a/src/briefcase/bootstraps/toga.py b/src/briefcase/bootstraps/toga.py
index f6ed2978..71e20aba 100644
--- a/src/briefcase/bootstraps/toga.py
+++ b/src/briefcase/bootstraps/toga.py
@@ -10,7 +10,6 @@ from toga.style.pack import COLUMN, ROW
 
 
 class {{ cookiecutter.class_name }}(toga.App):
-
     def startup(self):
         """Construct and show the Toga application.
 


Test patch:
diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py
index fb58c13a..ea9920b2 100644
--- a/tests/commands/new/test_build_context.py
+++ b/tests/commands/new/test_build_context.py
@@ -67,7 +67,6 @@ from toga.style.pack import COLUMN, ROW
 
 
 class {{ cookiecutter.class_name }}(toga.App):
-
     def startup(self):
         """Construct and show the Toga application.
 
@@ -841,7 +840,6 @@ from toga.style.pack import COLUMN, ROW
 
 
 class {{ cookiecutter.class_name }}(toga.App):
-
     def startup(self):
         """Construct and show the Toga application.
Repository: beeware/briefcase
Pull request #1551 (2023-11-22 01:36:52)

Ensure Pygame bootstrap complies with Black
<!--- Describe your changes in detail -->
<!--- What problem does this change solve? -->
<!--- If this PR relates to an issue, include Refs #XXX or Fixes #XXX -->

## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [x] All new features have been tested
- [x] All new features have been documented
- [x] I have read the **CONTRIBUTING.md** file
- [x] I will abide by the code of conduct



Patch:
diff --git a/changes/1551.misc.rst b/changes/1551.misc.rst
new file mode 100644
index 00000000..a559b665
--- /dev/null
+++ b/changes/1551.misc.rst
@@ -0,0 +1,1 @@
+The Pygame bootstrap now complies with Black.
diff --git a/src/briefcase/bootstraps/pygame.py b/src/briefcase/bootstraps/pygame.py
index b5d8f35f..aafd51c3 100644
--- a/src/briefcase/bootstraps/pygame.py
+++ b/src/briefcase/bootstraps/pygame.py
@@ -37,9 +37,7 @@ def main():
 
     # Set the app's runtime icon
     pygame.display.set_icon(
-        pygame.image.load(
-            Path(__file__).parent / "resources" / "{{ cookiecutter.app_name }}.png"
-        )
+        pygame.image.load(Path(__file__).parent / "resources" / "{{ cookiecutter.app_name }}.png")
     )
 
     pygame.init()


Test patch:
diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py
index 37aa4f9c..2bd4e604 100644
--- a/tests/commands/new/test_build_context.py
+++ b/tests/commands/new/test_build_context.py
@@ -674,9 +674,7 @@ def main():
 
     # Set the app's runtime icon
     pygame.display.set_icon(
-        pygame.image.load(
-            Path(__file__).parent / "resources" / "{{ cookiecutter.app_name }}.png"
-        )
+        pygame.image.load(Path(__file__).parent / "resources" / "{{ cookiecutter.app_name }}.png")
     )
 
     pygame.init()
Repository: beeware/briefcase
Pull request #1611 (2024-01-18 00:37:37)

Bump JDK from 17.0.8.1+1 to 17.0.10+7
## Changes
- Bumps JDK from 17.0.8.1+1 to [17.0.10+7](https://github.com/adoptium/temurin17-binaries/releases/tag/jdk-17.0.10%2B7)
- Adds a test to ensure the JDK URL is resolvable

## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [x] All new features have been tested
- [X] All new features have been documented
- [X] I have read the **CONTRIBUTING.md** file
- [X] I will abide by the code of conduct


Patch:
diff --git a/changes/1611.feature.rst b/changes/1611.feature.rst
new file mode 100644
index 00000000..2f98c368
--- /dev/null
+++ b/changes/1611.feature.rst
@@ -0,0 +1,1 @@
+The Java JDK was upgraded from 17.0.8.1+1 to 17.0.10+7. Run ``briefcase upgrade java`` to upgrade existing Briefcase installations.
diff --git a/src/briefcase/integrations/java.py b/src/briefcase/integrations/java.py
index a9f208f7..c81b652f 100644
--- a/src/briefcase/integrations/java.py
+++ b/src/briefcase/integrations/java.py
@@ -19,8 +19,8 @@ class JDK(ManagedTool):
 
     # Latest OpenJDK as of September 2023: https://adoptium.net/temurin/releases/
     JDK_MAJOR_VER = "17"
-    JDK_RELEASE = "17.0.8.1"
-    JDK_BUILD = "1"
+    JDK_RELEASE = "17.0.10"
+    JDK_BUILD = "7"
     JDK_INSTALL_DIR_NAME = f"java{JDK_MAJOR_VER}"
 
     def __init__(self, tools: ToolCache, java_home: Path):


Test patch:
diff --git a/tests/integrations/java/conftest.py b/tests/integrations/java/conftest.py
index d790106e..da915e7f 100644
--- a/tests/integrations/java/conftest.py
+++ b/tests/integrations/java/conftest.py
@@ -6,8 +6,8 @@ from briefcase.integrations.base import ToolCache
 from briefcase.integrations.download import Download
 from briefcase.integrations.subprocess import Subprocess
 
-JDK_RELEASE = "17.0.8.1"
-JDK_BUILD = "1"
+JDK_RELEASE = "17.0.10"
+JDK_BUILD = "7"
 
 
 @pytest.fixture
diff --git a/tests/integrations/java/test_JDK__verify.py b/tests/integrations/java/test_JDK__verify.py
index eaffb76f..12ce6f06 100644
--- a/tests/integrations/java/test_JDK__verify.py
+++ b/tests/integrations/java/test_JDK__verify.py
@@ -1,10 +1,12 @@
 import os
+import platform
 import shutil
 import subprocess
 from pathlib import Path
 from unittest import mock
 
 import pytest
+import requests
 
 from briefcase.exceptions import (
     BriefcaseCommandError,
@@ -520,6 +522,15 @@ def test_successful_jdk_download(
     archive.unlink.assert_called_once_with()
 
 
+def test_jdk_url_exists(mock_tools, tmp_path):
+    """The JDK download URL is resolvable for the platform."""
+    # ensure the system hasn't been mocked
+    mock_tools.host_arch = platform.machine()
+    mock_tools.host_os = platform.system()
+
+    requests.head(JDK(mock_tools, tmp_path).OpenJDK_download_url).raise_for_status()
+
+
 def test_not_installed(mock_tools, tmp_path):
     """If the JDK isn't installed, and install isn't requested, an error is raised."""
     # Mock host OS
Repository: beeware/briefcase
Pull request #1774 (2024-05-05 18:51:32)

OpenSUSE packages depend on `libcanberra-gtk3-module`, not `libcanberra-gtk3-0`
## Changes
- OpenSUSE packaging now depends on the correct canberra module package

## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [x] All new features have been tested
- [x] All new features have been documented
- [X] I have read the **CONTRIBUTING.md** file
- [X] I will abide by the code of conduct


Patch:
diff --git a/changes/1774.bugfix.rst b/changes/1774.bugfix.rst
new file mode 100644
index 00000000..7728d37e
--- /dev/null
+++ b/changes/1774.bugfix.rst
@@ -0,0 +1,1 @@
+Packages created for OpenSUSE now depend on ``libcanberra-gtk3-module`` instead of ``libcanberra-gtk3-0``.
diff --git a/src/briefcase/bootstraps/toga.py b/src/briefcase/bootstraps/toga.py
index 196239f4..1c6b486c 100644
--- a/src/briefcase/bootstraps/toga.py
+++ b/src/briefcase/bootstraps/toga.py
@@ -120,7 +120,7 @@ system_runtime_requires = [
     # Needed to support Python bindings to GTK
     "gobject-introspection", "typelib(Gtk) = 3.0",
     # Dependencies that GTK looks for at runtime
-    "libcanberra-gtk3-0",
+    "libcanberra-gtk3-module",
     # Needed to provide WebKit2 at runtime
     # "libwebkit2gtk3", "typelib(WebKit2)",
 ]


Test patch:
diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py
index 87a4c1e0..2fd7b49e 100644
--- a/tests/commands/new/test_build_context.py
+++ b/tests/commands/new/test_build_context.py
@@ -159,7 +159,7 @@ system_runtime_requires = [
     # Needed to support Python bindings to GTK
     "gobject-introspection", "typelib(Gtk) = 3.0",
     # Dependencies that GTK looks for at runtime
-    "libcanberra-gtk3-0",
+    "libcanberra-gtk3-module",
     # Needed to provide WebKit2 at runtime
     # "libwebkit2gtk3", "typelib(WebKit2)",
 ]
@@ -1104,7 +1104,7 @@ system_runtime_requires = [
     # Needed to support Python bindings to GTK
     "gobject-introspection", "typelib(Gtk) = 3.0",
     # Dependencies that GTK looks for at runtime
-    "libcanberra-gtk3-0",
+    "libcanberra-gtk3-module",
     # Needed to provide WebKit2 at runtime
     # "libwebkit2gtk3", "typelib(WebKit2)",
 ]
Repository: beeware/briefcase
Pull request #1896 (2024-07-04 15:22:23)

Ensure consistent spacing for prompts for New Project wizard
<!--- Describe your changes in detail -->
<!--- What problem does this change solve? -->
<!--- If this PR relates to an issue, include Refs #XXX or Fixes #XXX -->

## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [X] All new features have been tested
- [X] All new features have been documented
- [X] I have read the **CONTRIBUTING.md** file
- [X] I will abide by the code of conduct


Patch:
diff --git a/changes/1896.bugfix.rst b/changes/1896.bugfix.rst
new file mode 100644
index 00000000..2cfb64ca
--- /dev/null
+++ b/changes/1896.bugfix.rst
@@ -0,0 +1,1 @@
+The spacing after the New Project wizard prompts are now consistent.
diff --git a/src/briefcase/commands/new.py b/src/briefcase/commands/new.py
index 4e499785..48da0da5 100644
--- a/src/briefcase/commands/new.py
+++ b/src/briefcase/commands/new.py
@@ -417,7 +417,7 @@ class NewCommand(BaseCommand):
 
         self.prompt_intro(intro=intro)
         return _select_option(
-            prompt=f"{variable} [{default}]:",
+            prompt=f"{variable} [{default}]: ",
             input=self.input,
             default=default,
             options=list(zip(options, options)),


Test patch:
diff --git a/tests/commands/new/test_select_option.py b/tests/commands/new/test_select_option.py
index db07ba0a..fc2f5b03 100644
--- a/tests/commands/new/test_select_option.py
+++ b/tests/commands/new/test_select_option.py
@@ -42,7 +42,7 @@ def test_override_validation(new_command, mock_select_option, capsys):
         in capsys.readouterr().out
     )
     mock_select_option.assert_called_once_with(
-        prompt="Variable [1]:",
+        prompt="Variable [1]: ",
         input=new_command.input,
         default="1",
         options=[
@@ -63,7 +63,7 @@ def test_default_value_has_correct_index(new_command, mock_select_option):
         override_value=None,
     )
     mock_select_option.assert_called_once_with(
-        prompt="Variable [2]:",
+        prompt="Variable [2]: ",
         input=new_command.input,
         default="2",
         options=[
@@ -84,7 +84,7 @@ def test_default_default_is_one(new_command, mock_select_option):
         override_value=None,
     )
     mock_select_option.assert_called_once_with(
-        prompt="Variable [1]:",
+        prompt="Variable [1]: ",
         input=new_command.input,
         default="1",
         options=[
Repository: beeware/briefcase
Pull request #1987 (2024-09-08 16:23:29)

Bump Flatpak freedesktop runtime to 24.08
## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [x] All new features have been tested
- [x] All new features have been documented
- [X] I have read the **CONTRIBUTING.md** file
- [X] I will abide by the code of conduct


Patch:
diff --git a/changes/1987.feature.rst b/changes/1987.feature.rst
new file mode 100644
index 00000000..0592d665
--- /dev/null
+++ b/changes/1987.feature.rst
@@ -0,0 +1,1 @@
+The Flatpak runtimes for new projects were updated. ``org.freedesktop.Platform`` will now default to 24.08; ``org.gnome.Platform`` will now default to 46; and ``org.kde.Platform`` will now default to 6.7.
diff --git a/src/briefcase/bootstraps/console.py b/src/briefcase/bootstraps/console.py
index 58de0ad4..4e7075a1 100644
--- a/src/briefcase/bootstraps/console.py
+++ b/src/briefcase/bootstraps/console.py
@@ -92,7 +92,7 @@ system_runtime_requires = [
     def pyproject_table_linux_flatpak(self):
         return """\
 flatpak_runtime = "org.freedesktop.Platform"
-flatpak_runtime_version = "23.08"
+flatpak_runtime_version = "24.08"
 flatpak_sdk = "org.freedesktop.Sdk"
 """
 
diff --git a/src/briefcase/bootstraps/pygame.py b/src/briefcase/bootstraps/pygame.py
index f4c0f304..6176fc87 100644
--- a/src/briefcase/bootstraps/pygame.py
+++ b/src/briefcase/bootstraps/pygame.py
@@ -128,7 +128,7 @@ linuxdeploy_plugins = [
     def pyproject_table_linux_flatpak(self):
         return """\
 flatpak_runtime = "org.freedesktop.Platform"
-flatpak_runtime_version = "23.08"
+flatpak_runtime_version = "24.08"
 flatpak_sdk = "org.freedesktop.Sdk"
 """
 


Test patch:
diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py
index c37ff261..1fb71d7e 100644
--- a/tests/commands/new/test_build_context.py
+++ b/tests/commands/new/test_build_context.py
@@ -356,7 +356,7 @@ system_runtime_requires = [
 """,
         pyproject_table_linux_flatpak="""\
 flatpak_runtime = "org.freedesktop.Platform"
-flatpak_runtime_version = "23.08"
+flatpak_runtime_version = "24.08"
 flatpak_sdk = "org.freedesktop.Sdk"
 """,
         pyproject_table_windows="""\
@@ -692,7 +692,7 @@ linuxdeploy_plugins = [
 """,
         pyproject_table_linux_flatpak="""\
 flatpak_runtime = "org.freedesktop.Platform"
-flatpak_runtime_version = "23.08"
+flatpak_runtime_version = "24.08"
 flatpak_sdk = "org.freedesktop.Sdk"
 """,
         pyproject_table_windows="""\
Repository: beeware/briefcase
Pull request #2258 (2025-04-26 21:24:36)

Bump flatpak runtimes for gnome and kde
## Change
- Bump GNOME Flatpak runtime from 47 -> 48 (49 will release in sept)
- Bump KDE Flatpak runtime from 6.7 -> 6.9

## PR Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [x] All new features have been tested
- [X] All new features have been documented
- [X] I have read the **CONTRIBUTING.md** file
- [X] I will abide by the code of conduct


Patch:
diff --git a/changes/2258.feature.rst b/changes/2258.feature.rst
new file mode 100644
index 00000000..6a2fa361
--- /dev/null
+++ b/changes/2258.feature.rst
@@ -0,0 +1,1 @@
+The Flatpak runtimes for new projects were updated. ``org.gnome.Platform`` will now default to 47; and ``org.kde.Platform`` will now default to 6.9.
diff --git a/src/briefcase/bootstraps/pyside6.py b/src/briefcase/bootstraps/pyside6.py
index 6af04083..e77f4609 100644
--- a/src/briefcase/bootstraps/pyside6.py
+++ b/src/briefcase/bootstraps/pyside6.py
@@ -148,7 +148,7 @@ linuxdeploy_plugins = [
     def pyproject_table_linux_flatpak(self):
         return """\
 flatpak_runtime = "org.kde.Platform"
-flatpak_runtime_version = "6.7"
+flatpak_runtime_version = "6.9"
 flatpak_sdk = "org.kde.Sdk"
 """
 
diff --git a/src/briefcase/bootstraps/toga.py b/src/briefcase/bootstraps/toga.py
index f86d0955..2c013b58 100644
--- a/src/briefcase/bootstraps/toga.py
+++ b/src/briefcase/bootstraps/toga.py
@@ -192,7 +192,7 @@ linuxdeploy_plugins = [
     def pyproject_table_linux_flatpak(self):
         return """\
 flatpak_runtime = "org.gnome.Platform"
-flatpak_runtime_version = "47"
+flatpak_runtime_version = "48"
 flatpak_sdk = "org.gnome.Sdk"
 """
 


Test patch:
diff --git a/tests/commands/new/test_build_gui_context.py b/tests/commands/new/test_build_gui_context.py
index ca753998..03cb3318 100644
--- a/tests/commands/new/test_build_gui_context.py
+++ b/tests/commands/new/test_build_gui_context.py
@@ -206,7 +206,7 @@ linuxdeploy_plugins = [
 """,
         pyproject_table_linux_flatpak="""\
 flatpak_runtime = "org.gnome.Platform"
-flatpak_runtime_version = "47"
+flatpak_runtime_version = "48"
 flatpak_sdk = "org.gnome.Sdk"
 """,
         pyproject_table_windows="""\
@@ -491,7 +491,7 @@ linuxdeploy_plugins = [
 """,
         pyproject_table_linux_flatpak="""\
 flatpak_runtime = "org.kde.Platform"
-flatpak_runtime_version = "6.7"
+flatpak_runtime_version = "6.9"
 flatpak_sdk = "org.kde.Sdk"
 """,
         pyproject_table_windows="""\
Repository: benchopt/benchopt
Pull request #702 (2024-04-19 14:12:34)

CLN various cleanups
- Improve stopping_criterion error on bad keys
- Fix rendering failure when `]` in objective name
- FIX make sure to call `get_objective` before calling `get_one_result` (to make sure `get_split` is called)



Patch:
diff --git a/benchopt/base.py b/benchopt/base.py
index 6cf2f70..3b3923f 100644
--- a/benchopt/base.py
+++ b/benchopt/base.py
@@ -511,6 +511,13 @@ class BaseObjective(ParametrizedNameMixin, DependenciesMixin, ABC):
         type for benchopt. The returned object will be passed to
         ``Objective.compute``.
         """
+        ...
+
+    def _get_one_result(self):
+        # Make sure the splits with CV are created before calling
+        # get_one_result
+        self.get_objective()
+        return self.get_one_result()
 
     # Reduce the pickling and hashing burden by only pickling class parameters.
     @staticmethod
diff --git a/benchopt/plotting/html/templates/benchmark.mako.html b/benchopt/plotting/html/templates/benchmark.mako.html
index 7e4e5b7..382304a 100644
--- a/benchopt/plotting/html/templates/benchmark.mako.html
+++ b/benchopt/plotting/html/templates/benchmark.mako.html
@@ -107,8 +107,8 @@
           name_data_old = ""
         split = dataset.split('[')
         if len(split) > 1:
-          name_data_new, options = split
-          options = options[:-1]
+          name_data_new, *options = split
+          options = '['.join(options)[:-1]
         else:
           name_data_new, options = split[0], []
         not_disp_name = name_data_new == name_data_old
diff --git a/benchopt/stopping_criterion.py b/benchopt/stopping_criterion.py
index a240501..c321058 100644
--- a/benchopt/stopping_criterion.py
+++ b/benchopt/stopping_criterion.py
@@ -201,7 +201,8 @@ class StoppingCriterion():
             raise ValueError(
                 "Objective.evaluate_result() should contain a key named "
                 f"'{key}' to be used with this stopping_criterion. The name of"
-                " this key can be changed via the 'key_to_monitor' parameter."
+                " this key can be changed via the 'key_to_monitor' parameter. "
+                f"Available keys are {list(objective_list[0].keys())}"
             )
 
         # Modify the criterion state:


Test patch:
diff --git a/benchopt/tests/test_benchmarks.py b/benchopt/tests/test_benchmarks.py
index 80ef27c..47f6722 100644
--- a/benchopt/tests/test_benchmarks.py
+++ b/benchopt/tests/test_benchmarks.py
@@ -16,8 +16,8 @@ def test_benchmark_objective(benchmark, dataset_simu):
     # check that the reported dimension is correct and that the result of
     # the objective function is a dictionary containing a scalar value for
     # `objective_value`.
-    beta_hat = objective.get_one_result()
-    objective_dict = objective(beta_hat)
+    result = objective._get_one_result()
+    objective_dict = objective(result)
 
     assert 'objective_value' in objective_dict, (
         "When the output of objective is a dict, it should at least "