[med-svn] [python-avro] 01/05: Imported Upstream version 1.8.2~rc1+dfsg

Afif Elghraoui afif at moszumanska.debian.org
Mon Jan 23 10:59:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

afif pushed a commit to branch master
in repository python-avro.

commit 1abc3ae2d7cd7b869d51e22d093bbfa42c83377b
Author: Afif Elghraoui <afif at debian.org>
Date:   Mon Jan 23 02:12:51 2017 -0800

    Imported Upstream version 1.8.2~rc1+dfsg
---
 CHANGES.txt                             | 102 ++++++++++++++++++++++++++++++++
 build.sh                                |  27 ++++-----
 doc/src/content/xdocs/idl.xml           |  24 ++++++++
 doc/src/content/xdocs/spec.xml          |  36 +++++++++--
 lang/py/build.sh                        |  60 +++++++++++++++++++
 lang/py/build.xml                       |   6 +-
 lang/py/test/test_ipc.py                |   4 +-
 lang/py3/avro/datafile.py               |  14 +++--
 lang/py3/avro/io.py                     |   3 +-
 lang/py3/avro/ipc.py                    |  20 ++++---
 lang/py3/avro/schema.py                 |   3 +-
 lang/py3/build.sh                       |  65 ++++++++++++++++++++
 pom.xml                                 |   6 +-
 share/VERSION.txt                       |   2 +-
 share/test/schemas/schemaevolution.avdl |  55 +++++++++++++++++
 share/test/schemas/specialtypes.avdl    |   3 +
 16 files changed, 388 insertions(+), 42 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 352c0cd..aed8391 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,107 @@
 Avro Change Log
 
+Avro 1.8.2 (5 November 2016)
+
+  INCOMPATIBLE CHANGES
+
+  NEW FEATURES
+
+    AVRO-1704: Java: Add support for single-message encoding. (blue)
+
+    AVRO-1704: Spec: Add single-message encoding format. (Niels Basjes via blue)
+
+    AVRO-1884: Java: Add method to set the compiler output suffix.
+    (shijinkui via blue)
+
+    AVRO-1932: Java: Allow setting the SchemaStore on generated classes. 
+    (Niels Basjes)
+
+  OPTIMIZATIONS
+
+  IMPROVEMENTS
+
+    AVRO-1889: Update maven-shade-plugin to enable building in Java 8 on Mac.
+    (Sachin Goyal via blue)
+
+    AVRO-1895. Java: Fix GenericData#deepCopy() to support logical types.
+    (cutting)
+
+    AVRO-1719: C++: Fix tests with Boost >= 1.59. (Romain Geissler via blue)
+
+    AVRO-1879: Make conversions field static. (Michael Wong via blue)
+
+    AVRO-1919: Formalize the presence of build.sh. (Suraj Acharya via cutting)
+
+    AVRO-1918: Improve logical type documentation. (Gabor Szadovszky via cutting)
+
+    AVRO-1907: Java: Add debug logging for invalid logical types.
+    (Gabor Szadovszky via blue)
+
+    AVRO-1897: Fix build issues due to VERSION.txt newline, avro-tools.
+    (Suraj Acharya via blue)
+
+  BUG FIXES
+
+    AVRO-1741: Python3: Fix error when codec is not in the header.
+    (Matthew Hayes via blue)
+
+    AVRO-1869: Java: Fix Decimal conversion from ByteBuffer. (blue)
+
+    AVRO-607: Java: Make SpecificData schema cache thread-safe.
+    (Andrius Druzinis-Vitkus via blue)
+
+    AVRO-1888: Java: Fix single-record encoding marker check. (blue)
+
+    AVRO-1848: Ruby: Fix handling of falsey default values.
+    (Brian McKelvey via blue)
+
+    AVRO-1874: Py3: Use recommended module-level logging.
+    (Torgeir Børresen via blue)
+
+    AVRO-1883: Java: Fix incompatible schema detection nested in unions.
+    (Yibing Shi via blue)
+
+    AVRO-1908: Fix TestSpecificCompiler reference to private method.
+    (blue)
+
+    AVRO-1873: Ruby: Add CRC32 checksum to Snappy-compressed blocks.
+    (blue)
+
+    AVRO-1900: Java: Remove dev-tools to fix Java build. (blue)
+
+    AVRO-1913: No warnings in the generated Java code. (Niels Basjes)
+
+    AVRO-1914: Fix licencing errors reported by rat. (Niels Basjes)
+
+    AVRO-1901: Record named "Exception" generated bad code.
+    (Radai Rosenblatt via Niels Basjes)
+
+    AVRO-1849: C++: printJson fails on record with no fields.
+    (Simon Woodford vai tomwhite)
+
+    AVRO-1853: C++: Compiler::toBin crashes on empty string.
+    (Zoltan Ivanfi via tomwhite)
+
+    AVRO-1923, AVRO-1944: Stop infinite recursion in GenericData.toString. (Niels Basjes)
+
+    AVRO-1860: Java: Field#DefaultVal() returns Ints for Long fields.
+    (Gabor Szadovszky via cutting)
+
+    AVRO-1929: Java: SchemaCompatibility fails to recognize
+    string<->bytes promotion.  (Anders Sundelin via cutting)
+
+    AVRO-1882: Java: Fix ConcurrentHashMap with non-string keys.
+    (Sachin Goyal via blue)
+
+    AVRO-1943: Java: Flaky test:
+    TestNettyServerWithCompression.testConnectionsCount
+    (Gabor Szadovszky via tomwhite)
+
+    AVRO-1947: Java: Inconsistent maven profile activation
+    (Gabor Szadovszky via tomwhite)
+
+    AVRO-1951: Python: Fix ipc_test.py with a valid DNS name. (blue)
+
 Avro 1.8.1 (14 May 2016)
 
   INCOMPATIBLE CHANGES
