Skip to content
Snippets Groups Projects
Commit b63d7f43 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

Fix license statements on db_utils.py

When the code was migrated from swh.storage, some other ancillary functions were
merged into this file. So bits of it are under the LGPLv3 (the code pulled from
psycopg2) and bits are under the GPLv3 (the code we wrote).
parent 28d61c8c
No related branches found
No related tags found
1 merge request!162Fix license statements on db_utils.py
# Copyright (C) 2015-2019 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
#
# This code has been imported from psycopg2, version 2.7.4,
# https://github.com/psycopg/psycopg2/tree/5afb2ce803debea9533e293eef73c92ffce95bcd
# and modified by Software Heritage.
#
# Original file: lib/extras.py
#
# psycopg2 is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import functools
import re
......@@ -47,6 +37,18 @@ def jsonize(value):
return value
# The following code has been imported from psycopg2, version 2.7.4,
# https://github.com/psycopg/psycopg2/tree/5afb2ce803debea9533e293eef73c92ffce95bcd
# and modified by Software Heritage.
#
# Original file: lib/extras.py
#
# psycopg2 is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
def _paginate(seq, page_size):
"""Consume an iterable and return it in chunks.
Every chunk is at most `page_size`. Never return an empty chunk.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment