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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ download and unarchive the source tarball (Appium-Python-Client-X.X.tar.gz).
```shell
tar -xvf Appium-Python-Client-X.X.tar.gz
cd Appium-Python-Client-X.X
python setup.py install
pip install .
```

3. Install from source via [GitHub](https://github.com/appium/python-client).

```shell
git clone git@github.com:appium/python-client.git
cd python-client
python setup.py install
pip install .
```

## Compatibility Matrix
Expand Down
9 changes: 2 additions & 7 deletions appium/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from importlib import metadata
from importlib.metadata import version as _metadata_version


def _get_version():
return metadata.version('Appium-Python-Client')


version = _get_version()
version = _metadata_version('Appium-Python-Client')
Comment on lines +15 to +17
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version = _metadata_version('Appium-Python-Client') will raise importlib.metadata.PackageNotFoundError when the distribution metadata is not available (e.g., running from a source checkout without an installed wheel/sdist), which makes importing appium.version fail. Wrap the metadata lookup in a try/except and fall back to a safe value (the PR description mentions returning 'unknown').

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PR description needs to be updated

Comment on lines +15 to +17
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says _get_version() was improved to handle missing package metadata and return 'unknown', but _get_version() was removed and the module now unconditionally queries metadata at import time. Either reintroduce a helper with the documented fallback behavior or adjust the PR description to match the implemented behavior.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ dev = [
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "regex"
path = "appium/version.py"
pattern = "(?P<version>\\d+\\.\\d+\\.\\d+)"

[tool.hatch.build]
exclude = [
"test/",
Expand All @@ -94,7 +89,7 @@ major_on_zero = true
allow_zero_version = false
no_git_verify = false
tag_format = "v{version}"
version_toml = ["pyproject.toml:project.version"]
version_toml = ["pyproject.toml:project.version", "appium/version.py:version"]
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version_toml is configured to update appium/version.py:version, but version_toml entries are typically TOML key paths (and appium/version.py is not a TOML file). If the intent is to have python-semantic-release bump a Python variable, use the configuration option intended for Python version variables (and ensure appium/version.py contains a literal version string assignment that the tool can rewrite). Otherwise the release process may fail when trying to parse/update this entry.

Suggested change
version_toml = ["pyproject.toml:project.version", "appium/version.py:version"]
version_toml = ["pyproject.toml:project.version"]
version_variables = ["appium/version.py:version"]

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me


[tool.semantic_release.branches.main]
match = "(main|master)"
Expand Down
45 changes: 0 additions & 45 deletions setup.py

This file was deleted.

Loading