From cdc77b4bf657ba94b175e12970f15a4351fc9f67 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Fri, 23 Sep 2022 16:49:49 +0200 Subject: [PATCH] Remove superfluous `__unicode__` declarations The `__unicode__` protocol is not used in python3, and furthermore the `unicode()` builtin does not exist anymore. --- babel/dates.py | 3 --- babel/support.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/babel/dates.py b/babel/dates.py index c8a5a8872..a30cac9d1 100644 --- a/babel/dates.py +++ b/babel/dates.py @@ -1281,9 +1281,6 @@ def __init__(self, pattern, format): def __repr__(self): return '<%s %r>' % (type(self).__name__, self.pattern) - def __unicode__(self): - return self.pattern - def __str__(self): pat = self.pattern return pat diff --git a/babel/support.py b/babel/support.py index e11a9954f..80e93400d 100644 --- a/babel/support.py +++ b/babel/support.py @@ -207,9 +207,6 @@ def __len__(self): def __str__(self): return str(self.value) - def __unicode__(self): - return unicode(self.value) - def __add__(self, other): return self.value + other