Skip to content

Commit bded8ec

Browse files
authored
Merge pull request #374 from BCG-X-Official/dev/3.0.0
BUILD: release pytools 3.0.0
2 parents df3f3cf + c0826e5 commit bded8ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+672
-757
lines changed

RELEASE_NOTES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ Python 3.11, and drops support for Python versions.
103103
*pytools* 2.1
104104
-------------
105105

106+
2.1.3
107+
~~~~~
108+
109+
- FIX: :class:`.DendrogramMatplotStyle` now calls :meth:`.Axis.set_ticklabels` using a
110+
positional argument for the labels, to address a change in *matplotlib* |nbsp| 3.7
111+
112+
106113
2.1.2
107114
~~~~~
108115

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ stages:
547547
eval "$(conda shell.bash hook)"
548548
conda install -y anaconda-client
549549
anaconda login --username "${CONDA_USERNAME}" --password "${CONDA_PASSWORD}"
550+
anaconda upload --user bcgx --force $(System.ArtifactsDirectory)/conda_default/conda/noarch/$(package_name)-*.tar.bz2
550551
anaconda upload --user BCG_Gamma --force $(System.ArtifactsDirectory)/conda_default/conda/noarch/$(package_name)-*.tar.bz2
551552
anaconda logout
552553
# set +x to prevent Azure from randomly appending a \' of the ## statement

make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def build(self, exposed_package_dependencies: Mapping[str, str]) -> None:
465465
)
466466

467467
os.makedirs(build_path, exist_ok=True)
468-
build_cmd = f"conda mambabuild -c conda-forge -c bcg_gamma {recipe_path}"
468+
build_cmd = f"conda mambabuild -c conda-forge {recipe_path}"
469469
log(
470470
f"Building: {self.project}\n"
471471
f"Build path: {build_path}\n"

src/pytools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
A collection of Python extensions and tools used in BCG GAMMA's open-source libraries.
33
"""
44

5-
__version__ = "3.0rc1"
5+
__version__ = "3.0.0"

src/pytools/api/_alltracker.py

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,9 @@
44

55
import logging
66
import re
7+
from collections.abc import Callable, Collection, Iterable
78
from types import FunctionType
8-
from typing import (
9-
Any,
10-
Callable,
11-
Collection,
12-
Dict,
13-
Iterable,
14-
List,
15-
Optional,
16-
Set,
17-
TypeVar,
18-
Union,
19-
get_type_hints,
20-
)
9+
from typing import Any, TypeVar, get_type_hints
2110

2211
from typing_inspect import get_args, is_forward_ref
2312

@@ -93,9 +82,9 @@ class AllTracker:
9382
# noinspection PyShadowingNames
9483
def __init__(
9584
self,
96-
globals_: Dict[str, Any],
85+
globals_: dict[str, Any],
9786
*,
98-
public_module: Optional[str] = None,
87+
public_module: str | None = None,
9988
update_forward_references: bool = True,
10089
allow_global_constants: bool = False,
10190
allow_imported_definitions: bool = False,
@@ -199,7 +188,7 @@ def validate(self) -> None:
199188
# objects without a __dict__ will not permit setting the public module
200189
pass
201190

202-
def get_tracked(self) -> List[str]:
191+
def get_tracked(self) -> list[str]:
203192
"""
204193
List the names of all locally tracked, public items.
205194
@@ -312,7 +301,7 @@ def public_module_prefix(module_name: str) -> str:
312301

313302

314303
def update_forward_references(
315-
obj: Union[type, FunctionType], *, globals_: Optional[Dict[str, Any]] = None
304+
obj: type | FunctionType, *, globals_: dict[str, Any] | None = None
316305
) -> None:
317306
"""
318307
Replace all forward references with their referenced classes.
@@ -328,10 +317,10 @@ def update_forward_references(
328317
return
329318

330319
# keep track of classes we already visited to prevent infinite recursion
331-
visited: Set[type] = set()
320+
visited: set[type] = set()
332321

333322
def _update(
334-
_obj: Union[type, FunctionType], local_ns: Optional[Dict[str, Any]] = None
323+
_obj: type | FunctionType, local_ns: dict[str, Any] | None = None
335324
) -> None:
336325
if isinstance(_obj, type) and _obj.__module__ == my_module:
337326
if _obj not in visited:
@@ -345,7 +334,7 @@ def _update(
345334
_update_annotations(_obj, local_ns)
346335

347336
def _update_annotations(
348-
_obj: Union[type, FunctionType], local_ns: Optional[Dict[str, Any]]
337+
_obj: type | FunctionType, local_ns: dict[str, Any] | None
349338
) -> None:
350339
# unwrap the object to get the underlying function, if applicable
351340
while isinstance(_obj, FunctionType):

0 commit comments

Comments
 (0)