Skip to content

Commit 1bd5e22

Browse files
committed
**BETSE 1.2.0** released.
This minor release resolves a growing cacophony of compatibility issues that have accrued in the two-and-a-half years since BETSE's last prior stable release (i.e., BETSE 1.1.1 (Nicer Nestor) in the pre-pandemic twilight of November, 2019). BETSE authors gratefully thank Dr. Levin at the Levin Lab, Tufts University for his continued patronage of BETSE. Noteworthy changes include: ## Hosting Improved * **GitLab -> GitHub.** BETSE's `git` repository has been officially migrated from our prior host at GitLab to our new host at GitHub, mostly so as to centralize the maintenance burden of continuous integration (CI) workflows across this and the upstream @beartype project. Specifically: * Our prior GitLab-specific GitLab-CI and Windows-specific Appveyor CI configurations have been supplanted wholesale with our standard GitHub-specific GitHub Actions CI workflows for both package testing and publication. * Our front-facing `README.rst` documentation has been trivially revised to reference GitHub rather than GitLab. * Our prior GitLab-specific `tox.ini` configuration and `doc/rst/RELEASE.rst documentation have been supplanted wholesale with actively maintained and more GitHub-friendly equivalents liberally harvested from our upstream @beartype project. ## Compatibility Improved * **Python >= 3.9.0.** BETSE now officially supports both the Python 3.9.x and 3.10.x series. * **macOS Aqua detection.** BETSE now detects the macOS-specific Aqua display server with significantly more robust logic. Previously, that detection unexpectedly raised exceptions under continuous integration (CI) workflows hosted by GitHub Actions. Now, that detection has been generalized to be resilient against edge cases – including: * The absence of the core macOS `/System/Library/Frameworks/Security.framework/Security` library. * The absence of the `OSError`-specific `strerror` instance variable on low-level exceptions raised during this detection. * **Windows environment variable detection.** BETSE now circumvents erroneous Windows-specific shell environments produced by the GitHub Actions Windows runner, which fails to define the critical `%LOCALAPPDATA%`, `%APPDATA%`, or `%HOME` shell environment variables. Specifically: * The `betse.util.app.meta.AppMetaABC.dot_dirname()` method now leverages the first of the following shell environment variables exported to the active Windows process via trivial iteration: `%LOCALAPPDATA%`, `%APPDATA%`, and our standard `get_home_dirname()` getter. Insanely, the GitHub Actions Windows runner fails to export the former two shell environment variables as well as the otherwise standard `%HOME%` shell environment variable, which doesn't leave BETSE with terribly many options in CI environments. * **Windows subdirectory detection.** BETSE now circumvents the erroneous Windows-specific implementation of the standard `os.path.commonpath()` function, which unsafely raises an exception rather than safely returning `False` when passed two pathnames residing on different Windows drives (e.g., `C:/`, `D:/`). Our `betse.util.path.dirs.is_subdir()` tester now catches and coerces that unsafe exception into a safe return value of `False`. ## Compatibility Broken * **Python < 3.8.0.** This release officially breaks backward compatibility by dropping support for the Python 3.5.x, 3.6.x, and 3.7.x series. The former two have officially hit their End-of-Life (EOL); the latter is a half-year away from doing so and no longer worth officially supporting. * **PIL (Pillow) < 7.0.0.** This release officially breaks backward compatibility by dropping support for PIL (Pillow) < 7.0.0. See below. ## Dependencies Bumped * **NumPy ≥ 1.22.0.** BETSE now requires NumPy ≥ 1.22.0, which dramatically modified the (admittedly private) install-time `numpy.distutils.__config__` API describing how NumPy was linked against various external third-party shared libraries (e.g., BLAS, LAPACK) at install-time. Our `betse.lib.numpy.numpys` submodule now accesses that private NumPy API *much* more carefully – with robust future-proofing against predicted breakage by future NumPy releases breaking that API yet again. * **PIL (Pillow) ≥ 7.0.0.** BETSE now requires PIL (Pillow) ≥ 7.0.0, which introduced the standard `pillow.__version__` attribute and deprecated the non-standard `pillow.PILLOW_VERSION` attribute. Doing so renders the codebase incompatible with PIL (Pillow) < 7.0.0. Relatedly, The `betse.util.py.module.pymodname.MODULE_NAME_TO_VERSION_ATTR_NAME` dictionary has removed the non-standard `PIL: 'PILLOW_VERSION'` entry. * **`pytest` ≥ 5.4.0,** which refactored the previously defined private `_pytest.capture.CaptureManager._getcapture()` method into the newly defined `private _pytest.capture._getmulticapture()` function, which the `betse.lib.setuptools.command.supcmdtest` submodule necessarily monkey-patches at test time to sanitize captured output for long-running tests. ## Features Improved. * **Runtime dependency validation.** BETSE now validates whether optional and mandatory dependencies satisfy requirements at application startup by manually validating dependency versions *before* deferring to increasingly unreliable `setuptools`-specific logic for doing so. Specifically: * The private `betse.lib.libs._iter_requirement_commands()` iterator has been generalized to accept items of the `REQUIREMENT_NAME_TO_COMMANDS` dictionary as codebase-agnostic tuples rather than codebase-specific `betse.metadata.RequirementCommand` instances. * In the `betse.lib.setuptools.setuptool` submodule: * The `die_unless_requirement(`) validator and `is_requirement()` tester have been generalized to manually validate dependency versions before deferring to `setuptools`-specific logic for doing so. * The `get_requirement_distribution_or_none()` getter docstring has been revised to note that that getter should *only* be called as a latch-ditch fallback. * **Traceback handling.** BETSE now drastically simplifies its handling of exception tracebacks. Previously, BETSE *only* printed tracebacks (i.e., call stack traces) for uncaught exceptions when explicitly passed either the `-v` or `--verbose` options at the command line. Clearly, this was bad. While admittedly non-human-readable and thus unsightly, tracebacks yield mission-critical insights into critical breakage. Tracebacks are often the only means that devs have of debugging issues in cloud-hosted continuous integration (CI) workflows providing *no* convenient filesystem (and hence logfile) access; likewise, tracebacks are the only means that end users have of forwarding tracebacks to devs for subsequent debugging. BETSE now *always* prints tracebacks to standard error (stderr) regardless of options passed at the command line *or* defined in a configuration file. ## Issues Resolved. * **Matplotlib stream plotting exception.** An exception previously raised by Matplotlib on animating streamplots has been resolved. * **NumPy auto-object array deprecations.** All currently non-fatal `numpy.VisibleDeprecationWarning` warnings resulting from NumPy's recent deprecation of **auto-object arrays** (i.e., the implicit creation of one-dimensional NumPy arrays of Python `list` objects when passed ragged `list` of `list` objects with *no* uniform length) have been resolved. Where possible, these arrays have been reverted to standard non-NumPy `list` of `list` objects; in all other cases, these arrays have been explicitly coerced into non-auto object arrays. * **Widespread deprecations.** A slew of other currently non-fatal deprecation warnings emitted by various third-party dependencies of BETSE have similarly been resolved. ## Installation Improved * **Install-time Python version enforced.** The minimum mandatory version of Python required by this project is now enforced at `setuptools`-based install time via the recently introduced `python_requires` `setup(`) key in our top-level `setup.py` installer. * **pypa/setuptools#2353 and pypa/pip#6264.** This release resolves recent catastrophic upstream breakage introduced by `setuptools` 50.0 and `pip` 22.2.0, the newest stable release of everyone's least favourite build tools. Sadly, doing so requires temporarily disabling project-wide support for the tooling-agnostic `pyproject.toml` file -- which `setuptools` and `pip` continually demonstrate that they are unwilling to sanely support. * **`setuptools` entry point.** The `betse` command installed by our top-level `setup.py` installer now correctly runs. Previously, our installer inadvertently produced a broken `betse` command by incorrectly monkey-patching the `setuptools` installation process. ## Tests Improved * **`pytest` warning resolved.** BETSE's test suite no longer issues a non-fatal warning under recent `pytest` versions. Specifically, our top-level `pytest.ini` configuration file now explicitly lists *all* custom `pytest` marks applied by our test suite. * **`pytest` warnings filters.** BETSE now defers to `pytest` warnings filters when detected as running under `pytest` at test-time, preventing BETSE's custom warnings filters from silently overwriting those predefined by `pytest`. Most test harnesses (including `pytest`) define sane default warnings filters as well as enabling users to externally configure warnings filters from project-wide configuration files. Ergo, the `pytest` harness knows better than we do. * **`tox` venv isolation validation.** BETSE's test suite now sports significantly improved `tox`-specific validation of whether this suite is safely isolated to a virtual environment (venv), avoiding spurious test failures with otherwise valid pipelines. Specifically: * The top-level `pytest`-specific `conftest.py` plugin has been generalized by: * Refactoring the existing private `_clean_imports()` function to: * Treat zipfiles on `sys.path` *not* isolated to the current `tox` venv as effectively isolated anyway, as zipfiles are effectively isolated from filesystem modification -- notably, `pip`- and `setuptools`-based package installation. * Reorder `sys.path` so as to shift import paths *not* isolated to the current `tox` venv to the end of this list, thus deprioritizing (but *not* removing) these paths. * Removed the obsolete private `_print_metadata()` function, most of which now resides in the `_clean_imports()` function. * **PyPy testing disabled.** BETSE's test suite has (hopefully temporarily) disabled all testing of PyPy. Sadly, scientific dependencies (including NumPy) are *not* sanely installable under macOS + PyPy. macOS ships with Accelerate, blatantly broken macOS-specific BLAS and LAPACK shared libraries that fundamentally break NumPy on installation. Since NumPy fails to ship macOS + PyPy wheels, NumPy installation under macOS + PyPy requires building NumPy from source against Accelerate, which then painfully fails. For now, disabling PyPy testing entirely is the only sensible choice. * **macOS test compatibility,** including: * The mostly incidental `test_dirs_get_mtime_newest()` unit test is now skipped under Apple macOS – due to what appear to be inconsistencies in the handling of nanosecond-resolution path timestamps under the macOS-specific HFS+ filesystem. (*Infallible infancy bellows the fancy libel!*)
1 parent 40abdf2 commit 1bd5e22

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

betse/metadata.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# --------------------( LICENSE )--------------------
2+
# --------------------( LICENSE )--------------------
33
# Copyright 2014-2022 by Alexis Pietak & Cecil Curry.
44
# See "LICENSE" for further details.
55

@@ -24,18 +24,18 @@
2424
would render these constants effectively useless for their principal use case.
2525
'''
2626

27-
# ....................{ IMPORTS }....................
28-
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27+
# ....................{ IMPORTS }....................
28+
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2929
# WARNING: To avoid race conditions during setuptools-based installation, this
3030
# module may import *ONLY* from modules guaranteed to exist at the start of
3131
# installation. This includes all standard Python and application modules but
3232
# *NOT* third-party dependencies, which if currently uninstalled will only be
3333
# installed at some later time in the installation.
34-
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
34+
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3535

3636
import sys
3737

38-
# ....................{ METADATA }....................
38+
# ....................{ METADATA }....................
3939
NAME = 'BETSE'
4040
'''
4141
Human-readable application name.
@@ -47,8 +47,8 @@
4747
Human-readable name of the license this application is licensed under.
4848
'''
4949

50-
# ....................{ PYTHON ~ version }....................
51-
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
50+
# ....................{ PYTHON ~ version }....................
51+
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5252
# WARNING: Changes to this section *MUST* be synchronized with:
5353
# * The corresponding section of the "betsee.guimetadata" submodule.
5454
# * Continuous integration test matrices, including:
@@ -60,7 +60,7 @@
6060
# On bumping the minimum required version of Python, consider also documenting
6161
# the justification for doing so in the "Python Version" section of this
6262
# submodule's docstring above.
63-
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
63+
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6464

6565
PYTHON_VERSION_MIN = '3.8.0'
6666
'''
@@ -151,8 +151,8 @@ def _convert_version_str_to_tuple(version_str: str) -> tuple:
151151
'is only Python {}. We feel deep sadness for you.'.format(
152152
NAME, PYTHON_VERSION_MIN, PYTHON_VERSION))
153153

154-
# ....................{ METADATA ~ version }....................
155-
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
154+
# ....................{ METADATA ~ version }....................
155+
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
156156
# WARNING: When modifying the current version of this application below,
157157
# consider adhering to the Semantic Versioning schema. Specifically, the
158158
# version should consist of three "."-delimited integers
@@ -178,7 +178,7 @@ def _convert_version_str_to_tuple(version_str: str) -> tuple:
178178
#
179179
# When in doubt, increment only the minor version and reset the patch version.
180180
# For further details, see http://semver.org.
181-
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
181+
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
182182

183183
VERSION = '1.2.0'
184184
'''
@@ -207,7 +207,7 @@ def _convert_version_str_to_tuple(version_str: str) -> tuple:
207207
Machine-readable application version as a tuple of integers.
208208
'''
209209

210-
# ....................{ METADATA ~ tag }....................
210+
# ....................{ METADATA ~ tag }....................
211211
GIT_TAG_COMPAT_OLDEST = 'v0.5.0'
212212
'''
213213
Git-specific tag of the oldest version of this application for which the
@@ -230,7 +230,7 @@ def _convert_version_str_to_tuple(version_str: str) -> tuple:
230230
compatibility with this older version.
231231
'''
232232

233-
# ....................{ METADATA ~ synopsis }....................
233+
# ....................{ METADATA ~ synopsis }....................
234234
# Note that a human-readable multiline description is exposed via the top-level
235235
# "setup.py" script. This description is inefficiently culled from the contents
236236
# of the top-level "README.rst" file and hence omitted here. (Doing so here
@@ -264,7 +264,7 @@ def _convert_version_str_to_tuple(version_str: str) -> tuple:
264264
the top-level :doc:`/README` file instead.
265265
'''
266266

267-
# ....................{ METADATA ~ authors }....................
267+
# ....................{ METADATA ~ authors }....................
268268
AUTHORS = 'Alexis Pietak, Cecil Curry, et al.'
269269
'''
270270
Human-readable list of all principal authors of this application as a
@@ -282,7 +282,7 @@ def _convert_version_str_to_tuple(version_str: str) -> tuple:
282282
responding to public correspondence).
283283
'''
284284

285-
# ....................{ METADATA ~ urls }....................
285+
# ....................{ METADATA ~ urls }....................
286286
URL_HOMEPAGE = 'https://github.com/betsee/betse'
287287
'''
288288
URL of this application's homepage.
@@ -312,7 +312,7 @@ def _convert_version_str_to_tuple(version_str: str) -> tuple:
312312
URL of this package's release list.
313313
'''
314314

315-
# ....................{ METADATA ~ python }....................
315+
# ....................{ METADATA ~ python }....................
316316
PACKAGE_NAME = NAME.lower()
317317
'''
318318
Fully-qualified name of the top-level Python package implementing this

doc/rst/RELEASE.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ BETSE is releasable to all supported platforms as follows:
186186

187187
.. code-block:: markdown
188188
189-
**betse 0.0.1** released.
189+
**BETSE 0.0.1** released.
190190
191191
This major release brings titillating support for **this**, **that**, and
192192
**PEP numbers compliance**.

0 commit comments

Comments
 (0)