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
104 changes: 0 additions & 104 deletions .baselines/basedpyright.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
{
"files": {
"./pytest_robotframework/_internal/api.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 5,
"endColumn": 19,
"lineCount": 1
}
},
{
"code": "reportDeprecated",
"range": {
"startColumn": 1,
"endColumn": 15,
"lineCount": 1
}
}
],
"./pytest_robotframework/_internal/pytest/robot_file_support.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 5,
"endColumn": 19,
"lineCount": 1
}
}
],
"./tests/conftest.py": [
{
"code": "reportUnusedCallResult",
Expand All @@ -45,82 +17,6 @@
"lineCount": 6
}
}
],
"./tests/fixtures/test_python/test_keyword_decorator_context_manager_that_doesnt_suppress.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 1,
"endColumn": 15,
"lineCount": 1
}
}
],
"./tests/fixtures/test_python/test_keyword_decorator_context_manager_that_raises_in_body_and_exit.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 1,
"endColumn": 15,
"lineCount": 1
}
}
],
"./tests/fixtures/test_python/test_keyword_decorator_context_manager_that_raises_in_enter.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 1,
"endColumn": 15,
"lineCount": 1
}
}
],
"./tests/fixtures/test_python/test_keyword_decorator_context_manager_that_raises_in_exit.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 1,
"endColumn": 15,
"lineCount": 1
}
}
],
"./tests/fixtures/test_python/test_keyword_decorator_returns_context_manager_that_isnt_used.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 1,
"endColumn": 15,
"lineCount": 1
}
}
],
"./tests/type_tests.py": [
{
"code": "reportDeprecated",
"range": {
"startColumn": 5,
"endColumn": 19,
"lineCount": 1
}
},
{
"code": "reportDeprecated",
"range": {
"startColumn": 5,
"endColumn": 19,
"lineCount": 1
}
},
{
"code": "reportDeprecated",
"range": {
"startColumn": 5,
"endColumn": 19,
"lineCount": 1
}
}
]
}
}
77 changes: 0 additions & 77 deletions .baselines/pyrefly.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@
"concise_description": "Attribute `wrapped` cannot depend on type variable `T_WrappedContextManager`, which is not in the scope of class `WrappedContextManager`",
"severity": "error"
},
{
"column": 5,
"path": "pytest_robotframework/_internal/api.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 1,
"path": "pytest_robotframework/_internal/api.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 5,
"path": "pytest_robotframework/_internal/pytest/robot_file_support.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 9,
"path": "tests/conftest.py",
Expand All @@ -41,62 +20,6 @@
"name": "unused-call-result",
"concise_description": "Result of call expression is of type `Path` and is not used; assign to `_` if this is intentional",
"severity": "error"
},
{
"column": 1,
"path": "tests/fixtures/test_python/test_keyword_decorator_context_manager_that_doesnt_suppress.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 1,
"path": "tests/fixtures/test_python/test_keyword_decorator_context_manager_that_raises_in_body_and_exit.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 1,
"path": "tests/fixtures/test_python/test_keyword_decorator_context_manager_that_raises_in_enter.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 1,
"path": "tests/fixtures/test_python/test_keyword_decorator_context_manager_that_raises_in_exit.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 1,
"path": "tests/fixtures/test_python/test_keyword_decorator_returns_context_manager_that_isnt_used.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 5,
"path": "tests/type_tests.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 5,
"path": "tests/type_tests.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
},
{
"column": 5,
"path": "tests/type_tests.py",
"name": "deprecated",
"concise_description": "Call to deprecated overload `contextlib.contextmanager`",
"severity": "error"
}
]
}
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"type": "shell",
"command": "./pw",
"args": [
"robocop_format"
"robocop_format_fix"
],
"presentation": {
"clear": true
Expand All @@ -164,7 +164,7 @@
"type": "shell",
"command": "./pw",
"args": [
"dprint"
"dprint_fix"
],
"presentation": {
"clear": true
Expand Down
8 changes: 4 additions & 4 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
".baselines"
],
"plugins": [
"https://plugins.dprint.dev/json-0.23.0.wasm",
"https://plugins.dprint.dev/markdown-0.22.1.wasm",
"https://plugins.dprint.dev/toml-0.7.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.6.0.wasm"
"npm:@dprint/json@0.25.2",
"npm:@dprint/markdown@0.26.0",
"npm:@dprint/toml@0.9.0",
"npm:dprint-plugin-yaml@0.6.0"
]
}
39 changes: 31 additions & 8 deletions pw
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ import os
import subprocess
import sys
import sysconfig
import tempfile
import zipfile
from pathlib import Path
from urllib import request
from urllib.error import HTTPError, URLError

