From 9268c320bf6ea35696951875df518286dd79ad54 Mon Sep 17 00:00:00 2001 From: Sanjana Date: Thu, 28 Feb 2019 10:16:13 -0500 Subject: Add port comparison in __eq__() and __ne__() method to URL Comparing two objects of :class:`.URL` using ``__eq__()`` did not take port number into consideration, two objects differing only by port number were considered equal. Port comparison is now added in ``__eq__()`` method of :class:`.URL`, objects differing by port number are now not equal. Additionally, ``__ne__()`` was not implemented for :class:`.URL` which caused unexpected result when ``!=`` was used in Python2, since there are no implied relationships among the comparison operators in Python2. Fixes: #4406 Closes: #4515 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4515 Pull-request-sha: 0f15b805f07e7fca1f82ca6c3aad98d50ea705b8 Change-Id: Iba7d224f1282dc3f4b884d1a746f2d46669f551e --- doc/build/changelog/unreleased_12/4406.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/build/changelog/unreleased_12/4406.rst (limited to 'doc') diff --git a/doc/build/changelog/unreleased_12/4406.rst b/doc/build/changelog/unreleased_12/4406.rst new file mode 100644 index 000000000..aee7e5d62 --- /dev/null +++ b/doc/build/changelog/unreleased_12/4406.rst @@ -0,0 +1,11 @@ +.. change:: + :tags: bug, engine + :tickets: 4406 + + Comparing two objects of :class:`.URL` using ``__eq__()`` did not take port + number into consideration, two objects differing only by port number were + considered equal. Port comparison is now added in ``__eq__()`` method of + :class:`.URL`, objects differing by port number are now not equal. + Additionally, ``__ne__()`` was not implemented for :class:`.URL` which + caused unexpected result when ``!=`` was used in Python2, since there are no + implied relationships among the comparison operators in Python2. -- cgit v1.2.1