Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Drop Support for 3.6
  • Loading branch information
smashedr committed Nov 30, 2025
commit ee11706db8dc759f2be8fe4d6ab951918300f5e3
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
contents: read

test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 5
needs: [build]
strategy:
fail-fast: false
matrix:
version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
name: "Test ${{ matrix.version }}"

permissions:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Python 3 wrapper for the Vultr API v2.0"
authors = [{ name="Shane" }]
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.6"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
Expand Down
4 changes: 1 addition & 3 deletions src/vultr/vultr.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ def get_instance(self, instance: Union[str, dict], params: Optional[dict] = None
url = f"{self.url}/instances/{instance_id}"
return self._get(url, params)["instance"]

def create_instance(
self, region: Union[str, dict], plan: Union[str, dict], **kwargs
):
def create_instance(self, region: Union[str, dict], plan: Union[str, dict], **kwargs):
data = {"region": self._get_obj_key(region), "plan": self._get_obj_key(plan)}
data.update(kwargs)
url = f"{self.url}/instances"
Expand Down
9 changes: 9 additions & 0 deletions tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@
def test_free():
per_page = 100
plans = vultr.get("plans", {"type": "vc2", "per_page": per_page})
print(f"plans: {len(plans['plans'])}")
assert len(plans["plans"]) == min(plans["meta"]["total"], per_page)

regions = vultr.list_regions({"per_page": per_page})
print(f"regions: {len(regions)}")
assert 0 < len(regions) <= per_page

available = vultr.filter_regions(regions, plans["plans"][0]["locations"])
print(f"available: {len(available)}")
assert 0 < len(available) <= per_page