Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#ECCN:Open Source
31 changes: 17 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["build", "setuptools>=62", "wheel", "setuptools_scm>=6.2"]
requires = ["build", "setuptools", "setuptools_scm"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
local_scheme = "no-local-version" # require pypi supported versions always
Expand Down Expand Up @@ -29,7 +29,8 @@ name="tabcmd"
dynamic = ["version"]
description="A command line client for working with Tableau Server."
authors = [{name="Tableau", email="github@tableau.com"}]
license = {file = "LICENSE"}
license = "MIT"
license-files = ["LICENSE"]
readme = "res/README.md"
requires-python = ">=3.9" # https://devguide.python.org/versions/
classifiers = [
Expand All @@ -43,17 +44,10 @@ classifiers = [
]
dependencies = [
"appdirs",
"doit",
"ftfy",
"pyinstaller_versionfile",
"pytest-order",
"requests>=2.25,<3.0",
"setuptools_scm",
"types-appdirs",
"types-mock",
"types-requests",
"types-setuptools",
"tableauserverclient==0.37",
# pinned to 81 so the license_checker can use pkg_resources
"setuptools<81; python_version >= '3.12'",
"tableauserverclient==0.40",
"urllib3",
]
[project.optional-dependencies]
Expand All @@ -65,9 +59,18 @@ test = [
"pytest-cov",
"pytest-order",
"pytest-runner",
"requests-mock>=1.0,<2.0"]
"requests-mock>=1.0,<2.0",
"types-appdirs",
"types-mock",
"types-requests",
"types-setuptools",
# these last three are required for the versioning step
"doit",
"pyinstaller_versionfile",
"setuptools_scm"
]
localize = ["doit", "ftfy"]
package = ["pyinstaller==5.13", "doit"]
package = ["doit", "pyinstaller==5.13"]
[project.urls]
repository = "https://github.com/tableau/tabcmd"
[project.scripts]
Expand Down
8 changes: 1 addition & 7 deletions tabcmd/execution/localize.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,7 @@ def _load_language(current_locale, domain, logger):


def _get_default_locale():
# c:\dev\tabcmd\tabcmd\execution\localize.py:85: DeprecationWarning 'locale.getdefaultlocale' is deprecated
# see test_localize for details
import logging

logging.captureWarnings(True)
current_locale, encoding = locale.getdefaultlocale()
logging.captureWarnings(False)
current_locale = locale.setlocale(locale.LC_CTYPE, None)
current_locale = _validate_lang(current_locale)
return current_locale

Expand Down
8 changes: 3 additions & 5 deletions tabcmd/version.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# when we drop python 3.8, this could be replaced with this lighter weight option
# from importlib.metadata import version, PackageNotFoundError
from pkg_resources import get_distribution, DistributionNotFound
from importlib.metadata import version as get_version, PackageNotFoundError

try:
version = get_distribution("tabcmd").version
except DistributionNotFound:
version = get_version("tabcmd")
except PackageNotFoundError:
version = "2.0.0"
pass