mirror of
https://github.com/krateng/maloja.git
synced 2025-07-09 03:04:07 -04:00
Replaced deprecated imports
This commit is contained in:
parent
70375d867e
commit
5ba8df9677
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1 +1 @@
|
|||||||
custom: ["https://flattr.com/@Krateng", "https://paypal.me/krateng"]
|
custom: ["https://paypal.me/krateng"]
|
||||||
|
@ -141,7 +141,7 @@ def print_info():
|
|||||||
print(col['lightblue']("Timezone: "),f"UTC{conf.malojaconfig['timezone']:+d}")
|
print(col['lightblue']("Timezone: "),f"UTC{conf.malojaconfig['timezone']:+d}")
|
||||||
print()
|
print()
|
||||||
try:
|
try:
|
||||||
import pkg_resources
|
from setuptools.dist import pkg_resources
|
||||||
for pkg in ("sqlalchemy","waitress","bottle","doreah","jinja2"):
|
for pkg in ("sqlalchemy","waitress","bottle","doreah","jinja2"):
|
||||||
print(col['cyan'] (f"{pkg}:".ljust(13)),pkg_resources.get_distribution(pkg).version)
|
print(col['cyan'] (f"{pkg}:".ljust(13)),pkg_resources.get_distribution(pkg).version)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from importlib import resources
|
from importlib import resources
|
||||||
from distutils import dir_util
|
from setuptools import distutils
|
||||||
|
|
||||||
from doreah.io import col, ask, prompt
|
from doreah.io import col, ask, prompt
|
||||||
from doreah import auth
|
from doreah import auth
|
||||||
@ -23,7 +23,7 @@ ext_apikeys = [
|
|||||||
def copy_initial_local_files():
|
def copy_initial_local_files():
|
||||||
with resources.files("maloja") / 'data_files' as folder:
|
with resources.files("maloja") / 'data_files' as folder:
|
||||||
for cat in dir_settings:
|
for cat in dir_settings:
|
||||||
dir_util.copy_tree(os.path.join(folder,cat),dir_settings[cat],update=False)
|
distutils.dir_util.copy_tree(os.path.join(folder,cat),dir_settings[cat],update=False)
|
||||||
|
|
||||||
charset = list(range(10)) + list("abcdefghijklmnopqrstuvwxyz") + list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
charset = list(range(10)) + list("abcdefghijklmnopqrstuvwxyz") + list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
||||||
def randomstring(length=32):
|
def randomstring(length=32):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user