Skip to content

Commit

Permalink
Remove registry deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
prryplatypus committed Dec 20, 2021
1 parent 578f354 commit 373ab7f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
6 changes: 0 additions & 6 deletions sanic/app.py
Expand Up @@ -223,12 +223,6 @@ def __init__(
self.go_fast = self.run

if register is not None:
warn(
"The register argument is deprecated and will stop working "
"in vXX.X. After vXX.X all apps will be added to the Sanic "
"app registry.",
DeprecationWarning,
)
self.config.REGISTER = register
if self.config.REGISTER:
self.__class__.register_app(self)
Expand Down
16 changes: 0 additions & 16 deletions tests/test_app.py
Expand Up @@ -392,22 +392,6 @@ def test_app_no_registry():
Sanic.get_app("no-register")


def test_app_no_registry_deprecation_message():
with pytest.warns(DeprecationWarning) as records:
Sanic("no-register", register=False)
Sanic("no-register", register=True)

message = (
"The register argument is deprecated and will stop working "
"in vXX.X. After vXX.X all apps will be added to the Sanic "
"app registry."
)

assert len(records) == 2
for record in records:
assert record.message.args[0] == message


def test_app_no_registry_env():
environ["SANIC_REGISTER"] = "False"
Sanic("no-register")
Expand Down

0 comments on commit 373ab7f

Please sign in to comment.