summaryrefslogtreecommitdiff
path: root/lib/_range.py
Commit message (Collapse)AuthorAgeFilesLines
* Faster check for empty range in str()Daniele Varrazzo2018-10-041-1/+1
|
* Implement __str__ for range typesMichel Albert2018-09-301-0/+13
|
* Drop 2to3 build step; make all code compatible with all PythonsJon Dufresne2017-12-111-3/+8
| | | | | | | | | | | | | | | | Make all library code compatible with both Python 2 and Python 3. Helps move to modern Python idioms. Can now write for Python 3 (with workarounds for Python 2) instead of the other way around. In the future, when it is eventually time to drop Python 2, the library will be in a better position to remove workarounds Added a very small comparability module compat.py where required. It includes definitions for: - text_type -- A type. str on Python 3. unicode on Python 2. - string_types -- A tuple. Contains only str on Python 3. Contains str & unicode on Python 2.
* Use dict comprehensionsDaniele Varrazzo2017-11-281-5/+2
|
* Python source cleanup using flake8Daniele Varrazzo2016-10-111-14/+25
|
* Dropped use of b() "macro" and 2to3 fixerDaniele Varrazzo2016-08-151-7/+7
| | | | Just use the b"" strings syntax supported from python 2.6.
* Make Range pickleableJonathan Ross Rogers2016-08-071-0/+11
|
* Merge branch 'range_sort'Daniele Varrazzo2014-02-221-4/+35
|\
| * Hardcode the list of attributes to be used in comparisonDaniele Varrazzo2014-02-221-1/+1
| | | | | | | | Comparing Range subclasses may lead to surprises.
| * Added implementation for Range gt and ge operatorsDaniele Varrazzo2014-02-221-13/+15
| | | | | | | | | | Using a common implementation for all the operators. Note that lt is the one used by sort so it's nice it's the fastest.
| * New implementation of Range sorting that works for Python 2.5 to 3.3, at least.Chris Withers2014-02-181-6/+26
| |
| * Provide a stable and consistent sort order for Range objects.Chris Withers2014-02-121-4/+13
| | | | | | | | This matches postgres server-side behaviour and helps client applications that need to sort based on the primary key of tables where the primary key is or contains a range.
* | Fixed error message on range parsing failedDaniele Varrazzo2014-02-221-1/+1
|/
* cater for comparison of subclassesChris Withers2013-05-261-1/+1
|
* raising an exception here rather than returning False causes problems with ↵Chris Withers2013-05-261-1/+1
| | | | SQLAlchemy's internal state tracking
* more useful error message when comparing ranges with non-rangesChris Withers2013-05-261-0/+2
|
* Make sure to return a bytes string from numeric range adapterDaniele Varrazzo2013-04-211-3/+3
|
* A couple of typos fixedDaniele Varrazzo2013-04-071-1/+1
|
* Fixed range adaptation on Python 3Daniele Varrazzo2013-03-161-10/+10
|
* More helpful error messasge on Range order attemptsDaniele Varrazzo2012-09-251-1/+3
|
* Added documentation for range types and adaptationDaniele Varrazzo2012-09-241-35/+44
|
* Don't need to implement __new__ to make an immutable classDaniele Varrazzo2012-09-241-4/+1
|
* Fixed search of types into schemas.Daniele Varrazzo2012-09-241-3/+3
| | | | | | We don't need to look for stuff implicitly into pg_catalog as all the builtin ranges are already registered. So just search into 'public' if the schema is not specified.
* Range objects cannot be orderedDaniele Varrazzo2012-09-231-0/+5
|
* Range objects are nonzero when not emptyDaniele Varrazzo2012-09-231-0/+3
|
* Range objects are immutable and hashableDaniele Varrazzo2012-09-231-1/+14
|
* Dropped Range._empty attributeDaniele Varrazzo2012-09-231-13/+13
| | | | | We can do with just _bounds: it will make eq and hash easier to implement in a consistent way
* Added in operator for rangesDaniele Varrazzo2012-09-231-0/+16
|
* NumberRange renamed to NumericRangeDaniele Varrazzo2012-09-231-7/+7
| | | | | | I was avoiding Numeric to avoid conflicting with the 'numeric' Postgres type, which is an alias for 'decimal'. But now that there is a single numeric range I can use the preferred name
* Dropped Range classes for specific numeric typesDaniele Varrazzo2012-09-231-15/+3
|
* Added first implementation of Range type, adapter, typecasterDaniele Varrazzo2012-09-231-0/+435