Skip to content

Commit

Permalink
Merge pull request #544 from gauge-sh/fix-logging-on-windows
Browse files Browse the repository at this point in the history
Fix error output and hang on Windows
  • Loading branch information
emdoyle authored Jan 13, 2025
2 parents 27487a1 + acb6af5 commit 7f0f875
Show file tree
Hide file tree
Showing 17 changed files with 396 additions and 318 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tach"
version = "0.19.7"
version = "0.20.0"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ If you use the [pre-commit framework](https://github.com/pre-commit/pre-commit),
```yaml
repos:
- repo: https://github.com/gauge-sh/tach-pre-commit
rev: v0.19.7 # change this to the latest tag!
rev: v0.20.0 # change this to the latest tag!
hooks:
- id: tach
```
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "tach"
version = "0.19.7"
version = "0.20.0"
authors = [
{ name = "Caelean Barnes", email = "[email protected]" },
{ name = "Evan Doyle", email = "[email protected]" },
Expand Down
2 changes: 1 addition & 1 deletion python/tach/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations

__version__: str = "0.19.7"
__version__: str = "0.20.0"

__all__ = ["__version__"]
4 changes: 2 additions & 2 deletions python/tach/cache/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations

from tach.cache.access import get_latest_version, get_uid, update_latest_version
from tach.cache.access import get_latest_version, get_uid

__all__ = ["get_uid", "update_latest_version", "get_latest_version"]
__all__ = ["get_uid", "get_latest_version"]
21 changes: 0 additions & 21 deletions python/tach/cache/access.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import annotations

import json
import uuid
from urllib import error, request

from tach.cache.setup import resolve_dot_tach
from tach.filesystem import find_project_config_root
Expand Down Expand Up @@ -31,22 +29,3 @@ def get_latest_version() -> str | None:
return
version = latest_version_path.read_text().strip()
return version


def update_latest_version() -> None:
project_path = find_project_config_root()
if project_path is None:
return
url = "https://pypi.org/pypi/tach/json"
try:
# Sending a GET request to the URL
with request.urlopen(url, timeout=1) as response:
if response.status == 200:
data = response.read().decode()
json_data = json.loads(data)
latest_version = json_data["info"]["version"]
else:
return
except (error.URLError, KeyError):
return
(project_path / ".tach" / ".latest-version").write_text(latest_version)
Loading

0 comments on commit 7f0f875

Please sign in to comment.