Skip to content
Merged
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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

5 changes: 0 additions & 5 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 Down
45 changes: 0 additions & 45 deletions setup.py

This file was deleted.

Loading