diff --git a/build.sh b/build.sh
index c0c31df..255e46a 100755
--- a/build.sh
+++ b/build.sh
@@ -39,16 +39,18 @@ do
 
     test)
       # run lang-specific tests
-      (cd lang/java; mvn test)
-      (cd lang/py; ant test)
-      (cd lang/py3; python3 setup.py test)
+      (cd lang/java; ./build.sh test)
+      # install java artifacts required by other builds and interop tests
+      mvn install -DskipTests
+      (cd lang/py; ./build.sh test)
+      (cd lang/py3; ./build.sh test)
       (cd lang/c; ./build.sh test)
       (cd lang/c++; ./build.sh test)
       (cd lang/csharp; ./build.sh test)
       (cd lang/js; ./build.sh test)
       (cd lang/ruby; ./build.sh test)
       (cd lang/php; ./build.sh test)
-      (cd lang/perl; perl ./Makefile.PL && make test)
+      (cd lang/perl; ./build.sh test)
 
       # create interop test data
       mkdir -p build/interop/data
@@ -105,15 +107,12 @@ do
 
       # build lang-specific artifacts
 
-      (cd lang/java; mvn package -DskipTests -Dhadoop.version=1;
-      rm -rf mapred/target/{classes,test-classes}/;
-      rm -rf trevni/avro/target/{classes,test-classes}/;
-      mvn -P dist package -DskipTests -Davro.version=$VERSION javadoc:aggregate)
+      (cd lang/java;./build.sh dist; mvn install -pl tools -am -DskipTests)
       (cd lang/java/trevni/doc; mvn site)
       (mvn -N -P copy-artifacts antrun:run)
 
-      (cd lang/py; ant dist)
-      (cd lang/py3; python3 setup.py sdist; cp -r dist ../../dist/py3)
+      (cd lang/py; ./build.sh dist)
+      (cd lang/py3; ./build.sh dist)
 
       (cd lang/c; ./build.sh dist)
 
@@ -128,7 +127,7 @@ do
       (cd lang/php; ./build.sh dist)
 
       mkdir -p dist/perl
