File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 13
13
import requests
14
14
import string
15
15
import typing as t
16
+ import warnings
16
17
from collections import namedtuple
17
18
from google .appengine .api import images , blobstore
18
19
from urllib .parse import quote as urlquote , urlencode
@@ -1315,3 +1316,19 @@ def start_delete_pending_files():
1315
1316
.filter ("pending =" , True )
1316
1317
.filter ("creationdate <" , utils .utcNow () - datetime .timedelta (days = 7 ))
1317
1318
)
1319
+
1320
+
1321
+ # DEPRECATED ATTRIBUTES HANDLING
1322
+
1323
+ def __getattr__ (attr : str ) -> object :
1324
+ if entry := {
1325
+ # stuff prior viur-core < 3.7
1326
+ "GOOGLE_STORAGE_BUCKET" : ("File.get_bucket()" , _private_bucket ),
1327
+ }.get (attr ):
1328
+ func = entry [1 ]
1329
+ msg = f"{ attr } was replaced by { entry [0 ]} "
1330
+ warnings .warn (msg , DeprecationWarning , stacklevel = 2 )
1331
+ logging .warning (msg , stacklevel = 2 )
1332
+ return func
1333
+
1334
+ return super (__import__ (__name__ ).__class__ ).__getattribute__ (attr )
You can’t perform that action at this time.
0 commit comments