Changeset - b9332da76d66
[Not reviewed]
stable
0 1 0
Mads Kiilerich (mads) - 18 months ago 2024-09-22 23:28:57
mads@kiilerich.com
Grafted from: 3e5d2e178d8d
py3.13: Fix DeprecationWarning: 'count' is passed as positional argument
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/feeds.py
Show inline comments
 
@@ -48,25 +48,25 @@ def rfc3339_date(date):
 
        offset = date.tzinfo.utcoffset(date)
 
        timezone = (offset.days * 24 * 60) + (offset.seconds / 60)
 
        hour, minute = divmod(timezone, 60)
 
        return time_str + "%+03d:%02d" % (hour, minute)
 
    else:
 
        return date.strftime('%Y-%m-%dT%H:%M:%SZ')
 

	
 
# From ``django.utils.feedgenerator`` via webhelpers.feedgenerator
 
def get_tag_uri(url, date):
 
    "Creates a TagURI. See http://diveintomark.org/archives/2004/05/28/howto-atom-id"
 
    tag = re.sub('^http://', '', url)
 
    if date is not None:
 
        tag = re.sub('/', ',%s:/' % date.strftime('%Y-%m-%d'), tag, 1)
 
        tag = re.sub('/', ',%s:/' % date.strftime('%Y-%m-%d'), tag, count=1)
 
    tag = re.sub('#', '/', tag)
 
    return 'tag:' + tag
 

	
 

	
 
class Attributes(object):
 
    """Simple namespace for attribute dict access in mako and elsewhere"""
 
    def __init__(self, a_dict):
 
        self.__dict__ = a_dict
 

	
 

	
 
class _Feeder(object):
 

	
0 comments (0 inline, 0 general)