-      (cd lang/perl; perl ./Makefile.PL && make dist)
+      (cd lang/perl; ./build.sh dist)
       cp lang/perl/Avro-$VERSION.tar.gz dist/perl/
 
       # build docs
@@ -194,11 +193,7 @@ do
 
       (cd lang/php; ./build.sh clean)
 
-      (cd lang/perl; [ ! -f Makefile ] || make clean)
-      rm -f  lang/perl/Avro-*.tar.gz
-      rm -f  lang/perl/META.yml
-      rm -f  lang/perl/Makefile.old
-      rm -rf lang/perl/inc/
+      (cd lang/perl; ./build.sh clean)
       ;;
 
     docker)
diff --git a/doc/src/content/xdocs/idl.xml b/doc/src/content/xdocs/idl.xml
index bd74b09..c9a809f 100644
--- a/doc/src/content/xdocs/idl.xml
+++ b/doc/src/content/xdocs/idl.xml
@@ -206,6 +206,7 @@ error Kaboom {
       <p>A type reference in Avro IDL must be one of:</p>
       <ul>
         <li>A primitive type</li>
+        <li>A logical type</li>
         <li>A named schema defined prior to this usage in the same Protocol</li>
         <li>A complex type (array, map, or union)</li>
       </ul>
@@ -218,6 +219,29 @@ error Kaboom {
         </p>
       </section>
 
+      <section id="logical_types">
+        <title>Logical Types</title>
+        <p>Some of the logical types supported by Avro's JSON format are also supported by Avro IDL.
+        The currently supported types are:
+        </p>
+        <ul>
+          <li><code>decimal</code> (logical type <a href="spec.html#Decimal"><code>decimal</code></a>)</li>
+          <li><code>date</code> (logical type <a href="spec.html#Date"><code>date</code></a>)</li>
+          <li><code>time_ms</code> (logical type <a href="spec.html#Time+%28millisecond+precision%29"><code>time-millis</code></a>)</li>
+          <li><code>timestamp_ms</code> (logical type <a href="spec.html#Timestamp+%28millisecond+precision%29"><code>timestamp-millis</code></a>)</li>
+        </ul>
+        <p>For example:</p>
+        <source>
+record Job {
+  string jobid;
+  date submitDate;
+  time_ms submitTime;
+  timestamp_ms finishTime;
+  decimal(9,2) finishRatio;
+}
+        </source>
+      </section>
+
       <section id="schema_references">
         <title>References to Named Schemata</title>
         <p>If a named schema has already been defined in the same Avro IDL file, it may be referenced by name
diff --git a/doc/src/content/xdocs/spec.xml b/doc/src/content/xdocs/spec.xml
index ec1f199..917d314 100644
--- a/doc/src/content/xdocs/spec.xml
+++ b/doc/src/content/xdocs/spec.xml
@@ -487,18 +487,18 @@
               value, followed by that many key/value pairs.  A block
               with count zero indicates the end of the map.  Each item
               is encoded per the map's value schema.</p>
-	
+
             <p>If a block's count is negative, its absolute value is used,
               and the count is followed immediately by a <code>long</code>
               block <em>size</em> indicating the number of bytes in the
               block.  This block size permits fast skipping through data,
               e.g., when projecting a record to a subset of its fields.</p>
-	
+
             <p>The blocked representation permits one to read and write
               maps larger than can be buffered in memory, since one can
               start writing items without knowing the full length of the
               map.</p>
-	
+
 	  </section>
 
           <section id="union_encoding">
@@ -569,6 +569,34 @@
 
       </section>
 
+      <section id="single_object_encoding">
+        <title>Single-object encoding</title>
+
+        <p>In some situations a single Avro serialized object is to be stored for a
+        longer period of time. One very common example is storing Avro records
+        for several weeks in an <a href="http://kafka.apache.org/">Apache Kafka</a> topic.</p>
+        <p>In the period after a schema change this persistance system will contain records
+        that have been written with different schemas. So the need arises to know which schema
+        was used to write a record to support schema evolution correctly.
+        In most cases the schema itself is too large to include in the message,
+        so this binary wrapper format supports the use case more effectively.</p>
+
+        <section id="single_object_encoding_spec">
+          <title>Single object encoding specification</title>
+          <p>Single Avro objects are encoded as follows:</p>
+          <ol>
+            <li>A two-byte marker, <code>C3 01</code>, to show that the message is Avro and uses this single-record format (version 1).</li>
+            <li>The 8-byte little-endian CRC-64-AVRO <a href="#schema_fingerprints">fingerprint</a> of the object's schema</li>
+            <li>The Avro object encoded using <a href="#binary_encoding">Avro's binary encoding</a></li>
+          </ol>
+        </section>
+
+        <p>Implementations use the 2-byte marker to determine whether a payload is Avro.
+          This check helps avoid expensive lookups that resolve the schema from a
+          fingerprint, when the message is not an encoded Avro payload.</p>
+
+      </section>
+
     </section>
 
     <section id="order">
@@ -1237,7 +1265,7 @@
         </ul>
       </section>
 
-      <section>
+      <section id="schema_fingerprints">
         <title>Schema Fingerprints</title>
 
         <p>"[A] fingerprinting algorithm is a procedure that maps an
diff --git a/lang/py/build.sh b/lang/py/build.sh
new file mode 100755
index 0000000..0169b0b
--- /dev/null
+++ b/lang/py/build.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+set -e # exit on error
+
+function usage {
+  echo "Usage: $0 {test|dist|clean}"
+  exit 1
+}
+
+if [ $# -eq 0 ]
+then
+  usage
+fi
+
+if [ -f VERSION.txt ]
+then
+  VERSION=`cat VERSION.txt`
+else
+  VERSION=`cat ../../share/VERSION.txt`
+fi
+
+for target in "$@"
+do
+
+case "$target" in
+  test)
+    ant test
+    ;;
+
+  dist)
+     ant dist
+    ;;
+
+  clean)
+    ant clean
+    rm -rf userlogs/
+    ;;
+
+  *)
+    usage
+esac
+
+done
+
+exit 0
diff --git a/lang/py/build.xml b/lang/py/build.xml
index 5ef5214..0a549fd 100644
--- a/lang/py/build.xml
+++ b/lang/py/build.xml
@@ -40,7 +40,11 @@
   <property name="ivy.jar" value="${basedir}/lib/ivy-${ivy.version}.jar"/>
 
   <!-- Load shared properties -->
