Merge "Replace appdirs usage with platformdirs"
This commit is contained in:
commit
d17b23f631
|
@ -24,9 +24,9 @@ import sys
|
|||
import typing as ty
|
||||
import warnings
|
||||
|
||||
import appdirs
|
||||
from keystoneauth1 import adapter
|
||||
from keystoneauth1 import loading
|
||||
import platformdirs
|
||||
import yaml
|
||||
|
||||
from openstack import _log
|
||||
|
@ -37,9 +37,11 @@ from openstack.config import vendors
|
|||
from openstack import exceptions
|
||||
from openstack import warnings as os_warnings
|
||||
|
||||
APPDIRS = appdirs.AppDirs('openstack', 'OpenStack', multipath='/etc')
|
||||
CONFIG_HOME = APPDIRS.user_config_dir
|
||||
CACHE_PATH = APPDIRS.user_cache_dir
|
||||
PLATFORMDIRS = platformdirs.PlatformDirs(
|
||||
'openstack', 'OpenStack', multipath='/etc'
|
||||
)
|
||||
CONFIG_HOME = PLATFORMDIRS.user_config_dir
|
||||
CACHE_PATH = PLATFORMDIRS.user_cache_dir
|
||||
|
||||
# snaps do set $HOME to something like
|
||||
# /home/$USER/snap/openstackclients/$SNAP_VERSION
|
||||
|
@ -56,7 +58,7 @@ else:
|
|||
)
|
||||
UNIX_SITE_CONFIG_HOME = '/etc/openstack'
|
||||
|
||||
SITE_CONFIG_HOME = APPDIRS.site_config_dir
|
||||
SITE_CONFIG_HOME = PLATFORMDIRS.site_config_dir
|
||||
|
||||
CONFIG_SEARCH_PATH = [
|
||||
os.getcwd(),
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The ``appdirs`` dependency is replaced by a requirement for
|
||||
``platformdirs`` 3.0.0 or later. Users on macOS may need to move
|
||||
configuration files to ``*/Library/Application Support``. See its release
|
||||
notes for further details:
|
||||
https://platformdirs.readthedocs.io/en/latest/changelog.html#platformdirs-3-0-0-2023-02-06
|
|
@ -3,7 +3,7 @@
|
|||
# process, which may cause wedges in the gate later.
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
PyYAML>=3.13 # MIT
|
||||
appdirs>=1.3.0 # MIT License
|
||||
platformdirs>=3 # MIT License
|
||||
requestsexceptions>=1.2.0 # Apache-2.0
|
||||
jsonpatch!=1.20,>=1.16 # BSD
|
||||
os-service-types>=1.7.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue