From 9240c71c02c27a6f20c73870a92ccdafab238df7 Mon Sep 17 00:00:00 2001 From: Mark Florisson Date: Tue, 11 Aug 2015 21:20:45 +0100 Subject: [PATCH] Add license to top of new files --- cassandra/buffer.pxd | 14 ++++++++++++++ cassandra/bytesio.pxd | 14 ++++++++++++++ cassandra/bytesio.pyx | 14 +++++++++++++- cassandra/cython_utils.pyx | 14 ++++++++++++++ cassandra/deserializers.pxd | 14 +++++++++++++- cassandra/deserializers.pyx | 15 ++++++++++++++- cassandra/ioutils.pyx | 14 ++++++++++++++ cassandra/numpy_parser.pyx | 14 +++++++++++++- cassandra/obj_parser.pyx | 14 ++++++++++++++ cassandra/parsing.pxd | 14 ++++++++++++++ cassandra/parsing.pyx | 14 ++++++++++++++ cassandra/protocol.py | 2 +- cassandra/row_parser.pyx | 14 +++++++++++++- cassandra/tuple.pxd | 14 ++++++++++++++ cassandra/type_codes.pxd | 14 ++++++++++++++ cassandra/util.py | 14 ++++++++++++++ tests/unit/cython/__init__.py | 14 ++++++++++++++ tests/unit/cython/bytesio_testhelper.pyx | 14 ++++++++++++++ tests/unit/cython/test_bytesio.py | 14 ++++++++++++++ tests/unit/cython/utils.py | 16 +++++++++++++++- 20 files changed, 264 insertions(+), 7 deletions(-) diff --git a/cassandra/buffer.pxd b/cassandra/buffer.pxd index 542cb181..2f40ced0 100644 --- a/cassandra/buffer.pxd +++ b/cassandra/buffer.pxd @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Simple buffer data structure that provides a view on existing memory (e.g. from a bytes object). This memory must stay alive while the diff --git a/cassandra/bytesio.pxd b/cassandra/bytesio.pxd index 64bbdcca..2bcda361 100644 --- a/cassandra/bytesio.pxd +++ b/cassandra/bytesio.pxd @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + cdef class BytesIOReader: cdef bytes buf cdef char *buf_ptr diff --git a/cassandra/bytesio.pyx b/cassandra/bytesio.pyx index eb81c2fe..68a15baf 100644 --- a/cassandra/bytesio.pyx +++ b/cassandra/bytesio.pyx @@ -1,4 +1,16 @@ -# -- cython: profile=True +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. cdef class BytesIOReader: """ diff --git a/cassandra/cython_utils.pyx b/cassandra/cython_utils.pyx index a660f3ee..1d16d47d 100644 --- a/cassandra/cython_utils.pyx +++ b/cassandra/cython_utils.pyx @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Duplicate module of util.py, with some accelerated functions used for deserialization. diff --git a/cassandra/deserializers.pxd b/cassandra/deserializers.pxd index 015fda37..26b4429a 100644 --- a/cassandra/deserializers.pxd +++ b/cassandra/deserializers.pxd @@ -1,4 +1,16 @@ -# -- cython: profile=True +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from cassandra.buffer cimport Buffer diff --git a/cassandra/deserializers.pyx b/cassandra/deserializers.pyx index 6c2afa22..54ce1daf 100644 --- a/cassandra/deserializers.pyx +++ b/cassandra/deserializers.pyx @@ -1,4 +1,17 @@ -# -- cython: profile=True +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from libc.stdint cimport int32_t, uint16_t diff --git a/cassandra/ioutils.pyx b/cassandra/ioutils.pyx index 1a11068c..c38b311a 100644 --- a/cassandra/ioutils.pyx +++ b/cassandra/ioutils.pyx @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + include 'cython_marshal.pyx' from cassandra.buffer cimport Buffer, from_ptr_and_size diff --git a/cassandra/numpy_parser.pyx b/cassandra/numpy_parser.pyx index bfde839e..6702cfcc 100644 --- a/cassandra/numpy_parser.pyx +++ b/cassandra/numpy_parser.pyx @@ -1,4 +1,16 @@ -# -- cython: profile=True +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """ This module provider an optional protocol parser that returns diff --git a/cassandra/obj_parser.pyx b/cassandra/obj_parser.pyx index 670f1b4a..8aa5b394 100644 --- a/cassandra/obj_parser.pyx +++ b/cassandra/obj_parser.pyx @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + include "ioutils.pyx" from cassandra.bytesio cimport BytesIOReader diff --git a/cassandra/parsing.pxd b/cassandra/parsing.pxd index 9daecad9..278c6e71 100644 --- a/cassandra/parsing.pxd +++ b/cassandra/parsing.pxd @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cassandra.bytesio cimport BytesIOReader from cassandra.deserializers cimport Deserializer diff --git a/cassandra/parsing.pyx b/cassandra/parsing.pyx index c9afd4b5..c44d7f5a 100644 --- a/cassandra/parsing.pyx +++ b/cassandra/parsing.pyx @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Module containing the definitions and declarations (parsing.pxd) for parsers. """ diff --git a/cassandra/protocol.py b/cassandra/protocol.py index 25311911..3cb13351 100644 --- a/cassandra/protocol.py +++ b/cassandra/protocol.py @@ -894,7 +894,7 @@ class ProtocolHandler(object): result decoding implementations. """ - @classmethod + @classmethod def encode_message(cls, msg, stream_id, protocol_version, compressor): """ Encodes a message using the specified frame parameters, and compressor diff --git a/cassandra/row_parser.pyx b/cassandra/row_parser.pyx index 1c855769..fc7bce15 100644 --- a/cassandra/row_parser.pyx +++ b/cassandra/row_parser.pyx @@ -1,4 +1,16 @@ -# -- cython: profile=True +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from cassandra.parsing cimport ParseDesc, ColumnParser from cassandra.deserializers import make_deserializers diff --git a/cassandra/tuple.pxd b/cassandra/tuple.pxd index 185e8364..746205e2 100644 --- a/cassandra/tuple.pxd +++ b/cassandra/tuple.pxd @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cpython.tuple cimport ( PyTuple_New, # Return value: New reference. diff --git a/cassandra/type_codes.pxd b/cassandra/type_codes.pxd index b0405284..90f29bc9 100644 --- a/cassandra/type_codes.pxd +++ b/cassandra/type_codes.pxd @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + cdef enum: CUSTOM_TYPE AsciiType diff --git a/cassandra/util.py b/cassandra/util.py index 0e8a818b..c71822c2 100644 --- a/cassandra/util.py +++ b/cassandra/util.py @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import with_statement import calendar import datetime diff --git a/tests/unit/cython/__init__.py b/tests/unit/cython/__init__.py index e69de29b..e4b89e5f 100644 --- a/tests/unit/cython/__init__.py +++ b/tests/unit/cython/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/tests/unit/cython/bytesio_testhelper.pyx b/tests/unit/cython/bytesio_testhelper.pyx index 7f898c4c..d557c037 100644 --- a/tests/unit/cython/bytesio_testhelper.pyx +++ b/tests/unit/cython/bytesio_testhelper.pyx @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cassandra.bytesio cimport BytesIOReader def test_read1(assert_equal, assert_raises): diff --git a/tests/unit/cython/test_bytesio.py b/tests/unit/cython/test_bytesio.py index 65cc463a..2dbf1311 100644 --- a/tests/unit/cython/test_bytesio.py +++ b/tests/unit/cython/test_bytesio.py @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from tests.unit.cython.utils import cyimport, cythontest bytesio_testhelper = cyimport('tests.unit.cython.bytesio_testhelper') diff --git a/tests/unit/cython/utils.py b/tests/unit/cython/utils.py index c493e17b..788212ac 100644 --- a/tests/unit/cython/utils.py +++ b/tests/unit/cython/utils.py @@ -1,3 +1,17 @@ +# Copyright 2013-2015 DataStax, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cassandra.cython_deps import HAVE_CYTHON, HAVE_NUMPY try: @@ -21,4 +35,4 @@ def cyimport(import_path): # @cythontest # def test_something(self): ... cythontest = unittest.skipUnless(HAVE_CYTHON, 'Cython is not available') -numpytest = unittest.skipUnless(HAVE_CYTHON and HAVE_NUMPY, 'NumPy is not available') \ No newline at end of file +numpytest = unittest.skipUnless(HAVE_CYTHON and HAVE_NUMPY, 'NumPy is not available')