-  <loadfile srcFile="${share.dir}/VERSION.txt" property="avro.version" />
+  <loadfile srcFile="${share.dir}/VERSION.txt" property="avro.version">
+    <filterchain>
+      <striplinebreaks/>
+    </filterchain>
+  </loadfile>
   <loadfile srcFile="${share.schema.dir}/org/apache/avro/ipc/HandshakeRequest.avsc" property="handshake.request.json"/>
   <loadfile srcFile="${share.schema.dir}/org/apache/avro/ipc/HandshakeResponse.avsc" property="handshake.response.json"/>
 
diff --git a/lang/py/test/test_ipc.py b/lang/py/test/test_ipc.py
index 7fffe49..8d29c44 100644
--- a/lang/py/test/test_ipc.py
+++ b/lang/py/test/test_ipc.py
@@ -30,10 +30,10 @@ class TestIPC(unittest.TestCase):
     pass
 
   def test_server_with_path(self):
-    client_with_custom_path = ipc.HTTPTransceiver('dummyserver.net', 80, '/service/article')
+    client_with_custom_path = ipc.HTTPTransceiver('apache.org', 80, '/service/article')
     self.assertEqual('/service/article', client_with_custom_path.req_resource)
 
-    client_with_default_path = ipc.HTTPTransceiver('dummyserver.net', 80)
+    client_with_default_path = ipc.HTTPTransceiver('apache.org', 80)
     self.assertEqual('/', client_with_default_path.req_resource)
 
 if __name__ == '__main__':
