Pinty

Latest version: v0.19.1

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

0.14

-----------------

- Changes required to support Pint-Pandas 0.1.

0.13

-----------------
- Reinstated support for pickle protocol 0 and 1, which is required by pytables
(Issue 1036, Thanks Guido Imperiale)
- Fixed bug with multiplication of Quantity by dict (Issue 1032)
- Bare zeros and NaNs (not wrapped by Quantity) are now gracefully accepted by all numpy
operations; e.g. np.stack([Quantity([1, 2], "m"), [0, np.nan]) is now valid, whereas
np.stack([Quantity([1, 2], "m"), [3, 4]) will continue raising DimensionalityError.
(Issue 1050, Thanks Guido Imperiale)
- NaN is now treated the same as zero in addition, subtraction, equality, and
disequality (Issue 1051, Thanks Guido Imperiale)
- Fixed issue where quantities with a very large magnitude would throw an IndexError
when using to_compact()
- Fixed crash when a Unit with prefix is declared for the first time while a Context
containing unit redefinitions is active
(Issues 1062 and 1097, Thanks Guido Imperiale)
- New implementation of 'Lx' String Format Type Option
The old implementation treated 'Lx' as 'S' as produced by 'uncertainties'
package, but that is not fully compatible with SIunitx. The new code protects
SIunitx by fixing what unceratinties produces.
(Issue 814)
- Added link to budding `pint-xarray` interface library to the docs, next to
the link to pint-pandas. (Thanks Tom Nicholas.)
- Removed outdated `_dir` attribute of `UnitsRegistry`, and added `__iter__`
method so that now `list(ureg)` returns a list of all units in registry.
(Issue 1072, Thanks Tom Nicholas)
- Replace pkg_resources.version to importlib.metadata.version. (Issue 1083)
- Fix typo in docs for wraps example with optional arguments. (Issue 1088)
- Add momentum as a dimension
- Fixed a bug where unit exponents were only partially superscripted in HTML format
- Multiple contexts containing the same redefinition can now be stacked
(Issue 1108, Thanks Guido Imperiale)
- Fixed crash when some specific combinations of contexts were enabled
(Issue 1112, Thanks Guido Imperiale)
- Added support for checking prefixed units using `in` keyword (Issue 1086)
- Updated many examples in the documentation to reflect Pint's current behavior

0.12

-----------------

- Add full support for Decimal and Fraction at the registry level.
**BREAKING CHANGE**:
`use_decimal` is deprecated. Use `non_int_type=Decimal` when instantiating
the registry.
- Fixed bug where numpy.pad didn't work without specifying constant_values or
end_values (Issue 1026)

0.11

-----------------

- Added pint-convert script.
- Remove `default_en_0.6.txt`.
- Make `__str__` and `__format__` locale configurable.
(Issue 984)
- Quantities wrapping NumPy arrays will no longer warning for the changed
array function behavior introduced in 0.10.
(Issue 1029, Thanks Jon Thielen)
- **BREAKING CHANGE**:
The array protocol fallback deprecated in version 0.10 has been removed.
(Issue 1029, Thanks Jon Thielen)
- Now we use `pyproject.toml` for providing `setuptools_scm` settings
- Remove `default_en_0.6.txt`
- Reorganize long_description.
- Moved Pi to definitions files.
- Use ints (not floats) a defaults at many points in the codebase as in Python 3
the true division is the default one.
- **BREAKING CHANGE**:
Added `from_string` method to all Definitions subclasses. The value/converter
argument of the constructor no longer accepts an string.
It is unlikely that this change affects the end user.
- Added additional NumPy function implementations (allclose, intersect1d)
(Issue 979, Thanks Jon Thielen)
- Allow constants in units by using a leading underscore (Issue 989, Thanks
Juan Nunez-Iglesias)
- Fixed bug where to_compact handled prefix units incorrectly (Issue 960)

0.10.1

-------------------

- Fixed bug introduced in 0.10 that prevented creation of size-zero Quantities
from NumPy arrays by multiplication.
(Issue 977, Thanks Jon Thielen)
- Fixed several Sphinx issues. Fixed intersphinx hooks to all classes missing.
(Issue 881, Thanks Guido Imperiale)
- Fixed __array__ signature to match numpy docs (Issue 974, Thanks Ryan May)

0.10

-----------------

- **BREAKING CHANGE**:
Boolean value of Quantities with offsets units is ambiguous, and so, now a ValueError
is raised when attempting to cast such a Quantity to boolean.
(Issue 965, Thanks Jon Thielen)
- **BREAKING CHANGE**:
`__array_ufunc__` has been implemented on `pint.Unit` to permit
multiplication/division by units on the right of ufunc-reliant array types (like
Sparse) with proper respect for the type casting hierarchy. However, until [an
upstream issue with NumPy is resolved](https://github.com/numpy/numpy/issues/15200),
this breaks creation of Masked Array Quantities by multiplication on the right.
Read Pint's [NumPy support
documentation](https://pint.readthedocs.io/en/latest/numpy.html) for more details.
(Issues 963 and 966, Thanks Jon Thielen)
- Documentation on Pint's array type compatibility has been added to the NumPy support
page, including a graph of the duck array type casting hierarchy as understood by Pint
for N-dimensional arrays.
(Issue 963, Thanks Jon Thielen, Stephan Hoyer, and Guido Imperiale)
- Improved compatibility for downcast duck array types like Sparse.COO. A collection
of basic tests has been added.
(Issue 963, Thanks Jon Thielen)
- Improvements to wraps and check:

- fail upon decoration (not execution) by checking wrapped function signature against
wraps/check arguments.
(might BREAK test code)
- wraps only accepts strings and Units (not quantities) to avoid confusion with magnitude.
(might BREAK code not conforming to documentation)
- when strict=True, strings that can be parsed to quantities are accepted as arguments.

- Add revolutions per second (rps)
- Improved compatibility for upcast types like xarray's DataArray or Dataset, to which
Pint Quantities now fully defer for arithmetic and NumPy operations. A collection of
basic tests for proper deferral has been added (for full integration tests, see
xarray's test suite). The list of upcast types is available at
`pint.compat.upcast_types` in the API.
(Issue 959, Thanks Jon Thielen)
- Moved docstrings to Numpy Docs
(Issue 958)
- Added tests for immutability of the magnitude's type under common operations
(Issue 957, Thanks Jon Thielen)
- Switched test configuration to pytest and added tests of Pint's matplotlib support.
(Issue 954, Thanks Jon Thielen)
- Deprecate array protocol fallback except where explicitly defined (`__array__`,
`__array_priority__`, `__array_function__`, `__array_ufunc__`). The fallback will
remain until the next minor version, or if the environment variable
`PINT_ARRAY_PROTOCOL_FALLBACK` is set to 0.
(Issue 953, Thanks Jon Thielen)
- Removed eval usage when creating UnitDefinition and PrefixDefinition from string.
(Issue 942)
- Added `fmt_locale` argument to registry.
(Issue 904)
- Better error message when Babel is not installed.
(Issue 899)
- It is now possible to redefine units within a context, and use pint for currency
conversions. Read

- https://pint.readthedocs.io/en/latest/contexts.html
- https://pint.readthedocs.io/en/latest/currencies.html

(Issue 938, Thanks Guido Imperiale)
- NaN (any capitalization) in a definitions file is now treated as a number
(Issue 938, Thanks Guido Imperiale)
- Added slinch to Avoirdupois group
(Issue 936, Thanks awcox21)
- Fix bug where ureg.disable_contexts() would fail to fully disable throwaway contexts
(Issue 932, Thanks Guido Imperiale)
- Use black, flake8, and isort on the project
(Issues 929, 931, and 937, Thanks Guido Imperiale)
- Auto-increase package version at every commit when pint is installed from the git tip,
e.g. pip install git+https://github.com/hgrecco/pint.git.
(Issues 930 and 934, Thanks Guido Imperiale and KOLANICH)
- Fix HTML (Jupyter Notebook) and LateX representation of some units
(Issues 927 / 928 / 933, Thanks Guido Imperiale)
- Fixed the definition of RKM unit as gf / tex
(Issue 921, Thanks Giuseppe Corbelli)
- **BREAKING CHANGE**:
Implement NEP-18 <https://numpy.org/neps/nep-0018-array-function-protocol.html> for
Pint Quantities. Most NumPy functions that previously stripped units when applied to
Pint Quantities will now return Quantities with proper units (on NumPy v1.16 with
the array_function protocol enabled or v1.17+ by default) instead of ndarrays. Any
non-explictly-handled functions will now raise a "no implementation found" TypeError
instead of stripping units. The previous behavior is maintained for NumPy < v1.16 and
when the array_function protocol is disabled.
(Issue 905, Thanks Jon Thielen and andrewgsavage)
- Implementation of NumPy ufuncs has been refactored to share common utilities with
NumPy function implementations
(Issue 905, Thanks Jon Thielen)
- Pint Quantities now support the `` matrix mulitiplication operator (on NumPy v1.16+),
as well as the `dot`, `flatten`, `astype`, and `item` methods.
(Issue 905, Thanks Jon Thielen)
- **BREAKING CHANGE**:
Fix crash when applying pprint to large sets of Units.
DefinitionSyntaxError is now a subclass of SyntaxError (was ValueError).
DimensionalityError and OffsetUnitCalculusError are now subclasses of TypeError (was
ValueError).
(Issue 915, Thanks Guido Imperiale)
- All Exceptions can now be pickled and can be accessed from the top-level package.
(Issue 915, Thanks Guido Imperiale)
- Mark regex as raw strings to avoid unnecessary warnings.
(Issue 913, Thanks keewis)
- Implement registry-based string preprocessing as list of callables.
(Issues 429 and 851, thanks Jon Thielen)
- Context activation and deactivation is now instantaneous; drastically reduced memory
footprint of a context (it used to be ~1.6MB per context; now it's a few bytes)
(Issues 909 / 923 / 938, Thanks Guido Imperiale)
- **BREAKING CHANGE**:
Drop support for Python < 3.6, numpy < 1.14, and uncertainties < 3.0;
if you still need them, please install pint 0.9.
Pint now adheres to NEP-29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>
as a rolling dependencies version policy.
(Issues 908 and 910, Thanks Guido Imperiale)
- Show proper code location of UnitStrippedWarning exception.
(Issue 907, thanks Martin K. Scherer)
- Reimplement _Quantity.__iter__ to return an iterator.
(Issues 751 and 760, Thanks Jon Thielen)
- Add http://www.dimensionalanalysis.org/ to README
(Thanks Shiri Avni)
- Allow for user defined units formatting.
(Issue 873, Thanks Ryan Clary)
- Quantity, Unit, and Measurement are now accessible as top-level classes
(pint.Quantity, pint.Unit, pint.Measurement) and can be
instantiated without explicitly creating a UnitRegistry
(Issue 880, Thanks Guido Imperiale)
- Contexts don't need to have a name anymore
(Issue 870, Thanks Guido Imperiale)
- "Board feet" unit added top default registry
(Issue 869, Thanks Guido Imperiale)
- New syntax to add aliases to already existing definitions
(Issue 868, Thanks Guido Imperiale)
- copy.deepcopy() can now copy a UnitRegistry
(Issues 864 and 877, Thanks Guido Imperiale)
- Enabled many tests in test_issues when numpy is not available
(Issue 863, Thanks Guido Imperiale)
- Document the '_' symbols found in the definitions files
(Issue 862, Thanks Guido Imperiale)
- Improve OffsetUnitCalculusError message.
(Issue 839, Thanks Christoph Buchner)
- Atomic units for intensity and electric field.
(Issue 834, Thanks Øyvind Sigmundson Schøyen)
- Allow np arrays of scalar quantities to be plotted.
(Issue 825, Thanks andrewgsavage)
- Updated gravitational constant to CODATA 2018.
(Issue 816, Thanks Jellby)
- Update to new SI definition and CODATA 2018.
(Issue 811, Thanks Jellby)
- Allow units with aliases but no symbol.
(Issue 808, Thanks Jellby)
- Fix definition of dimensionless units and constants.
(Issue 805, Thanks Jellby)
- Added RKM unit (used in textile industry).
(Issue 802, Thanks Giuseppe Corbelli)
- Remove __name__ method definition in BaseRegistry.
(Issue 787, Thanks Carlos Pascual)
- Added t_force, short_ton_force and long_ton_force.
(Issue 796, Thanks Jan Hein de Jong)
- Fixed error message of DefinitionSyntaxError
(Issue 791, Thanks Clément Pit-Claudel)
- Expanded the potential use of Decimal type to parsing.
(Issue 788, Thanks Francisco Couzo)
- Fixed gram name to allow translation by babel.
(Issue 776, Thanks Hervé Cauwelier)
- Default group should only have orphan units.
(Issue 766, Thanks Jules Chéron)
- Added custom constructors from_sequence and from_list.
(Issue 761, Thanks deniz195)
- Add quantity formatting with ndarray.
(Issue 559, Thanks Jules Chéron)
- Add pint-pandas notebook docs
(Issue 754, Thanks andrewgsavage)
- Use µ as default abbreviation for micro.
(Issue 666, Thanks Eric Prestat)

Page 2 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.