Recent Releases of commonpy

commonpy - Release 1.13.0

Changes in this release: * HTTP code 422 is now more accurately returned as a ServiceFailure error instead of a NetworkFailure.

- Python
Published by mhucka about 3 years ago

commonpy - Release 1.12.4

Changes in this release: * Revise the retry algorithm in timed_request() again. * Make timed_request() print the response text in case of failures * Remove extra_requires from setup.py because it caused installation problems due to the syntax of the requirements file and I don't have patience for figuring out what setuptools needs this time.

- Python
Published by mhucka about 3 years ago

commonpy - Release 1.12.3

This release updates the version of the dateparser package in requirements.txt, to avoid a deprecation warning when using CommonPy's parsed_datetime(...) function.

- Python
Published by mhucka about 3 years ago

commonpy - Release 1.12.2

This release updates the versions of dependencies in requirements.txt.

- Python
Published by mhucka about 3 years ago

commonpy - Release 1.12.1

This version prevents certain exceptions from being buried and ignored, and improves the network failure retry algorithm.

- Python
Published by mhucka about 3 years ago

commonpy - Release 1.12.0

Additions in this release: * New function network in the network_utils module. It is a companion to net and takes the same arguments, but returns only one value (the response). If an error occurs, it raises the error as an exception. This makes it possible for callers to use network(...) in somewhat more Pythonic style than net(...), by wrapping the call to network(...) in try-except.

Changes in this release: * Removed slice from data_utils module because it shadows a Python built-in. * Fixed hostname in network_utils to be more general and not hardwire a test for http. * Fixed a bunch of flake8 warnings.

- Python
Published by mhucka about 3 years ago

commonpy - Release 1.11.0

Additions in this release: * New class CaseFoldSet, which is similar to CaseFoldDict but is (as its name implies) a set instead of a dict.

Changes in this release: * Fixed a bug in the class documentation in the README.md file. * Add missing dependency for twine in requirements-dev.txt * Use lazy imports in more places, for faster load times.

- Python
Published by mhucka over 3 years ago

commonpy - Release 1.10.0

Changes in this release:

  • data_utils.flattened now outputs [] as the value of dict or mapping keys whose original values are an empty sequence (e.g., when the value of a dict key is []). Previously, it would output None as the value, which was an unexpected transformation of the input.

Bug fixes in this release:

  • Fixed a bug in data_utils.flattened that caused it to ignore the separator argument in some cases.
  • Fixed a missing import of freezegun in requirements-dev.txt.
  • Pin the imported version of regex 2022.3.2, because more recent versions cause calls to dateparser to encounter an error ("regex.regexcore.error: bad escape \d at position 7").

- Python
Published by mhucka over 3 years ago

commonpy - Release 1.9.5

The main functional change in this release is that error objects returned by net(...) will have error message bodies returned by network services, where possible.

Internally, there has been some refactoring of the Makefile and addition of things like GitHub template files.

- Python
Published by mhucka almost 4 years ago

commonpy - Release 1.9.4

This release merely changes the version of httpx required by requirements.txt. No other changes.

- Python
Published by mhucka almost 4 years ago

commonpy - Release 1.9.3

This version adds a missing internal function definition in download(...).

- Python
Published by mhucka about 4 years ago

commonpy - Release 1.9.2

This version changes pluralized so that it outputs 0 items instead of 0 item if the number of its argument has length 0.

- Python
Published by mhucka about 4 years ago

commonpy - Release 1.9.1

This version adds more test cases and splits out the requirements for testing/development into a separate requirements file, requirements-dev.txt.

- Python
Published by mhucka about 4 years ago

commonpy - Release 1.9.0

Changes in this release: * New exception ArgumentError. * net(...) makes slightly finer distinctions between ServiceFailure and NetworkFailure when it comes to addresses it can't connect to, and also raises ArgumentError in some cases such as passing a data keyword argument to a network get. * on_localhost(...) logs slightly better debug messages. * There are more test cases. * CITATION.cff has been corrected and no longer describes the wrong repository.

- Python
Published by mhucka about 4 years ago

commonpy - Release 1.8.2

This version merely changes a version dependency in requirements.txt. No other changes.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.8.1

Changes in this release:

  • At some point between versions 0.18 and 0.21.1 (current version), the httpx package changed the keyword argument named allow_redirects to follow_redirects, and our network_utils module functions broke as a result. This release updates network_utils to account for the change.
  • The requirements.txt file now pins most dependencies to a specific version, to avoid situations where getting a newer version of a package might break existing code.
  • The copyright year has been updated in various files.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.8.0

This version introduces the data_structures module, and a new class, CaseFoldDict.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.7.3

Changes in this release:

  • Fixed a missing f-string in an exception message, plus guarded a few more exception message strings with antiformat.
  • Added CITATION.cff file.
  • Updated the Makefile.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.7.2

Improve flattened to handle lists of dict keys.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.7.1

This release adds a missing requirements.txt entry for the package deprecation.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.7.0

Changes in this release:

  • Beginning with this release, the function reset() is deprecated in favor of the function reset_interrupts().
  • The function wait() resets the interrupt state before it begins waiting.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.6.3

This release fixes some unexpected failures in flattened(...) when lists of dictionaries are used as values.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.6.2

This release expands flattened(...) to deal with iterators and generators.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.6.1

This release fixes a bug in version 1.6.0.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.6.0

This release adds the new function flattened(...)

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.5.0

