-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog
891 lines (775 loc) · 33.5 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
Pint Changelog
==============
0.20 (unreleased)
-----------------
- Add the ``separate_format_defaults`` registry setting (Issue #1501, PR #1503)
0.19.1 (2022-04-06)
-------------------
- Provide a method to iter the definitions in the order they appear,
recursing the imported files. (Issue #1498)
0.19 (2022-04-04)
-----------------
- Better separation between parsing and loading of definitions.
Implement a parsed "binary" version of "textual" definition files.
Infrastructure to disk cache parsed definition files and RegistryCache
resulting in a 10X speed up in registry instantiation when enabled.
(Issue #1465)
- Deprecate the old format defaulting behavior and prepare for the new one (Issue #1407)
- Fix a bug for offset units of higher dimension, e.g. gauge pressure.
(Issue #1066, thanks dalito)
- Fix type hints of function wrapper (Issue #1431)
- Upgrade min version of uncertainties to 3.1.4
- Add a example for `register_unit_format` to the formatting docs (Issue #1422).
- Fix setting options of the application registry (Issue #1403).
- Fix Quantity & Unit `is_compatible_with` with registry active contexts (Issue #1424).
- Allow Quantity to parse 'NaN' and 'inf(inity)', case insensitive
- Fix casting error when using to_reduced_units with array of int.
(Issue #1184)
- Use default numpy `np.printoptions` available since numpy 1.15.
- Implement `numpy.nanprod` (Issue #1369)
- Fix default_format ignored for measurement (Issue #1456)
- Add `pint.testing` with functions to compare pint objects in tests (Issue #1421).
- Fix handling modulo & floordiv operator in pint_eval (Issue #1470)
- Fix `to_compact` and `infer_base_unit` for non-float non_int_type.
- Fix `to_reduced_units` to work with dimensionless units. (Issue #919)
- Fix parsing of units string with same canonalized name (Issue #1441 & #1142)
- The pint-pandas example notebook has been moved to the pint-pandas package.
### New Units
- `sverdrup` (PR #1404)
- `cooling_tower_ton` (PR #1484)
### Breaking Changes
- Update hour default symbol to `h`. (Issue #719)
- Replace `h` with `ℎ` (U+210E) as default symbol for planck constant.
- Change minimal Python version support to 3.8+
- Change minimal Numpy version support to 1.19+
0.18 (2021-10-26)
-----------------
### Release Manager: jules-cheron
- Implement use of Quantity in the Quantity constructor (convert to specified units).
(Issue #1231)
- Rename .readthedocs.yml to .readthedocs.yaml, update MANIFEST.in (Issue #1311)
- Fix a few small typos.
(Issue #1308)
- Fix babel format for `Unit`.
(Issue #1085)
- Fix handling of positional max/min arguments in clip function.
(Issue #1244)
- Fix string formatting of numpy array scalars.
- Fix default format for Measurement class (Issue #1300)
- Fix parsing of pretty units with same exponents but different sign. (Issue #1360)
- Convert the application registry to a wrapper object (Issue #1365)
- Add documentation for the string format options.
(Issue #1357, #1375, thanks keewis)
- Support custom units formats.
(Issue #1371, thanks keewis)
- Autoupdate pre-commit hooks.
- Improved the application registry.
(Issue #1366, thanks keewis)
- Improved testing isolation using pytest fixtures.
### Breaking Changes
- pint no longer supports Python 3.6
- Minimum Numpy version supported is 1.17+
- Add supports for type hints for Quantity class. Quantity is now a Generic (PEP560).
- Add support for [PEP561](https://www.python.org/dev/peps/pep-0561/) (Package Type information)
0.17 (2021-03-22)
-----------------
- Add the Wh unit for battery capacity measurements
(PR #1260, thanks Maciej Grela)
- Fix issue with reducable dimensionless units when using power (Quantity**ndarray)
(Issue #1185)
- Fix comparisons between Quantities and Measurements.
(Issue #1134, thanks lewisamarshall)
- UnitsContainer returns false if other is str and cannnot be parsed
(Issue #1179, thanks rfrowe)
- Fix numpy.linalg.solve unit output. (Issue #1246)
- Support numpy.lib.stride_tricks.sliding_window_view. (Issue #1255)
- NEP29 Support docs.
- Move all tests to pytest.
- Fix to __pow__ and __ipow__
- Migrate to Github Actions.
(Issue #1236)
- Update linter to use pre-commit.
- Quantity comparisons now ensure other is Quantity.
- Add sign function compatibility.
(thanks Robin Tesse)
- Fix scalar to ndarray tolist.
- Fix tolist function with scalar ndarray.
(Issue #1195, thanks jules-ch)
- Corrected typos and dacstrings
- Implements a first benchmark suite in airspeed velocity (asv).
- Power for pseudo-dimensionless units.
(Issue #1185, thanks Kevin Fuhr)
0.16.1 (2020-09-22)
-------------------
- Fix unpickling, now it is using the APP_REGISTRY as expected.
(Issue #1175)
0.16 (2020-09-13)
-----------------
- Fixed issue where performing an operation of a Quantity with certain units would perform an in-place
unit conversion that modified the operand in addition to the returned value (Issues #1102 & #1144)
- Implements Logarithmic Units like dBm, dB or decade
(Issue #71, Thanks Dima Pustakhod, Clark Willison, Giorgio Signorello, Steven Casagrande, Jonathan Wheeler)
- Drop dependency on setuptools pkg_resources to read package resources, using std lib importlib.resources instead.
(Issue #1080)
0.15 (2020-08-22)
-----------------
- Change `Quantity` and `Unit` HTML (i.e., Jupyter notebook) repr away from LaTeX to a
simpler, more performant pretty-text and table based repr inspired by Sparse and Dask.
(Issue #654)
- Add `case_sensitive` option to registry for case (in)sensitive handling when parsing
units (Issue #1145)
- Implement Dask collection interface to support Pint Quantity wrapped Dask arrays.
- Started automatically testing examples in the documentation
- Fixed an exception generated when reducing dimensions with three or more
units of the same type
- Fixed right operand power for dimensionless Quantity to reflect numpy behavior. (Issue #1136)
- Eliminated warning when setting a masked value on an underlying MaskedArray.
- Add `sort` option to `formatting.formatter` to permit disabling sorting of component units in format string
- Implements Logarithmic Units like dBm, dB or decade
(Issue #71, Thanks Dima Pustakhod, Giorgio Signorello, Jonathan Wheeler)
0.14 (2020-07-01)
-----------------
- Changes required to support Pint-Pandas 0.1.
0.13 (2020-06-17)
-----------------
- 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 (2020-05-29)
-----------------
- 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 (2020-02-19)
-----------------
- 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 (2020-01-07)
-------------------
- 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 (2020-01-05)
-----------------
- **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)
0.9 (2019-01-12)
----------------
- Add support for registering with matplotlib's unit handling
(Issue #317, thanks dopplershift)
- Add converters for matplotlib's unit support.
(Issue #317, thanks Ryan May)
- Fix unwanted side effects in auto dimensionality reduction.
(Issue #516, thanks Ben Loer)
- Allow dimensionality check for non Quantity arguments.
- Make Quantity and UnitContainer objects hashable.
(Issue #286, thanks Nevada Sanchez)
- Fix unit tests errors with numpy >=1.13.
(Issue #577, thanks cpascual)
- Avoid error in in-place exponentiation with numpy > 1.11.
(Issue #577, thanks cpascual)
- fix compatible units in context.
(thanks enrico)
- Added warning for unsupported ufunc.
(Issue #626, thanks kanhua)
- Improve IPython pretty printers.
(Issue #590, thanks tecki)
- Drop Support for Python 2.6, 3.0, 3.1 and 3.2.
(Issue #567)
- Prepare for deprecation announced in Python 3.7
(Issue #747, thanks Simon Willison)
- Added several new units and Systems
(Issues #749, #737, )
- Started experimental pandas support
(Issue #746 and others. Thanks andrewgsavage, znicholls and others)
- wraps and checks now supports kwargs and defaults.
(Issue #660, thanks jondoesntgit)
0.8.1 (2017-06-05)
------------------
- Add support for datetime math.
(Issue #510, thanks robertd)
- Fixed _repr_html_ in Python 2.7.
(Issue #512)
- Implemented BaseRegistry.auto_reduce_dimensions.
(Issue #500, thanks robertd)
- Fixed dimension compatibility bug introduced on Registry refactoring
(Issue #523, thanks dalito)
0.8 (2017-04-16)
----------------
- Refactored the Registry in multiple classes for better separation of concerns and clarity.
- Implemented support for defining multiple units per `define` call (one definition per line).
(Issue #462)
- In pow and ipow, allow array exponents (with len > 1) when base is dimensionless.
(Issue #483)
- Wraps now gets the canonical name of the unit when passed as string.
(Issue #468)
- NumPy exp and log keeps the type
(Issue #95)
- Implemented a function decorator to ensure that a context is active (with_context)
(Issue #465)
- Add warning when a System contains an unknown Group.
(Issue #472)
- Add conda-forge installation snippet.
(Issue #485, thanks stadelmanma)
- Properly support floor division and modulo.
(Issue #474, thanks tecki)
- Measurement Correlated variable fix.
(Issue #463, thanks tadhgmister)
- Implement degree sign handling.
(Issue #449, thanks iamthad)
- Change `UndefinedUnitError` to inherit from `AttributeError`
(Issue #480, thanks jhidding)
- Simplified travis for faster testing.
- Fixed order units in siunitx formatting.
(Issue #441)
- Changed Systems lister to return a list instead of frozenset.
(Issue #425, thanks GloriaVictis)
- Fixed issue with negative values in to_compact() method.
(Issue #443, thanks nowox)
- Improved defintions.
(Issues #448, thanks gdonval)
- Improved Parser to support capital "E" on scientific notation.
(Issue #390, thanks javenoneal)
- Make sure that prefixed units are defined on the registry when unpickling.
(Issue #405)
- Automatic unit names translation through babel.
(Issue #338, thanks alexbodn)
- Support pickling Unit objects.
(Issue #349)
- Add support for wavenumber/kayser in spectroscopy context.
(Issue #321, thanks gerritholl)
- Improved formatting.
(thanks endolith and others)
- Add support for inline comments in definitions file.
(Issue #366)
- Implement Unit.__deepcopy__.
(Issue #357, thanks noahl)
- Allow changing shape for Quantities with numpy arrays.
(Issue #344, thanks tecki)
0.7.2 (2016-03-02)
------------------
- Fixed backward incompatibility problem when parsing dimensionless units.
0.7.1 (2016-02-23)
------------------
- Use NIST as source for most of the unit information.
- Added message to assertQuantityEqual.
- Added detection of circular dependencies in definitions.
0.7 (2016-02-20)
----------------
- Added Systems and groups.
(Issue #215, #315)
- Implemented references for wraps decorator.
(Issue #195)
- Added check decorator to UnitRegistry.
(Issue #283, thanks kaidokert)
- Added compact conversion.
(See #224, thanks Ryan Dwyer)
- Added compact formating code.
(Issue #240)
- New Unit Class.
(thanks Matthieu Dartiailh)
- Refactor UnitRegistry.
(thanks Matthieu Dartiailh)
- Move definitions, errors, and converters into their own modules.
(thanks Matthieu Dartiailh)
- UnitsContainer is now immutable
(Issue #202, thanks Matthieu Dartiailh)
- New parser and evaluator.
(Issue #226, thanks Aaron Coleman)
- Added support for Unicode identifiers.
- Added m_as as way top retrieve the magnitude in different units.
(Issue #227)
- Added Short form for magnitude and units.
(Issue #234)
- Improved deepcopy.
(Issue #252, thanks Emilien Kofman)
- Improved testing infrastructure.
- Improved docs.
(thanks Ryan Dwyer, Martin Thoma, Andrea Zonca)
- Fixed short names on electron_volt and hartree.
- Fixed definitions of scruple and drachm.
(Issue #262, thanks takowl)
- Fixed troy ounce to 480 'grains'.
(thanks elifab)
- Added 'quad' as a unit of energy (= 10**15 Btu).
(thanks Ed Schofield)
- Added "hectare" as a supported unit of area and 'ha' as the symbol for hectare.
(thanks Ed Schofield)
- Added peak sun hour and Langley.
(thanks Ed Schofield)
- Added photometric units: lumen & lux.
(Issue #230, thanks janpipek)
- A fraction magnitude quantity is conserved
(Issue #323, thanks emilienkofman)
- Improved conversion performance by removing unnecessart try/except.
(Issue #251)
- Added to_tuple and from_tuple to facilitate serialization.
- Fixed support for NumPy 1.10 due to a change in the Default casting rule
(Issue #320)
- Infrastructure: Added doctesting.
- Infrastructure: Better way to specify exclude matrix in travis.
0.6 (2014-11-07)
----------------
- Fix operations with measurments and user defined units.
(Issue #204)
- Faster conversions through caching and other performance improvements.
(Issue #193, thanks MatthieuDartiailh)
- Better error messages on Quantity.__setitem__.
(Issue #191)
- Fixed abbreviation of fluid_ounce.
(Issue #187, thanks hsoft)
- Defined Angstrom symbol.
(Issue #181, thanks JonasOlson)
- Removed fetching version from git repo as it triggers XCode installation on OSX.
(Issue #178, thanks deanishe)
- Improved context documentation.
(Issue #176 and 179, thanks rsking84)
- Added Chemistry context.
(Issue #179, thanks rsking84)
- Fix help(UnitRegisty)
(Issue #168)
- Optimized "get_dimensionality" and "get_base_name".
(Issue #166 and #167, thanks jbmohler)
- Renamed ureg.parse_units parameter "to_delta" to "as_delta" to make clear.
that no conversion happens. Accordingly, the parameter/property
"default_to_delta" of UnitRegistry was renamed to "default_as_delta".
(Issue #158, thanks dalit)
- Fixed problem when adding two uncertainties.
(thanks dalito)
- Full support for Offset units (e.g. temperature)
(Issue #88, #143, #147 and #161, thanks dalito)
0.5.2 (2014-07-31)
------------------
- Changed travis config to use miniconda for faster testing.
- Added wheel configuration to setup.cfg.
- Ensure resource streams are closed after reading.
- Require setuptools.
(Issue #169)
- Implemented real, imag and T Quantity properties.
(Issue #171)
- Implemented __int__ and __long__ for Quantity
(Issue #170)
- Fixed SI prefix error on ureg.convert.
(Issue #156, thanks jdreaver)
- Fixed parsing of multiparemeter contexts.
(Issue #174)
0.5.1 (2014-06-03)
------------------
- Implemented a standard way to change the registry used in unpickling operations.
(Issue #148)
- Fix bug where conversion would fail due to caching.
(Issue #140, thanks jdreaver)
- Allow assigning Not a Number to a quantity array.
(Issue #127)
- Decoupled Quantity in place and not in place unit conversion methods.
- Return None in functions that modify quantities in place.
- Improved testing infrastructure to check for unwanted warnings.
- Added test function at the package level to run all tests.
0.5 (2014-05-07)
----------------
- Improved test suite helper functions.
- Print honors default format w/o format().
(Issue #132, thanks mankoff)
- Fixed sum() by treating number zero as a special case.
(Issue #122, thanks rec)
- Improved behaviour in ScaleConverter, OffsetConverter and Quantity.to.
(Issue #120)
- Reimplemented loading of default definitions to allow Pint in a cx_freeze or similar package.
(Issue #118, thanks jbmohler)
- Implemented parsing of pretty printed units.
(Issue #117, thanks jpgrayson)
- Fixed representation of dimensionless quantities.
(Issue #112, thanks rec)
- Raise error when invalid formatting code is given.
(Issue #111, thanks rec)
- Default registry to lazy load, raise error on redefinition
(Issue #108, thanks rec, aepsil0n)
- Added condensed format.
(Issue #107, thanks rec)
- Added UnitRegistry () operator to parse expression replacing [].
(Issue #106, thanks rec)
- Optional case insensitive unit parsing.
(Issue #105, thanks rec, jeremyfreeman, dbrnz)
- Change the Quantity mutability depending on magnitude type.
(Issue #104, thanks rec)
- Implemented API to list compatible units.
(Issue #89)
- Implemented cache of key UnitRegistry methods.
- Rewrote the Measurement class to use uncertainties.
(Issue #24)
0.4.2 (2014-02-14)
------------------
- Python 2.6 support
(Issue #96, thanks tiagocoutinho)
- Fixed symbol for inch.
(Issue #102, thanks cybertoast)
- Stop raising AttributeError when wrapping funcs without all of the attributes.
(Issue #100, thanks jturner314)
- Fixed warning appearing in Py2.x when comparing a Numpy Array with an empty string.
(Issue #98, thanks jturner314)
- Add links to AUR packages in docs.
(Issue #91, thanks jturner314)
- Fixed garbage collection related problem.
(Issue #92, thanks jturner314)
0.4.1 (2014-01-12)
------------------
- Integer Division with Arrays.
(Issue #80, thanks jdreaver)
- Improved Documentation.
(Issue #83, thanks choloepus)
- Removed 'h' alias for hour due to conflict with Planck's constant.
(Issue #82, thanks choloepus)
- Improved get_base_units for non-multiplicative units.
(Issue #85, thanks exxus)
- Refactored code for multiplication.
(Issue #84, thanks jturner314)
- Removed 'R' alias for roentgen as it collides with molar_gas_constant.
(Issue #87, thanks rsking84)
- Improved naming of temperature units and multiplication of non-multiplicative units.
(Issue #86, tahsnk exxus)
0.4 (2013-12-17)
----------------
- Introduced Contexts: relation between incompatible dimensions.
(Issue #65)
- Fixed get_base_units for non multiplicative units.
(Related to issue #66)
- Implemented default formatting for quantities.
- Changed comparison between Quantities containing NumPy arrays.
(Issue #75) - BACKWARDS INCOMPATIBLE CHANGE
- Fixes for NumPy 1.8 due to changes in handling binary ops.
(Issue #73)
0.3.3 (2013-11-29)
------------------
- ParseHelper can now parse units named like python keywords.
(Issue #69)
- Fix comparison of quantities.
(Issue #74)
- Fix Inequality operator.
(Issue #70, thanks muggenhor)
- Improved travis configuration.
(thanks muggenhor)
0.3.2 (2013-10-22)
------------------
- Fix get_dimensionality for non multiplicative units.
(Issue #66)
- Proper handling of @import directive inside a file read using pkg_resources.
(Issue #68)
0.3.1 (2013-09-15)
------------------
- fix right division on python 2.7
(Issue #58, thanks natezb)
- fix formatting of fractional exponentials between 0 and 1.
(Issue #62, thanks jdreaver)
- fix installation as egg.
(Issue #61)
- fix handling of strange values as input of Quantity.
(Issue #53)
- math operations between quantities of different registries now raise a ValueError.
(Issue #52)
0.3 (2013-09-02)
----------------
- support for IPython autocomplete and rich display.
(Issues #30 and #31)
- support for @import directive in definitions file.
(Issue #22)
- support for wrapping functions to make them pint-aware.
(Issue #16)
- support for comparing UnitsContainer to string.
(Issue #35)
- fix error raised while converting from a single unit to one expressed as
the relation between many.
(Issue #29)
- fix error raised when unit symbol is missing.
(Issue #41)
- fix error raised when magnitude is Decimal.
(Issue #46, thanks danielsokolowski)
- support for non-installed pint.
(Issue #42, thanks danielsokolowski)
- support for application of numpy function on non-ndarray magnitudes.
(Issue #44)
- support for math operations on dimensionless Quantities (written with units).
(Issue #45)
- fix obtaining dimensionless quantity from string.
(Issue #50)
- fix adding and comparing numbers to a dimensionless quantity (written with units).
(Issue #54)
- Support for iter in Quantity.
(Issue #55, thanks natezb)
0.2.1 (2013-07-02)
------------------
- fix error raised while converting from a single unit to one expressed as
the relation between many.
(Issue #29)
0.2 (2013-05-13)
----------------
- support for Measurement (Quantity +/- error).
- implemented buckingham pi theorem for dimensional analysis.
- support for temperature units and temperature difference units.
- parser can infers if the user mean temperature or temperature difference.
- support for derived dimensions (e.g. [speed] = [length] / [time]).
- refactored the code into multiple files.
- refactored code to isolate definitions and converters.
- refactored formatter out of UnitParser class.
- added tox and travis config files for CI.
- comprehensive NumPy testing including almost all ufuncs.
- full NumPy support (features is not longer experimental).
- fixed bug preventing from having independent registries.
(Issue #10, thanks bwanders)
- forces real division as default for Quantities.
(Issue #7, thanks dbrnz)
- improved default unit definition file.
(Issue #13, thanks r-barnes)
- smarter parser supporting spaces as multiplications and other nice features.
(Issue #13, thanks r-barnes)
- moved testsuite inside package.
- short forms of binary prefixes, more units and fix to less than comparison.
(Issue #20, thanks muggenhor)
- pint is now zip-safe
(Issue #23, thanks muggenhor)
Version 0.1.3 (2013-01-07)
--------------------------
- abbreviated quantity string formating.
- complete Python 2.7 compatibility.
- implemented pickle support for Quantities objects.
- extended NumPy support.
- various bugfixes.
Version 0.1.2 (2012-08-12)
--------------------------
- experimenal NumPy support.
- included default unit definitions file.
(Issue #1, thanks fish2000)
- better testing.
- various bugfixes.
- fixed some units definitions.
(Issue #4, thanks craigholm)
Version 0.1.1 (2012-07-31)
--------------------------
- better packaging and installation.
Version 0.1 (2012-07-26)
--------------------------
- first public release.