Skip to content

Commit ca792db

Browse files
committed
Version meta and fixed user agent
1 parent ff43630 commit ca792db

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

neo4j/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
2020

21+
22+
from neo4j.meta import version as __version__

neo4j/meta.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env python
2+
# -*- encoding: utf-8 -*-
3+
4+
# Copyright (c) 2002-2015 "Neo Technology,"
5+
# Network Engine for Objects in Lund AB [http://neotechnology.com]
6+
#
7+
# This file is part of Neo4j.
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
21+
22+
version = "1.0.0b2"

neo4j/v1/connection.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@
2929
from socket import create_connection, SHUT_RDWR
3030
from struct import pack as struct_pack, unpack as struct_unpack, unpack_from as struct_unpack_from
3131

32+
from neo4j.meta import version
3233
from .compat import hex2, secure_socket
3334
from .exceptions import ProtocolError
3435
from .packstream import Packer, Unpacker
3536

3637

3738
DEFAULT_PORT = 7687
38-
DEFAULT_USER_AGENT = "neo4j-python/0.0"
39+
DEFAULT_USER_AGENT = "neo4j-python/%s" % version
3940

4041
# Signature bytes for each message type
4142
INIT = b"\x01" # 0000 0001 // INIT <user_agent>

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
except ImportError:
2525
from distutils.core import setup
2626

27+
from neo4j.meta import version
28+
2729

2830
# Used for reading the README into long_description below.
2931
def read(fname):
3032
return open(os.path.join(os.path.dirname(__file__), fname)).read()
3133

3234

3335
setup(name="neo4j-driver",
34-
version="1.0.0b2",
36+
version=version,
3537
description="Neo4j Bolt driver for Python",
3638
license="Apache License, Version 2.0",
3739
long_description=read("README.rst"),

0 commit comments

Comments
 (0)