Skip to content

Commit

Permalink
Insert copyright headers
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Jul 16, 2016
1 parent 6fe65af commit 84ed10d
Show file tree
Hide file tree
Showing 65 changed files with 445 additions and 13 deletions.
6 changes: 6 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Main contributors
=================

MagicStack Inc.:
Elvis Pranskevichus <elvis@magic.io>
Yury Selivanov <yury@magic.io>
7 changes: 7 additions & 0 deletions asyncpg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from .connection import connect # NOQA
from .exceptions import * # NOQA
from .types import * # NOQA
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/_testbase.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import asyncio
import atexit
import contextlib
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/cluster.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import asyncio
import os
import os.path
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/compat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import functools
import sys

Expand Down
7 changes: 7 additions & 0 deletions asyncpg/connection.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import asyncio
import collections
import getpass
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/cursor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import collections

from . import compat
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/exceptions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


# GENERATED FROM postgresql/src/backend/utils/errcodes.txt
# DO NOT MODIFY, use tools/generate_exceptions.py to update

Expand Down
9 changes: 4 additions & 5 deletions asyncpg/exceptions/_base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
##
# Copyright (c) 2016 MagicStack Inc.
# All rights reserved.
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# See LICENSE for details.
##
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import sys
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/introspection.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


INTRO_LOOKUP_TYPES = '''\
WITH RECURSIVE typeinfo_tree(
oid, ns, name, kind, basetype, elemtype, range_subtype,
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/prepared_stmt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import json

from . import cursor
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from .protocol import Protocol
7 changes: 7 additions & 0 deletions asyncpg/protocol/buffer.pxd
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef class Memory:
cdef:
char* buf
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/buffer.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from cpython cimport Py_buffer
from libc.string cimport memcpy

Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/array.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


DEF ARRAY_MAXDIM = 6 # defined in postgresql/src/includes/c.h


Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/base.pxd
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


ctypedef object (*encode_func)(ConnectionSettings settings,
WriteBuffer buf,
object obj)
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/base.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef void* codec_map[MAXSUPPORTEDOID + 1]
cdef dict TYPE_CODECS_CACHE = {}
cdef dict EXTRA_CODECS = {}
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/bits.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from asyncpg.types import BitString


Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/bytea.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import decimal

_Dec = decimal.Decimal
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/datetime.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import datetime

utc = datetime.timezone.utc
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/float.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from libc cimport math


Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/geometry.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from asyncpg.types import Box, Line, LineSegment, Path, Point, Polygon, Circle


Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/hstore.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef hstore_encode(ConnectionSettings settings, WriteBuffer buf, obj):
cdef:
char *str
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/int.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef bool_encode(ConnectionSettings settings, WriteBuffer buf, obj):
if not cpython.PyBool_Check(obj):
raise TypeError('a boolean is required (got type {})'.format(
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/json.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef jsonb_encode(ConnectionSettings settings, WriteBuffer buf, obj):
cdef:
char *str
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/misc.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef void_encode(ConnectionSettings settings, FastReadBuffer buf):
# Void is zero bytes
buf.write_int32(0)
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/money.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef init_monetary_codecs():
moneyoids = [
MONEYOID,
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/network.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import ipaddress


Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/numeric.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import decimal


Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/range.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


from asyncpg import types as apg_types

# defined in postgresql/src/include/utils/rangetypes.h
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/record.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef inline record_encode_frame(ConnectionSettings settings, WriteBuffer buf,
WriteBuffer elem_data, uint32_t elem_count):
buf.write_int32(4 + elem_data.len())
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/text.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef inline as_pg_string_and_size(
ConnectionSettings settings, obj, char **str, ssize_t *size):

Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/tsearch.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef init_tsearch_codecs():
ts_oids = [
TSQUERYOID,
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/txid.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


cdef txid_snapshot_encode(ConnectionSettings settings, WriteBuffer buf, obj):
cdef:
int32_t nxip
Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/codecs/uuid.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


import uuid


Expand Down
7 changes: 7 additions & 0 deletions asyncpg/protocol/consts.pxi
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (C) 2016-present the ayncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0


DEF _BUFFER_INITIAL_SIZE = 1024
DEF _BUFFER_MAX_GROW = 65536
DEF _BUFFER_FREELIST_SIZE = 256
Expand Down
Loading

0 comments on commit 84ed10d

Please sign in to comment.