Skip to content

Commit c065680

Browse files
jacalatadependabot[bot]jimjag
authored
reorganize and update dependencies (#377)
* Bump actions/checkout from 4 to 5 (#362) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/setup-python from 5 to 6 (#363) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Upload required file(s) for compliance * Update CODEOWNERS to remove '404: Not Found' * bump tsc * update format for license field * dependency management setuptools is required for running the program and is not provided by default in 3.12+ Many of the dependencies listed are not required for runtime, so moving them to a new [dev] section * bump setuptools Didn't really need the version specification anyway. * remove deprecation warnings * Upload required file(s) for compliance * Update CODEOWNERS to remove '404: Not Found' * bump tsc * update format for license field * dependency management setuptools is required for running the program and is not provided by default in 3.12+ Many of the dependencies listed are not required for runtime, so moving them to a new [dev] section * bump setuptools Didn't really need the version specification anyway. * remove deprecation warnings * revert new dependencies set It seems fine to bundle them all under 'test' - I don't want anyone trying to work on the code without tests anyway. And I would have to edit all the workflow files to add a step to install the dev bundle. * setuptools_scm is required for the version step * Update pyproject.toml * pin setuptools for license_checker * mypy: variable name shadowed --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jim Jagielski <jimjag@gmail.com> Co-authored-by: Jim Jagielski <jjagielski@salesforce.com>
1 parent 07b4aa9 commit c065680

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

pyproject.toml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["build", "setuptools>=62", "wheel", "setuptools_scm>=6.2"]
2+
requires = ["build", "setuptools", "setuptools_scm"]
33
build-backend = "setuptools.build_meta"
44
[tool.setuptools_scm]
55
local_scheme = "no-local-version" # require pypi supported versions always
@@ -29,7 +29,8 @@ name="tabcmd"
2929
dynamic = ["version"]
3030
description="A command line client for working with Tableau Server."
3131
authors = [{name="Tableau", email="github@tableau.com"}]
32-
license = {file = "LICENSE"}
32+
license = "MIT"
33+
license-files = ["LICENSE"]
3334
readme = "res/README.md"
3435
requires-python = ">=3.9" # https://devguide.python.org/versions/
3536
classifiers = [
@@ -43,17 +44,10 @@ classifiers = [
4344
]
4445
dependencies = [
4546
"appdirs",
46-
"doit",
47-
"ftfy",
48-
"pyinstaller_versionfile",
49-
"pytest-order",
5047
"requests>=2.25,<3.0",
51-
"setuptools_scm",
52-
"types-appdirs",
53-
"types-mock",
54-
"types-requests",
55-
"types-setuptools",
56-
"tableauserverclient==0.37",
48+
# pinned to 81 so the license_checker can use pkg_resources
49+
"setuptools<81; python_version >= '3.12'",
50+
"tableauserverclient==0.40",
5751
"urllib3",
5852
]
5953
[project.optional-dependencies]
@@ -65,9 +59,18 @@ test = [
6559
"pytest-cov",
6660
"pytest-order",
6761
"pytest-runner",
68-
"requests-mock>=1.0,<2.0"]
62+
"requests-mock>=1.0,<2.0",
63+
"types-appdirs",
64+
"types-mock",
65+
"types-requests",
66+
"types-setuptools",
67+
# these last three are required for the versioning step
68+
"doit",
69+
"pyinstaller_versionfile",
70+
"setuptools_scm"
71+
]
6972
localize = ["doit", "ftfy"]
70-
package = ["pyinstaller==5.13", "doit"]
73+
package = ["doit", "pyinstaller==5.13"]
7174
[project.urls]
7275
repository = "https://github.com/tableau/tabcmd"
7376
[project.scripts]

tabcmd/execution/localize.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,7 @@ def _load_language(current_locale, domain, logger):
8383

8484

8585
def _get_default_locale():
86-
# c:\dev\tabcmd\tabcmd\execution\localize.py:85: DeprecationWarning 'locale.getdefaultlocale' is deprecated
87-
# see test_localize for details
88-
import logging
89-
90-
logging.captureWarnings(True)
91-
current_locale, encoding = locale.getdefaultlocale()
92-
logging.captureWarnings(False)
86+
current_locale = locale.setlocale(locale.LC_CTYPE, None)
9387
current_locale = _validate_lang(current_locale)
9488
return current_locale
9589

tabcmd/version.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# when we drop python 3.8, this could be replaced with this lighter weight option
2-
# from importlib.metadata import version, PackageNotFoundError
3-
from pkg_resources import get_distribution, DistributionNotFound
1+
from importlib.metadata import version as get_version, PackageNotFoundError
42

53
try:
6-
version = get_distribution("tabcmd").version
7-
except DistributionNotFound:
4+
version = get_version("tabcmd")
5+
except PackageNotFoundError:
86
version = "2.0.0"
97
pass

0 commit comments

Comments
 (0)