This release adds the new function print_boxed(...).

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.4.0

Changes in this version: * In net(...), in case of a connection error, don't do exponential back-off and retry. Retry only once and then give up, because connection errors often mean the server is not available and long waits are unhelpful to callers. * Change net(...) to not test if a network is available if the given destination address is on the local host. This prevents incorrectly returning NetworkFailure when the current host is detached from the network and the failure is actually a ServiceFailure (for example, if nothing is listening on the destination port on the local host). * Add new function on_localhost(...), for testing whether a given network location indicates the local host.

Note: the previous release, 1.3.10, should not have added new functions in a patch release – API changes should result in changing the minor release number, not merely the patch number. The previous release number was a mistake; it should have been 1.4.0, but since it wasn't, this release is 1.4.0.

- Python
Published by mhucka over 4 years ago

commonpy - Release 1.3.10

This release adds new functions download(...) and download_file(...).

- Python
Published by mhucka almost 5 years ago

commonpy - Release 1.3.9

This release changes some of the Python package imports to delay them until the functions are actually needed, to (hopefully) reduce application startup times.

- Python
Published by mhucka almost 5 years ago

commonpy - Release 1.3.8

This release fixes two problems on Windows involving the interrupt handler configured by config_interrupt(...). First, the internal function used did not have a signature that was correct for win32api.SetConsoleCtrlHandler on Windows. Second, the proper usage is to return a value, not raise an exception.

- Python
Published by mhucka almost 5 years ago

commonpy - Release 1.3.7

This release makes relative(...) from file_utils more robust against a problem on Windows, in which Python's os.path.relpath generates an error when you try to use it on a network-mapped drive.

- Python
Published by mhucka almost 5 years ago

commonpy - Release 1.3.6

This version fixes a missing requirements.txt entry for pywin32 on Windows.

- Python
Published by mhucka almost 5 years ago

commonpy - Release 1.3.5

This release fixes a reference to a missing function called by relative(...) in the file_utils module.

- Python
Published by mhucka almost 5 years ago

commonpy - Release 1.3.4

This release fixes undefined exceptions in network_utils due to a missing import.

- Python
Published by mhucka about 5 years ago

commonpy - Release 1.3.3

  • Fix broken references to os.path functions.
  • Add a check for a common mistake in parameters to net(...).

- Python
Published by mhucka about 5 years ago

commonpy - Release 1.3.1

  • Remove reference to HTTPX exception RequestBodyUnavailable, which no longer seems to exist in current versions of the HTTPX package.
  • Remove use of exception UserCancelled in network_utils.py, because its definition no longer existed elsewhere and on review it seemed unecessary in the context where it was used.

- Python
Published by mhucka about 5 years ago

commonpy - Release 1.3.0

Changes in this release:

  • Fixed issue #2: httpx Timeout needs a default value.
  • Bump the required version of httpx to 0.16.
  • Changed name filter_by_extension(...) to filtered_by_extension(...) to follow the style of other functions that return values.
  • Made trivial changes to the Makefile

- Python
Published by mhucka over 5 years ago

commonpy - Release 1.2.0

This release adds a new function in module_utils called config_path(...).

- Python
Published by mhucka over 5 years ago

commonpy - Release 1.1.1

This version makes antiformat(...) more robust against values that are not strings, by applying str(...) to the incoming value.

- Python
Published by mhucka over 5 years ago

commonpy - Release 1.1.0

This version adds a start at a module of string utilities, and introduces antiformat(..): a function that will quote instances of { and } braces in a string so that the string can be passed safely to format.

- Python
Published by mhucka over 5 years ago

commonpy - Release 1.0.0

For this 1.0.0 release, there is somewhat more documentation available, some functions have been renamed and improved, and there is now an icon!

- Python
Published by mhucka over 5 years ago

commonpy - Release 0.0.7

Changes in this release:

  • Fix bug in filename_basename(...).
  • Improve plural(...) by using pluralize(...) from Boltons package.
  • Remove tests for removed module http_code.
  • Miscellaneous other minor fixes and tweaks.

- Python
Published by mhucka over 5 years ago

commonpy - Release 0.0.6

Changes in this release:

  • Add a new module, network_utils.
  • Start a collection of exceptions that may be returned by this package.
  • Add additional dependency requirements to requirements.txt.

- Python
Published by mhucka over 5 years ago

commonpy - Release 0.0.5

This release adds a new module, module_utils, and some additional functions to the file_utils module. It also removes some imports that were in the __init__.py file; callers are expected to import specific functions or modules using the Python idiom from commonpy.modulename import functionname.

- Python
Published by mhucka over 5 years ago

commonpy - Release 0.0.4

This release changes the order of the arguments to the function config_interrupt in the interrupt module to be in a more convenient order for most use cases.

- Python
Published by mhucka over 5 years ago

commonpy - Release 0.0.3

This release adds the module interrupt. This module includes wait(...), a replacement for sleep(...) that is interruptible and works with multiple threads. It also provides methods to cause an interruption (including doing it by issuing a ^C to the program), check whether an interruption occurred, and other related operations.

- Python
Published by mhucka over 5 years ago

commonpy - Release 0.0.2

Fixed some issues with the README.md file and started adding some documentation about the functions.

- Python
Published by mhucka over 5 years ago

commonpy - Release 0.0.1

First release of various utilities developed for other Caltech Library projects over the last couple of years.

- Python
Published by mhucka over 5 years ago