Skip to content

Commit fc9b34c

Browse files
authored
Remove private import for flask 2.0 compatibility (#915)
1 parent 4f27b96 commit fc9b34c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

flask_restful/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from flask_restful.utils import http_status_message, unpack, OrderedDict
1212
from flask_restful.representations.json import output_json
1313
import sys
14-
from flask.helpers import _endpoint_from_view_func
1514
from types import MethodType
1615
import operator
1716
try:
@@ -156,7 +155,7 @@ def _blueprint_setup_add_url_rule_patch(blueprint_setup, rule, endpoint=None, vi
156155
rule = blueprint_setup.url_prefix + rule
157156
options.setdefault('subdomain', blueprint_setup.subdomain)
158157
if endpoint is None:
159-
endpoint = _endpoint_from_view_func(view_func)
158+
endpoint = view_func.__name__
160159
defaults = blueprint_setup.url_defaults
161160
if 'defaults' in options:
162161
defaults = dict(defaults, **options.pop('defaults'))

0 commit comments

Comments
 (0)