Skip to content

Commit b3af679

Browse files
committed
fix emitting Tag 0. declare version 1.0.0
1 parent 572b770 commit b3af679

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

c/cbormodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ static int dumps_tag(EncodeOptions *optp, PyObject* ob, uint8_t* out, uintptr_t*
11161116
#ifdef Py_INTOBJECT_H
11171117
if (PyInt_Check(tag_num)) {
11181118
long val = PyInt_AsLong(tag_num);
1119-
if (val > 0) {
1119+
if (val >= 0) {
11201120
tag_aux_out(CBOR_TAG, val, out, &pos);
11211121
err = inner_dumps(optp, tag_value, out, &pos);
11221122
} else {

cbor/VERSION.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
'0.1.25'
1+
'1.0.0'

cbor/tests/test_cbor.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
import base64
5+
import datetime
56
import json
67
import logging
78
import random
@@ -268,6 +269,12 @@ def test_badread(self):
268269
logger.info('unexpected error!', exc_info=True)
269270
assert False, 'unexpected error' + str(ex)
270271

272+
def test_datetime(self):
273+
if not self.testable(): return
274+
# right now we're just testing that it's possible to dumps()
275+
# Tag(0,...) because there was a bug around that.
276+
xb = self.dumps(Tag(0, datetime.datetime(1984,1,24,23,22,21).isoformat()))
277+
271278
def test_sortkeys(self):
272279
if not self.testable(): return
273280
obytes = []

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ def build_extension(self, ext):
8787
],
8888
license='Apache',
8989
classifiers=[
90-
'Development Status :: 4 - Beta',
90+
'Development Status :: 5 - Production/Stable',
9191
'Intended Audience :: Developers',
9292
'License :: OSI Approved :: Apache Software License',
9393
'Operating System :: OS Independent',
9494
'Programming Language :: Python :: 2.7',
95-
'Programming Language :: Python :: 3.3',
9695
'Programming Language :: Python :: 3.4',
96+
'Programming Language :: Python :: 3.5',
9797
'Programming Language :: C',
9898
'Topic :: Software Development :: Libraries :: Python Modules',
9999
],

0 commit comments

Comments
 (0)