Skip to content

Commit

Permalink
Release commit created with Cranko.
Browse files Browse the repository at this point in the history
+++ cranko-release-info-v1
[[projects]]
qnames = ["pwkit", "pypa"]
version = "1.2.2"
age = 0

+++
  • Loading branch information
cranko committed Oct 11, 2024
2 parents 5666e05 + 0d2201b commit 6ac2b57
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 25 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# pwkit 1.2.2 (2024-10-11)

- Correct fixup processing of args with non-None defaults in `pwkit.kwargv` (#24)
- Correct the docs link in the README! (#23)

The version DOI of this release is [10.5281/zenodo.13920308][vdoi].

[vdoi]: https://doi.org/10.5281/zenodo.13920308


# pwkit 1.2.1 (2024-09-13)

- Fix `pwkit.parallel.SerialHelper.get_map()` for Python 3 (#22)
Expand Down
13 changes: 8 additions & 5 deletions ci/azure-job-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,20 @@ steps:
- bash: |
set -euo pipefail
if [[ $AGENT_OS == Windows_NT ]] ; then
if [[ $AGENT_OS == Darwin ]] ; then
# As of macos-14, these no longer have Anaconda built in.
CONDA="$TMPDIR/conda"
curl -fsSL https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh >miniforge.sh
bash miniforge.sh -f -b -p "$CONDA"
rm -f miniforge.sh
condabin="$CONDA/bin"
elif [[ $AGENT_OS == Windows_NT ]] ; then
CONDA=$(echo "$CONDA" | sed -e 's|\\|\/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/\L\1\E/\2|')
condabin="$CONDA/Scripts"
else
condabin="$CONDA/bin"
fi
if [[ $AGENT_OS == Darwin ]] ; then
sudo chown -R $USER $CONDA
fi
cat >activate-conda.sh <<EOF
eval "\$($condabin/conda shell.bash hook)"
conda activate
Expand Down
12 changes: 6 additions & 6 deletions ci/zenodo.json5
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
],
"language": "eng",
"license": "MIT",
"publication_date": "2024-09-13",
"title": "pwkit 1.2.1",
"publication_date": "2024-10-11",
"title": "pwkit 1.2.2",
"upload_type": "software",
"version": "1.2.1"
"version": "1.2.2"
},
"conceptdoi": "10.5281/zenodo.8052838",
"record_id": "13759572",
"doi": "10.5281/zenodo.13759572",
"bucket_link": "https://zenodo.org/api/files/40de735d-83fa-49e5-916f-48ed93a74ad9"
"record_id": "13920308",
"doi": "10.5281/zenodo.13920308",
"bucket_link": "https://zenodo.org/api/files/0d206d5e-7361-4515-a15f-c30195b93dbb"
}
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]

project = "pwkit"
release = "1.2.1" # cranko project-version
release = "1.2.2" # cranko project-version
version = ".".join(release.split(".")[:2])

copyright = "2015-2023, Peter K. G. Williams and collaborators"
Expand Down
2 changes: 1 addition & 1 deletion pwkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

__all__ = "Holder PKError binary_type reraise_context text_type unicode_to_str".split()

__version__ = "1.2.1" # cranko project-version
__version__ = "1.2.2" # cranko project-version

# Archaic Python 2/3 compatibility support

Expand Down
18 changes: 8 additions & 10 deletions pwkit/kwargv.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,14 @@ def __init__(self):
ki.default = None
elif ki.repeatable:
ki.default = []
elif ki.fixupfunc is not None and ki.default is not None:
# kinda gross structure here, oh well.
elif ki.fixupfunc is not None:
# Make sure to process the default through the fixup, if it
# exists. This helps code use "interesting" defaults with types
# that you might prefer to use when launching a task
# programmatically; e.g. a default output stream that is
# `sys.stdout`, not "-". Note, however, that the fixup will
# always get called for the default value, so it shouldn't do
# anything too expensive.
ki.default = ki.fixupfunc(ki.default)

kwinfos[kw] = ki
Expand Down Expand Up @@ -472,14 +478,6 @@ def parse(self, args=None):
'required keyword argument "%s" was not provided', kw
)

# If there's a fixup, process it even if the keyword wasn't
# provided. This lets code use "interesting" defaults with
# types that you might prefer to use when launching a task
# programmatically; e.g. a default output stream that is
# `sys.stdout`, not "-".
if ki.fixupfunc is not None:
self.set_one(ki._attrname, ki.fixupfunc(None))

return self # convenience

def parse_or_die(self, args=None):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ def get_long_desc():
For more information, including installation instructions, please visit [the
project homepage].
[the project homepage]: https://pkgw.readthedocs.io/
[the project homepage]: https://pwkit.readthedocs.io/
"""
)
return "".join(lines)


setup(
name="pwkit", # cranko project-name
version="1.2.1", # cranko project-version
version="1.2.2", # cranko project-version
# This package actually *is* zip-safe, but I've run into issues with
# installing it as a Zip: in particular, the install sometimes fails with
# "bad local file header", and reloading a module after a reinstall in
Expand Down

0 comments on commit 6ac2b57

Please sign in to comment.