diff --git a/.gitignore b/.gitignore index 5ba77b1e9..15f0f2cd7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ build/ dist/ pymodbus.egg-info/ .coverage +.vscode +.idea +.noseids diff --git a/pymodbus/version.py b/pymodbus/version.py index c002097b4..4884945d8 100644 --- a/pymodbus/version.py +++ b/pymodbus/version.py @@ -9,24 +9,26 @@ class Version(object): - def __init__(self, package, major, minor, micro): + def __init__(self, package, major, minor, micro, pre): ''' :param package: Name of the package that this is a version of. :param major: The major version number. :param minor: The minor version number. :param micro: The micro version number. + :param pre: The pre release tag ''' self.package = package self.major = major self.minor = minor self.micro = micro + self.pre = pre def short(self): ''' Return a string in canonical short version format - .. + ...
         '''
-        return '%d.%d.%d' % (self.major, self.minor, self.micro)
+        return '%d.%d.%d.%s' % (self.major, self.minor, self.micro, self.pre)
 
     def __str__(self):
         ''' Returns a string representation of the object
@@ -35,7 +37,7 @@ def __str__(self):
         '''
         return '[%s, version %s]' % (self.package, self.short())
 
-version = Version('pymodbus', 1, 3, 0)
+version = Version('pymodbus', 1, 3, 0, "rc1")
 version.__name__ = 'pymodbus'  # fix epydoc error
 
 #---------------------------------------------------------------------------#
diff --git a/requirements.txt b/requirements.txt
index 39d95377b..49983307f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,26 +1,29 @@
 # -------------------------------------------------------------------
 # if want to use the pymodbus serial stack, uncomment these
 # -------------------------------------------------------------------
-#pyserial==2.6
+#pyserial==3.3
 # -------------------------------------------------------------------
 # if you want to run the tests and code coverage, uncomment these
 # -------------------------------------------------------------------
-#coverage==3.5.3
-#mock==1.0b1
-#nose==1.2.1
-#pep8==1.3.3
+#coverage==4.4
+#mock==2.0.0
+#nose==1.3.7
+#pep8==1.7.0
 # -------------------------------------------------------------------
 # if you want to use the asynchronous version, uncomment these
 # -------------------------------------------------------------------
-#Twisted==12.2.0
-#zope.interface==4.0.1
-#pyasn1==0.1.4
-#pycrypto==2.6
+#Twisted==17.1.0
+#zope.interface==4.4.0
+#pyasn1==0.2.3
+#pycrypto==2.6.1
 #wsgiref==0.1.2
+#cryptography==1.8.1
 # -------------------------------------------------------------------
 # if you want to build the documentation, uncomment these
 # -------------------------------------------------------------------
-#Jinja2==2.6
-#Pygments==1.5
-#Sphinx==1.1.3
-#docutils==0.9.1
+#Jinja2==2.9.6
+#Pygments==2.2.0
+#Sphinx==1.5.5
+#docutils==0.13.1
+#pydoctor==16.3.0
+
diff --git a/setup.py b/setup.py
index 45232a6bc..1c1616aee 100644
--- a/setup.py
+++ b/setup.py
@@ -53,8 +53,8 @@
     author = __author__,
     author_email = 'bashwork@gmail.com',
     maintainer = __author__,
-    maintainer_email = 'bashwork@gmail.com',
-    url='http://code.google.com/p/pymodbus/',
+    maintainer_email = 'otlasanju@gmail.com',
+    url='https://github.com/riptideio/pymodbus/',
     license = 'BSD',
     packages = find_packages(exclude=['examples', 'test']),
     exclude_package_data = {'' : ['examples', 'test', 'tools', 'doc']},
diff --git a/test/test_server_async.py b/test/test_server_async.py
index c8fbbaea7..ad8e4bd39 100644
--- a/test/test_server_async.py
+++ b/test/test_server_async.py
@@ -5,13 +5,17 @@
 from pymodbus.server.async import ModbusTcpProtocol, ModbusUdpProtocol
 from pymodbus.server.async import ModbusServerFactory
 from pymodbus.server.async import StartTcpServer, StartUdpServer, StartSerialServer
-from pymodbus.exceptions import ConnectionException, NotImplementedException
-from pymodbus.exceptions import ParameterException
-from pymodbus.bit_read_message import ReadCoilsRequest, ReadCoilsResponse
 
+
+import sys
 #---------------------------------------------------------------------------#
 # Fixture
 #---------------------------------------------------------------------------#
+SERIAL_PORT = "/dev/ptmx"
+if sys.platform == "darwin":
+    SERIAL_PORT = "/dev/ptyp0"
+
+
 class AsynchronousServerTest(unittest.TestCase):
     '''
     This is the unittest for the pymodbus.server.async module
@@ -84,7 +88,7 @@ def testUdpServerStartup(self):
     def testSerialServerStartup(self):
         ''' Test that the modbus serial async server starts correctly '''
         with patch('twisted.internet.reactor') as mock_reactor:
-            StartSerialServer(context=None, port='/dev/ptmx')
+            StartSerialServer(context=None, port=SERIAL_PORT)
             self.assertEqual(mock_reactor.run.call_count, 1)
 
 #---------------------------------------------------------------------------#
diff --git a/test/test_server_sync.py b/test/test_server_sync.py
index 5af709f27..9f6fd9f6c 100644
--- a/test/test_server_sync.py
+++ b/test/test_server_sync.py
@@ -14,7 +14,11 @@
 from pymodbus.server.sync import StartTcpServer, StartUdpServer, StartSerialServer
 from pymodbus.exceptions import NotImplementedException
 from pymodbus.bit_read_message import ReadCoilsRequest, ReadCoilsResponse
+import sys
 
+SERIAL_PORT = "/dev/ptmx"
+if sys.platform == "darwin":
+    SERIAL_PORT = "/dev/ptyp0"
 #---------------------------------------------------------------------------#
 # Mock Classes
 #---------------------------------------------------------------------------#
@@ -322,7 +326,7 @@ def testStartUdpServer(self):
     def testStartSerialServer(self):
         ''' Test the serial server starting factory '''
         with patch.object(ModbusSerialServer, 'serve_forever') as mock_server:
-            StartSerialServer()
+            StartSerialServer(port=SERIAL_PORT)
 
 #---------------------------------------------------------------------------#
 # Main
diff --git a/test/test_version.py b/test/test_version.py
index 08108f406..8e26c8c1e 100644
--- a/test/test_version.py
+++ b/test/test_version.py
@@ -16,9 +16,10 @@ def tearDown(self):
         pass
 
     def testVersionClass(self):
-        version = Version('test', 1,2,3)
-        self.assertEqual(version.short(), '1.2.3')
-        self.assertEqual(str(version), '[test, version 1.2.3]')
+        version = Version('test', 1,2,3, "sometag")
+        short = version.short()
+        self.assertEqual(version.short(), '1.2.3.sometag')
+        self.assertEqual(str(version), '[test, version 1.2.3.sometag]')
 
 #---------------------------------------------------------------------------#
 # Main