try:
from venv import EnvBuilder
except ImportError:
EnvBuilder = None


VERSION = "3.3.4"
UV_VERSION = "0.11.6"
VERSION = "4.0.0"
UV_VERSION = "0.12.5"

PYPROJECTX_INSTALL_DIR_ENV_VAR = "PYPROJECTX_INSTALL_DIR"
PYPROJECTX_PACKAGE_ENV_VAR = "PYPROJECTX_PACKAGE"
Expand Down Expand Up @@ -208,7 +210,7 @@ def ensure_pyprojectx(options): # noqa: C901, PLR0912
f'powershell -ExecutionPolicy Bypass -c "irm {release_base_url}/uv-installer.ps1 | iex"'
)
else:
install_uv_cmd = f"curl --proto '=https' --tlsv1.2 -LsSf irm {release_base_url}/uv-installer.sh | sh"
install_uv_cmd = f"curl --proto '=https' --tlsv1.2 -LsSf {release_base_url}/uv-installer.sh | sh"
subprocess.run(
install_uv_cmd,
stdout=out,
Expand Down Expand Up @@ -247,11 +249,32 @@ def ensure_pyprojectx(options): # noqa: C901, PLR0912

def download_wrappers():
latest = "https://github.com/pyprojectx/pyprojectx/releases/latest/download/wrappers.zip"
zip_file, _ = request.urlretrieve(latest) # noqa: S310
with zipfile.ZipFile(zip_file, "r") as zip_ref:
for entry in zip_ref.namelist():
if Path(__file__).with_name(entry).is_file():
zip_ref.extract(entry, Path(__file__).parent)
with tempfile.TemporaryDirectory() as tmp_dir:
zip_file = Path(tmp_dir, "wrappers.zip")
download(latest, zip_file)
with zipfile.ZipFile(zip_file, "r") as zip_ref:
for entry in zip_ref.namelist():
if Path(__file__).with_name(entry).is_file():
zip_ref.extract(entry, Path(__file__).parent)


def download(url, target):
"""Download url to target, falling back to curl/powershell if this interpreter has no usable CA bundle."""
try:
request.urlretrieve(url, target) # noqa: S310
except URLError as e:
if isinstance(e, HTTPError):
# the server answered, so the connection itself is fine; curl would only repeat the same status
raise
print(f"{RED}download with urllib failed ({e}), retrying with curl or powershell{RESET}", file=sys.stderr)
if sys.platform == "win32":
quoted_url = str(url).replace("'", "''")
quoted_target = str(target).replace("'", "''")
script = f"iwr '{quoted_url}' -OutFile '{quoted_target}'"
download_cmd = ["powershell", "-ExecutionPolicy", "Bypass", "-c", script]
else:
download_cmd = ["curl", "--proto", "=https", "--tlsv1.2", "-LsSf", str(url), "-o", str(target)]
subprocess.run(download_cmd, check=True)


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions pw.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[main]
requirements = ["uv==0.11.28"]
hash = "45210da832f9626829457a65e9e7c4d0"
requirements = ["uv==0.13.0"]
hash = "976b6b031038890783158e4585a6297b"
Loading
Loading