diff --git a/lang/py3/avro/datafile.py b/lang/py3/avro/datafile.py
index fc93fe1..2a22e57 100644
--- a/lang/py3/avro/datafile.py
+++ b/lang/py3/avro/datafile.py
@@ -35,6 +35,8 @@ except ImportError:
   has_snappy = False
 
 
+logger = logging.getLogger(__name__)
+
 # ------------------------------------------------------------------------------
 # Constants
 
@@ -238,7 +240,7 @@ class DataFileWriter(object):
         'meta': self.meta,
         'sync': self.sync_marker,
     }
-    logging.debug(
+    logger.debug(
         'Writing Avro data file header:\n%s\nAvro header schema:\n%s',
         header, META_SCHEMA)
     self.datum_writer.write_data(META_SCHEMA, header, self.encoder)
@@ -250,7 +252,7 @@ class DataFileWriter(object):
       self._WriteHeader()
 
     if self.block_count <= 0:
-      logging.info('Current block is empty, nothing to write.')
+      logger.info('Current block is empty, nothing to write.')
       return
 
     # write number of items in block
@@ -287,7 +289,7 @@ class DataFileWriter(object):
     # write sync marker
     self.writer.write(self.sync_marker)
 
-    logging.debug(
+    logger.debug(
         'Writing block with count=%d nbytes=%d sync=%r',
         self.block_count, compressed_data_length, self.sync_marker)
 
@@ -349,9 +351,11 @@ class DataFileReader(object):
     self._read_header()
 
     # ensure codec is valid
-    self.codec = self.GetMeta('avro.codec').decode('utf-8')
-    if self.codec is None:
+    avro_codec_raw = self.GetMeta('avro.codec')
+    if avro_codec_raw is None:
       self.codec = "null"
+    else:
+      self.codec = avro_codec_raw.decode('utf-8')
     if self.codec not in VALID_CODECS:
       raise DataFileException('Unknown codec: %s.' % self.codec)
 
diff --git a/lang/py3/avro/io.py b/lang/py3/avro/io.py
index f417b66..b944904 100644
--- a/lang/py3/avro/io.py
+++ b/lang/py3/avro/io.py
@@ -49,6 +49,7 @@ import sys
 
 from avro import schema
 
+logger = logging.getLogger(__name__)
 
 # ------------------------------------------------------------------------------
 # Constants
@@ -249,7 +250,7 @@ class BinaryDecoder(object):
     try:
       return input_bytes.decode('utf-8')
     except UnicodeDecodeError as exn:
-      logging.error('Invalid UTF-8 input bytes: %r', input_bytes)
+      logger.error('Invalid UTF-8 input bytes: %r', input_bytes)
       raise exn
 
   def check_crc32(self, bytes):
diff --git a/lang/py3/avro/ipc.py b/lang/py3/avro/ipc.py
index 973e674..792f764 100644
--- a/lang/py3/avro/ipc.py
+++ b/lang/py3/avro/ipc.py
@@ -32,6 +32,8 @@ from avro import io as avro_io
 from avro import protocol
 from avro import schema
 
+logger = logging.getLogger(__name__)
+
 # ------------------------------------------------------------------------------
 # Constants
 
@@ -174,7 +176,7 @@ class BaseRequestor(object, metaclass=abc.ABCMeta):
     if self._send_protocol:
       request_datum['clientProtocol'] = str(self._local_protocol)
 
-    logging.info('Sending handshake request: %s', request_datum)
+    logger.info('Sending handshake request: %s', request_datum)
     HANDSHAKE_REQUESTOR_WRITER.write(request_datum, encoder)
 
   def _WriteCallRequest(self, message_name, request_datum, encoder):
@@ -199,7 +201,7 @@ class BaseRequestor(object, metaclass=abc.ABCMeta):
     self._WriteRequest(message.request, request_datum, encoder)
 
   def _WriteRequest(self, request_schema, request_datum, encoder):
-    logging.info('writing request: %s', request_datum)
+    logger.info('writing request: %s', request_datum)
     datum_writer = avro_io.DatumWriter(request_schema)
     datum_writer.write(request_datum, encoder)
 
@@ -214,7 +216,7 @@ class BaseRequestor(object, metaclass=abc.ABCMeta):
       schema.AvroException on ???
     """
     handshake_response = HANDSHAKE_REQUESTOR_READER.read(decoder)
-    logging.info('Processing handshake response: %s', handshake_response)
+    logger.info('Processing handshake response: %s', handshake_response)
     match = handshake_response['match']
     if match == 'BOTH':
       # Both client and server protocol hashes match:
@@ -370,7 +372,7 @@ class Responder(object, metaclass=abc.ABCMeta):
       writer_schema = remote_message.request
       reader_schema = local_message.request
       request = self._ReadRequest(writer_schema, reader_schema, buffer_decoder)
-      logging.info('Processing request: %r', request)
+      logger.info('Processing request: %r', request)
 
       # perform server logic
       try:
@@ -407,7 +409,7 @@ class Responder(object, metaclass=abc.ABCMeta):
       The requested Protocol.
     """
     handshake_request = HANDSHAKE_RESPONDER_READER.read(decoder)
-    logging.info('Processing handshake request: %s', handshake_request)
+    logger.info('Processing handshake request: %s', handshake_request)
 
     # determine the remote protocol
     client_hash = handshake_request.get('clientHash')
@@ -436,7 +438,7 @@ class Responder(object, metaclass=abc.ABCMeta):
       handshake_response['serverProtocol'] = str(self.local_protocol)
       handshake_response['serverHash'] = self._local_hash
 
-    logging.info('Handshake response: %s', handshake_response)
+    logger.info('Handshake response: %s', handshake_response)
     HANDSHAKE_RESPONDER_WRITER.write(handshake_response, encoder)
     return remote_protocol
 
@@ -649,9 +651,9 @@ def _MakeHandlerClass(responder):
     def do_POST(self):
       reader = FramedReader(self.rfile)
       call_request = reader.Read()
-      logging.info('Serialized request: %r', call_request)
+      logger.info('Serialized request: %r', call_request)
       call_response = responder.Respond(call_request)
-      logging.info('Serialized response: %r', call_response)
+      logger.info('Serialized response: %r', call_response)
 
       self.send_response(200)
       self.send_header('Content-type', AVRO_RPC_MIME)
@@ -660,7 +662,7 @@ def _MakeHandlerClass(responder):
       framed_writer = FramedWriter(self.wfile)
       framed_writer.Write(call_response)
       self.wfile.flush()
-      logging.info('Response sent')
+      logger.info('Response sent')
 
   return AvroHTTPRequestHandler
 
diff --git a/lang/py3/avro/schema.py b/lang/py3/avro/schema.py
index c3f73c5..7ed3b54 100644
--- a/lang/py3/avro/schema.py
+++ b/lang/py3/avro/schema.py
@@ -45,6 +45,7 @@ import json
 import logging
 import re
 
+logger = logging.getLogger(__name__) 
 
 # ------------------------------------------------------------------------------
 # Constants
@@ -447,7 +448,7 @@ class Names(object):
       raise SchemaParseException(
           'Avro name %r already exists.' % schema.fullname)
 
-    logging.log(DEBUG_VERBOSE, 'Register new name for %r', schema.fullname)
+    logger.log(DEBUG_VERBOSE, 'Register new name for %r', schema.fullname)
     self._names[schema.fullname] = schema
 
 
diff --git a/lang/py3/build.sh b/lang/py3/build.sh
new file mode 100755
index 0000000..fdb457a
--- /dev/null
+++ b/lang/py3/build.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+set -e # exit on error
+
+function usage {
+  echo "Usage: $0 {test|dist|clean}"
+  exit 1
+}
+
+if [ $# -eq 0 ]
+then
+  usage
+fi
+
+if [ -f VERSION.txt ]
+then
+  VERSION=`cat VERSION.txt`
+else
+  VERSION=`cat ../../share/VERSION.txt`
+fi
+
+for target in "$@"
+do
+
+function do_clean(){
+  python3 setup.py clean
+  rm -rvf dist avro_python3.egg-info avro/*.avsc avro/VERSION.txt avro/__pycache__/ avro/tests/interop.avsc avro/tests/__pycache__/
+}
+
+case "$target" in
+  test)
+    python3 setup.py test
+    ;;
+
+  dist)
+     python3 setup.py sdist
+     cp -r dist ../../dist/py3
+    ;;
+
+  clean)
+    do_clean
+    ;;
+
+  *)
+    usage
+esac
+
+done
+
+exit 0
diff --git a/pom.xml b/pom.xml
index a243fd4..488aa09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 
   <groupId>org.apache.avro</groupId>
   <artifactId>avro-toplevel</artifactId>
-  <version>1.8.1</version>
+  <version>1.8.2</version>
   <packaging>pom</packaging>
 
   <name>Apache Avro Toplevel</name>
@@ -224,7 +224,7 @@
                 <!-- may not be in the root folder if using git-svn -->
                 <exclude>**/.git/**</exclude>
                 <exclude>**/.gitignore</exclude>
-                <!-- build or test files -->
+                <!-- build or test files (some are generated files that we commit as-is for testing purposes) -->
                 <exclude>**/*.log</exclude>
                 <exclude>build/**</exclude>
                 <exclude>doc/build/**</exclude>
@@ -243,6 +243,8 @@
                 <exclude>lang/ruby/.gem/**</exclude>
                 <exclude>lang/ruby/pkg/**</exclude>
                 <exclude>lang/ruby/.bundle/**</exclude>
+                <exclude>lang/java/avro/src/test/java/org/apache/avro/specific/TestRecordWithLogicalTypes.java</exclude>
+                <exclude>lang/java/avro/src/test/java/org/apache/avro/specific/TestRecordWithoutLogicalTypes.java</exclude>
                 <exclude>lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java</exclude>
                 <exclude>lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Position.java</exclude>
                 <exclude>lang/java/tools/src/test/compiler/output/Player.java</exclude>
diff --git a/share/VERSION.txt b/share/VERSION.txt
index b9268da..53adb84 100644
--- a/share/VERSION.txt
+++ b/share/VERSION.txt
@@ -1 +1 @@
-1.8.1
\ No newline at end of file
+1.8.2
diff --git a/share/test/schemas/schemaevolution.avdl b/share/test/schemas/schemaevolution.avdl
new file mode 100644
index 0000000..bfb14c5
--- /dev/null
+++ b/share/test/schemas/schemaevolution.avdl
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ * A few simple test schemas for testing schema evolution the IDL generated classes
+ */
+ at namespace("org.apache.avro.compiler.schema.evolve")
+protocol SchemaEvolveTesting {
+  record TestRecord1 {
+    string name;
+    long   value;
+  }
+
+  record TestRecord2 {
+    string name;
+    long   value;
+    string data;
+  }
+
+  record TestRecord3 {
+    string name;
+    string data;
+  }
+
+  record NestedEvolve1 {
+    string rootName;
+    TestRecord1 nested;
+  }
+
+  record NestedEvolve2 {
+    string rootName;
+    TestRecord2 nested;
+  }
+
+  record NestedEvolve3 {
+    string rootName;
+    TestRecord3 nested;
+  }
+
+}
diff --git a/share/test/schemas/specialtypes.avdl b/share/test/schemas/specialtypes.avdl
index 1be3aab..062398f 100644
--- a/share/test/schemas/specialtypes.avdl
+++ b/share/test/schemas/specialtypes.avdl
@@ -103,4 +103,7 @@ protocol LetsBreakIt {
       string nl;
     }
 
+    record Exception {
+      string whatever;
+    }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-avro.git



More information about the debian-med-commit mailing list