Projects
openEuler:Mainline
python-platformdirs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
_service:tar_scm:python-platformdirs.spec
Changed
@@ -1,11 +1,11 @@ %global _empty_manifest_terminate_build 0 Name: python-platformdirs -Version: 3.5.0 +Version: 3.5.1 Release: 1 Summary: A small Python module for determining appropriate platform-specific dirs License: MIT URL: https://github.com/platformdirs/platformdirs -Source0: https://files.pythonhosted.org/packages/91/17/3836ffe140abb245726d0e21c5b9b984e2569e7027c20d12e969ec69bd8a/platformdirs-3.5.0.tar.gz +Source0: https://files.pythonhosted.org/packages/9c/0e/ae9ef1049d4b5697e79250c4b2e72796e4152228e67733389868229c92bb/platformdirs-3.5.1.tar.gz BuildArch: noarch BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel @@ -51,7 +51,7 @@ %pyproject_build %install -%pyproject_install platformdirs==%{version} +%pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} if -d doc ; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi @@ -69,6 +69,9 @@ %{_docdir}/* %changelog +* Mon Jun 05 2023 Dongxing Wang <dxwangk@isoftstone.com> - 3.5.1-1 +- Upgrade the version to 3.5.1 for tox 4.5.2 + * Sat May 06 2023 xu_ping <707078654@qq.com> - 3.5.0-1 - Upgrade the version to 3.5.0
View file
_service:tar_scm:platformdirs-3.5.0.tar.gz/PKG-INFO -> _service:tar_scm:platformdirs-3.5.1.tar.gz/PKG-INFO
Changed
@@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: platformdirs -Version: 3.5.0 +Version: 3.5.1 Summary: A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir". Project-URL: Documentation, https://platformdirs.readthedocs.io Project-URL: Homepage, https://github.com/platformdirs/platformdirs @@ -15,13 +15,13 @@ Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Libraries :: Python Modules @@ -31,7 +31,7 @@ Requires-Dist: furo>=2023.3.27; extra == 'docs' Requires-Dist: proselint>=0.13; extra == 'docs' Requires-Dist: sphinx-autodoc-typehints!=1.23.4,>=1.23; extra == 'docs' -Requires-Dist: sphinx>=6.1.3; extra == 'docs' +Requires-Dist: sphinx>=6.2.1; extra == 'docs' Provides-Extra: test Requires-Dist: appdirs==1.4.4; extra == 'test' Requires-Dist: covdefaults>=2.3; extra == 'test' @@ -54,7 +54,7 @@ ~/Library/Application Support/<AppName> -If on Windows (at least English Win XP) that should be:: +If on Windows (at least English Win) that should be:: C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName> @@ -113,7 +113,7 @@ >>> user_runtime_dir(appname, appauthor) '/Users/trentm/Library/Caches/TemporaryItems/SuperApp' -On Windows 7: +On Windows: .. code-block:: pycon
View file
_service:tar_scm:platformdirs-3.5.0.tar.gz/README.rst -> _service:tar_scm:platformdirs-3.5.1.tar.gz/README.rst
Changed
@@ -12,7 +12,7 @@ ~/Library/Application Support/<AppName> -If on Windows (at least English Win XP) that should be:: +If on Windows (at least English Win) that should be:: C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName> @@ -71,7 +71,7 @@ >>> user_runtime_dir(appname, appauthor) '/Users/trentm/Library/Caches/TemporaryItems/SuperApp' -On Windows 7: +On Windows: .. code-block:: pycon
View file
_service:tar_scm:platformdirs-3.5.0.tar.gz/pyproject.toml -> _service:tar_scm:platformdirs-3.5.1.tar.gz/pyproject.toml
Changed
@@ -2,7 +2,7 @@ build-backend = "hatchling.build" requires = "hatch-vcs>=0.3", - "hatchling>=1.14", + "hatchling>=1.14.1", project @@ -31,13 +31,13 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", @@ -51,7 +51,7 @@ optional-dependencies.docs = "furo>=2023.3.27", "proselint>=0.13", - "sphinx>=6.1.3", + "sphinx>=6.2.1", "sphinx-autodoc-typehints!=1.23.4,>=1.23", optional-dependencies.test = @@ -68,7 +68,7 @@ tool.hatch build.hooks.vcs.version-file = "src/platformdirs/version.py" -build.targets.sdist.include = "/src", "/tests" +build.targets.sdist.include = "/src", "/tests", "/tox.ini" version.source = "vcs" tool.black
View file
_service:tar_scm:platformdirs-3.5.0.tar.gz/src/platformdirs/unix.py -> _service:tar_scm:platformdirs-3.5.1.tar.gz/src/platformdirs/unix.py
Changed
@@ -7,12 +7,13 @@ from .api import PlatformDirsABC -if sys.platform.startswith("linux"): # pragma: no branch # no op check, only to please the type checker - from os import getuid -else: +if sys.platform == "win32": def getuid() -> int: - raise RuntimeError("should only be used on Linux") + raise RuntimeError("should only be used on Unix") + +else: + from os import getuid class Unix(PlatformDirsABC):
View file
_service:tar_scm:platformdirs-3.5.0.tar.gz/src/platformdirs/version.py -> _service:tar_scm:platformdirs-3.5.1.tar.gz/src/platformdirs/version.py
Changed
@@ -1,4 +1,4 @@ # file generated by setuptools_scm # don't change, don't track in version control -__version__ = version = '3.5.0' -__version_tuple__ = version_tuple = (3, 5, 0) +__version__ = version = '3.5.1' +__version_tuple__ = version_tuple = (3, 5, 1)
View file
_service:tar_scm:platformdirs-3.5.0.tar.gz/tests/test_comp_with_appdirs.py -> _service:tar_scm:platformdirs-3.5.1.tar.gz/tests/test_comp_with_appdirs.py
Changed
@@ -60,12 +60,12 @@ } if func in msg: # pragma: no cover pytest.skip(f"`appdirs.{func}` {msgfunc} on macOS") # pragma: no cover - if sys.platform == "linux": + elif sys.platform != "win32": msg = { # pragma: no cover "user_log_dir": "Uses XDG_STATE_DIR instead of appdirs.user_data_dir per the XDG spec", } if func in msg: # pragma: no cover - pytest.skip(f"`appdirs.{func}` {msgfunc} on Linux") # pragma: no cover + pytest.skip(f"`appdirs.{func}` {msgfunc} on Unix") # pragma: no cover new = getattr(platformdirs, func)(*params) old = getattr(appdirs, func)(*params)
View file
_service:tar_scm:platformdirs-3.5.0.tar.gz/tests/test_unix.py -> _service:tar_scm:platformdirs-3.5.1.tar.gz/tests/test_unix.py
Changed
@@ -10,6 +10,7 @@ from _pytest.monkeypatch import MonkeyPatch from pytest_mock import MockerFixture +from platformdirs import unix from platformdirs.unix import Unix @@ -128,18 +129,16 @@ assert result == "/tmp/custom-dir" -def test_platform_non_linux(monkeypatch: MonkeyPatch) -> None: - from platformdirs import unix - +def test_platform_on_win32(monkeypatch: MonkeyPatch, mocker: MockerFixture) -> None: + monkeypatch.delenv("XDG_RUNTIME_DIR", raising=False) + mocker.patch("sys.platform", "win32") + prev_unix = unix + importlib.reload(unix) try: - with monkeypatch.context() as context: - context.setattr(sys, "platform", "magic") - monkeypatch.delenv("XDG_RUNTIME_DIR", raising=False) - importlib.reload(unix) - with pytest.raises(RuntimeError, match="should only be used on Linux"): + with pytest.raises(RuntimeError, match="should only be used on Unix"): unix.Unix().user_runtime_dir finally: - importlib.reload(unix) + sys.modules"platformdirs.unix" = prev_unix def test_ensure_exists_creates_folder(mocker: MockerFixture, tmp_path: Path) -> None:
View file
_service:tar_scm:platformdirs-3.5.1.tar.gz/tox.ini
Added
@@ -0,0 +1,117 @@ +tox +requires = + tox>=4.2 +env_list = + fix + py312 + py311 + py310 + py39 + py38 + py37 + pypy3 + type + coverage + readme + docs +skip_missing_interpreters = true + +testenv +description = run the unit tests with pytest under {basepython} +package = wheel +wheel_build_env = .pkg +extras = + test +pass_env = + ANDROID_DATA + ANDROID_ROOT +set_env = + COVERAGE_FILE = {toxworkdir}/.coverage.{envname} + COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml + _COVERAGE_SRC = {envsitepackagesdir}/platformdirs +commands = + pytest {tty:--color=yes} {posargs: \ + --junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}platformdirs \ + --cov {toxinidir}{/}tests \ + --cov-config=pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context=test \ + --cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \ + tests} + +testenv:fix +description = run static analysis and style check using flake8 +skip_install = true +deps = + pre-commit>=3.3.1 +pass_env = + HOMEPATH + PROGRAMDATA +commands = + pre-commit run --all-files --show-diff-on-failure + +testenv:type +description = run type check on code base +deps = + mypy==1.2 +set_env = + {tty:MYPY_FORCE_COLOR = 1} +commands = + mypy --strict src + mypy --strict tests + +testenv:coverage +description = combine coverage files and generate diff (against DIFF_AGAINST defaulting to origin/main) +skip_install = true +deps = + covdefaults>=2.3 + coveragetoml>=7.2.5 + diff-cover>=7.5 +extras = +parallel_show_output = true +pass_env = + DIFF_AGAINST +set_env = + COVERAGE_FILE = {toxworkdir}/.coverage +commands = + coverage combine + coverage report --skip-covered --show-missing + coverage xml -o {toxworkdir}/coverage.xml + coverage html -d {toxworkdir}/htmlcov + diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml +depends = + py311 + py310 + py39 + py38 + py37 + pypy3 + +testenv:readme +description = check that the long description is valid +skip_install = true +deps = + buildvirtualenv>=0.10 + twine>=4.0.2 +pass_env = + * +change_dir = {toxinidir} +commands = + python -m build -o {envtmpdir} . + twine check {envtmpdir}/* + +testenv:docs +base_python = 3.10 +extras = + docs +commands = + python -c 'import glob; import subprocess; subprocess.call("proselint" + glob.glob("docs/*.rst"))' + sphinx-build -d "{envtmpdir}/doctree" docs "{toxworkdir}/docs_out" --color -b html {posargs} + python -c 'import pathlib; print("documentation available under \{0\}".format((pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html").as_uri()))' + +testenv:dev +description = generate a DEV environment +package = editable +extras = + test +commands = + python -m pip list --format=columns + python -c 'import sys; print(sys.executable)'
View file
_service:tar_scm:python-platformdirs.yaml
Added
@@ -0,0 +1,4 @@ +version_control: pypi +src_repo: platformdirs +tag_prefix: "^v" +seperator: "."
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2