before_first_request has been deprecated

Open
#95 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
flask, python

Research direction

Start with requirements.txt and the reported flask run failure involving before_first_request. Check the Flask version constraint against the workaround, then run flask run to verify the AttributeError no longer occurs.

Written by the indexing model from the issue text.

Description

When running flask run, an error will occur: AttributeError: 'Flask' object has no attribute 'before_first_request'.

workaround:

diff --git a/requirements.txt b/requirements.txt
index a9a0f2d..34f5e84 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,3 @@
-Flask
+Flask~=2.2.0
 Flask-SQLAlchemy
 Authlib
Dominant language
Python
Stars
705
Forks
279
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from authlib/example-oauth2-server

All issues in authlib/example-oauth2-server

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.