From 82e695de4bff8305a05afee94092a7556f0a04c4 Mon Sep 17 00:00:00 2001
From: jdkandersson <david.andersson@canonical.com>
Date: Thu, 4 Apr 2024 10:56:09 +1100
Subject: [PATCH 1/2] remove experimental flag

---
 charmcraft/extensions/gunicorn.py                             | 2 +-
 charmcraft/templates/init-flask-framework/requirements.txt.j2 | 2 +-
 tests/extensions/test_gunicorn.py                             | 3 +--
 tests/spread/commands/init-flask-framework/task.yaml          | 3 ---
 4 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/charmcraft/extensions/gunicorn.py b/charmcraft/extensions/gunicorn.py
index 48df8d1b9..6d2ab79ac 100644
--- a/charmcraft/extensions/gunicorn.py
+++ b/charmcraft/extensions/gunicorn.py
@@ -55,7 +55,7 @@ def get_supported_bases() -> list[tuple[str, str]]:
     @override
     def is_experimental(base: tuple[str, ...] | None) -> bool:  # noqa: ARG004
         """Check if the extension is in an experimental state."""
-        return True
+        return False
 
     framework: str
     actions: dict
diff --git a/charmcraft/templates/init-flask-framework/requirements.txt.j2 b/charmcraft/templates/init-flask-framework/requirements.txt.j2
index a3f5d8483..acab50eb1 100644
--- a/charmcraft/templates/init-flask-framework/requirements.txt.j2
+++ b/charmcraft/templates/init-flask-framework/requirements.txt.j2
@@ -1 +1 @@
-paas-app-charmer~=0.2.1
+paas-app-charmer==1.*
diff --git a/tests/extensions/test_gunicorn.py b/tests/extensions/test_gunicorn.py
index 6fa72f284..51421e1ef 100644
--- a/tests/extensions/test_gunicorn.py
+++ b/tests/extensions/test_gunicorn.py
@@ -21,8 +21,7 @@
 
 
 @pytest.fixture(name="flask_input_yaml")
-def flask_input_yaml_fixture(monkeypatch, tmp_path):
-    monkeypatch.setenv("CHARMCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS", "1")
+def flask_input_yaml_fixture(tmp_path):
     return {
         "type": "charm",
         "name": "test-flask",
diff --git a/tests/spread/commands/init-flask-framework/task.yaml b/tests/spread/commands/init-flask-framework/task.yaml
index c8cf71ea7..2fba60b52 100644
--- a/tests/spread/commands/init-flask-framework/task.yaml
+++ b/tests/spread/commands/init-flask-framework/task.yaml
@@ -1,8 +1,5 @@
 summary: test charmcraft init with flask-framework profile
 
-environment:
-  CHARMCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS: "true"
-
 execute: |
   unset CHARMCRAFT_STORE_API_URL
   unset CHARMCRAFT_UPLOAD_URL

From 7bcfd0a62f243288e76fea161941d35395a1f03d Mon Sep 17 00:00:00 2001
From: jdkandersson <david.andersson@canonical.com>
Date: Thu, 4 Apr 2024 10:59:29 +1100
Subject: [PATCH 2/2] only mark flask framework extension as no longer
 experimental

---
 charmcraft/extensions/gunicorn.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/charmcraft/extensions/gunicorn.py b/charmcraft/extensions/gunicorn.py
index 6d2ab79ac..d3c868b12 100644
--- a/charmcraft/extensions/gunicorn.py
+++ b/charmcraft/extensions/gunicorn.py
@@ -55,7 +55,7 @@ def get_supported_bases() -> list[tuple[str, str]]:
     @override
     def is_experimental(base: tuple[str, ...] | None) -> bool:  # noqa: ARG004
         """Check if the extension is in an experimental state."""
-        return False
+        return True
 
     framework: str
     actions: dict
@@ -204,3 +204,9 @@ class FlaskFramework(_GunicornBase):
             "description": "Set the secure attribute in the Flask application cookies. This configuration will set the FLASK_SESSION_COOKIE_SECURE environment variable. Run `app.config.from_prefixed_env()` in your Flask application in order to receive this configuration.",
         },
     }
+
+    @staticmethod
+    @override
+    def is_experimental(base: tuple[str, ...] | None) -> bool:  # noqa: ARG004
+        """Check if the extension is in an experimental state."""
+        return False