<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pint.git/pint/context.py, branch develop</title>
<subtitle>github.com: hgrecco/pint.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/'/>
<entry>
<title>Add pint typing module</title>
<updated>2021-08-01T18:22:11+00:00</updated>
<author>
<name>Jules Chéron</name>
<email>jules.cheron@gmail.com</email>
</author>
<published>2021-05-22T21:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=c60e1af833391a60a82f3c47460fca899e220de5'/>
<id>c60e1af833391a60a82f3c47460fca899e220de5</id>
<content type='text'>
- Quantity as Generic class
- Add overloaded signature for __new__ Quantity
- Add typing module as private
- Add py.typed for PEP561 supports
- Add overloaded signature for __new__ Quantity
- Quantity as Generic class
- Add type hints throughout the project
- Add py.typed in package data in setup.cfg
- Add type hints for decorators
- Add type hints for public API of registry.py
- Add type hints for units.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Quantity as Generic class
- Add overloaded signature for __new__ Quantity
- Add typing module as private
- Add py.typed for PEP561 supports
- Add overloaded signature for __new__ Quantity
- Quantity as Generic class
- Add type hints throughout the project
- Add py.typed in package data in setup.cfg
- Add type hints for decorators
- Add type hints for public API of registry.py
- Add type hints for units.py
</pre>
</div>
</content>
</entry>
<entry>
<title>Run linter on all files</title>
<updated>2021-01-07T05:25:28+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2021-01-07T05:25:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=a750205ae10c5c2c0247668279330f10659ed02b'/>
<id>a750205ae10c5c2c0247668279330f10659ed02b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>update transform call signature in docstring example</title>
<updated>2020-06-17T08:28:12+00:00</updated>
<author>
<name>Clark Willison</name>
<email>clarkgwillison@gmail.com</email>
</author>
<published>2020-06-17T05:44:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=3316441a443b0a24a1a4da13f01a3aabdf3dd8ee'/>
<id>3316441a443b0a24a1a4da13f01a3aabdf3dd8ee</id>
<content type='text'>
now the example runs correctly under doctests
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
now the example runs correctly under doctests
</pre>
</div>
</content>
</entry>
<entry>
<title>Stacked contexts cause RuntimeError: generator raised StopIteration</title>
<updated>2020-06-16T17:10:59+00:00</updated>
<author>
<name>crusaderky</name>
<email>crusaderky@gmail.com</email>
</author>
<published>2020-06-16T17:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=47ea60d3e78d6052e121f896cb2b339968d53ac7'/>
<id>47ea60d3e78d6052e121f896cb2b339968d53ac7</id>
<content type='text'>
commit 1b105987940a95891ad8223ded1e45a95621969d
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Tue Jun 16 18:10:06 2020 +0100

    merge

commit d99b2407349f807f3f789be24b774c4ae0221dfa
Merge: e899082 583b297
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Tue Jun 16 18:08:53 2020 +0100

    Merge remote-tracking branch 'upstream/master' into issue1112

commit e899082d4e504737d11c1562c41baaddfbc1fb8b
Merge: d3c65b6 af723fa
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Tue Jun 16 09:36:04 2020 +0100

    Merge branch 'master' into issue1112

commit d3c65b62d225cbe344b877687ccc0e80c2c8af2c
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Mon Jun 15 14:57:50 2020 +0100

    _active_ctx may contain empty maps

    commit d5df37560dd68a59fa42ced632a41debaaf6924b
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:57:33 2020 +0100

        Fix

    commit ffc64940db28693c1836365b026d51f1a66fecad
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:36:35 2020 +0100

        tweak test

    commit 106993c4476c789636aed34d7c405034c6797cc8
    Merge: ca9adac 80e9c19
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:12:54 2020 +0100

        Merge branch 'v013' into issue1112

    commit ca9adac7279da05e0390f91b2da7f24bc157f001
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:10:51 2020 +0100

        Test
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1b105987940a95891ad8223ded1e45a95621969d
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Tue Jun 16 18:10:06 2020 +0100

    merge

commit d99b2407349f807f3f789be24b774c4ae0221dfa
Merge: e899082 583b297
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Tue Jun 16 18:08:53 2020 +0100

    Merge remote-tracking branch 'upstream/master' into issue1112

commit e899082d4e504737d11c1562c41baaddfbc1fb8b
Merge: d3c65b6 af723fa
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Tue Jun 16 09:36:04 2020 +0100

    Merge branch 'master' into issue1112

commit d3c65b62d225cbe344b877687ccc0e80c2c8af2c
Author: crusaderky &lt;crusaderky@gmail.com&gt;
Date:   Mon Jun 15 14:57:50 2020 +0100

    _active_ctx may contain empty maps

    commit d5df37560dd68a59fa42ced632a41debaaf6924b
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:57:33 2020 +0100

        Fix

    commit ffc64940db28693c1836365b026d51f1a66fecad
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:36:35 2020 +0100

        tweak test

    commit 106993c4476c789636aed34d7c405034c6797cc8
    Merge: ca9adac 80e9c19
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:12:54 2020 +0100

        Merge branch 'v013' into issue1112

    commit ca9adac7279da05e0390f91b2da7f24bc157f001
    Author: crusaderky &lt;crusaderky@gmail.com&gt;
    Date:   Mon Jun 15 14:10:51 2020 +0100

        Test
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for other numerical types at the registry level</title>
<updated>2020-01-22T07:13:56+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2020-01-22T07:04:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=032c6bd4e93f86046a702d6ff42afcf48d12e597'/>
<id>032c6bd4e93f86046a702d6ff42afcf48d12e597</id>
<content type='text'>
Until this commit, `int` and `float` were special types in Pint
(just as they are in Python). Numbers were parsed from strings
as int/float from the definition files and from user provided
strings; and exponents of units were also stored as int/float.

This commit change this by adding a new argument (`non_int_type`)
to classes and methods. It indicates how numeric values will be parsed
and defaulted. Any numerical class can be used such as `float` (default),
Decimal, Fraction.

This argument will be found in the following places
1. UnitRegistry: used for parsing the definition files and any
  value provided as a string.
2. UnitsContainer: used to compare equality with strings, multiply and
  divide by strings (which is equivalent to parse the string)
3. All methods OUTSIDE the UnitRegistry/Quantity that can parse
   strings have a `non_int_type` argument. (e.g. Definition.from_string)

Tests have been added for by duplicating most cases in `test_quantity.py`.
(Some tests have been deleted such as those dealing with numpy.)
The new file `test_non_int.py` run the tests for `Decimal`, `Fraction` and
`float` (which is redundant but is kept as a crosscheck for the implementation
of this testsuite)

BREAKING CHANGE: `use_decimal` is deprecated.
Use `non_int_type` keyword argument when instantiating the registry.
 &gt;&gt;&gt; from decimal import Decimal
 &gt;&gt;&gt; ureg = UnitRegistry(non_int_type=Decimal)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Until this commit, `int` and `float` were special types in Pint
(just as they are in Python). Numbers were parsed from strings
as int/float from the definition files and from user provided
strings; and exponents of units were also stored as int/float.

This commit change this by adding a new argument (`non_int_type`)
to classes and methods. It indicates how numeric values will be parsed
and defaulted. Any numerical class can be used such as `float` (default),
Decimal, Fraction.

This argument will be found in the following places
1. UnitRegistry: used for parsing the definition files and any
  value provided as a string.
2. UnitsContainer: used to compare equality with strings, multiply and
  divide by strings (which is equivalent to parse the string)
3. All methods OUTSIDE the UnitRegistry/Quantity that can parse
   strings have a `non_int_type` argument. (e.g. Definition.from_string)

Tests have been added for by duplicating most cases in `test_quantity.py`.
(Some tests have been deleted such as those dealing with numpy.)
The new file `test_non_int.py` run the tests for `Decimal`, `Fraction` and
`float` (which is redundant but is kept as a crosscheck for the implementation
of this testsuite)

BREAKING CHANGE: `use_decimal` is deprecated.
Use `non_int_type` keyword argument when instantiating the registry.
 &gt;&gt;&gt; from decimal import Decimal
 &gt;&gt;&gt; ureg = UnitRegistry(non_int_type=Decimal)
</pre>
</div>
</content>
</entry>
<entry>
<title>Sphinx fixes</title>
<updated>2020-01-06T14:43:55+00:00</updated>
<author>
<name>Guido Imperiale</name>
<email>crusaderky@gmail.com</email>
</author>
<published>2020-01-06T14:43:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=079559c41a3bbc96307f7047c19e5b1665aa54c6'/>
<id>079559c41a3bbc96307f7047c19e5b1665aa54c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixes W293</title>
<updated>2019-12-27T13:54:45+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2019-12-27T13:54:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=58956fa57fcafce0716f265f9ec81703cb3f547e'/>
<id>58956fa57fcafce0716f265f9ec81703cb3f547e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Manual edits after pyment</title>
<updated>2019-12-27T04:50:26+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2019-12-27T04:48:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=511efdd9f5eb2fb030cab4f46314dcf74e27b799'/>
<id>511efdd9f5eb2fb030cab4f46314dcf74e27b799</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Run pyment -w --convert -o numpydoc .</title>
<updated>2019-12-27T04:50:26+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2019-12-27T03:07:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=758a23a559338b8bedcc3dcf7f7567d378fe6c9b'/>
<id>758a23a559338b8bedcc3dcf7f7567d378fe6c9b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Unit tests</title>
<updated>2019-12-19T14:50:44+00:00</updated>
<author>
<name>Guido Imperiale</name>
<email>crusaderky@gmail.com</email>
</author>
<published>2019-12-19T14:50:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=d8e37778271d7bfc58b69b13d5bdfed0b4de9dab'/>
<id>d8e37778271d7bfc58b69b13d5bdfed0b4de9dab</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
