prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Use pycryptodome instead of pycrypto.
  <!--
  Please use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) for
  support questions.
  
  Before opening a new issue, make sure you do the following:
      * check that your issue isn't already filed: https://github.com/riptideio/pymodbus/issues
      * prepare a short, runnable example that reproduce the issue with the latest development version of Pymodbus
  -->
  
  ### Versions
  
  * Python: 2.7.12
  * OS: Ubuntu 18.04
  * Pymodbus: 2.1.0 [twisted]
  * Modbus Hardware (if used): 
  
  ### Pymodbus Specific
  * Server: tcp - async
  
  ### Description
  
  I am trying to use Mod bus server on TCP protocol, but when I installed pymodbus and I saw it's installed pycrypto, which is deprecated and dead software. 
  
  I already have installed pycryptodome in my application, which is a conflict with pycrypto, 
  we can't have both pycrypto and pycryptodome at the same time,
  
  Can we have pymodbus[twisted] release which can use pycryptodome instead of pycrypto?
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 """
  3 Installs pymodbus using distutils
  4 
  5 Run:
  6     python setup.py install
  7 to install the package from the source archive.
  8 
  9 For information about setuptools
  10 http://peak.telecommunity.com/DevCenter/setuptools#new-and-changed-setup-keywords
  11 """
  12 
  13 # --------------------------------------------------------------------------- #
  14 # initialization
  15 # --------------------------------------------------------------------------- #
  16 try:  # if not installed, install and proceed
  17     from setuptools import setup, find_packages
  18 except ImportError:
  19     from ez_setup import use_setuptools
  20     use_setuptools()
  21     from setuptools import setup, find_packages
  22 
  23 try:
  24     from setup_commands import command_classes
  25 except ImportError:
  26     command_classes={}
  27 from pymodbus import __version__, __author__, __maintainer__
  28 
  29 with open('requirements.txt') as reqs:
  30     install_requires = [
  31         line for line in reqs.read().split('\n')
  32         if (line and not line.startswith('--'))
  33     ]
  34     install_requires.append("pyserial >= 3.4")
  35 # --------------------------------------------------------------------------- #
  36 # configuration
  37 # --------------------------------------------------------------------------- #
  38 setup(
  39     name="pymodbus",
  40     version=__version__,
  41     description="A fully featured modbus protocol stack in python",
  42     long_description="""
  43         Pymodbus aims to be a fully implemented modbus protocol stack 
  44         implemented using twisted/asyncio/tornado.  
  45         Its orignal goal was to allow simulation of thousands of modbus devices
  46         on a single machine for monitoring software testing.
  47     """,
  48     classifiers=[
  49         'Development Status :: 4 - Beta',
  50         'Environment :: Console',
  51         'Environment :: X11 Applications :: GTK',
  52         'Framework :: Twisted',
  53         'Intended Audience :: Developers',
  54         'License :: OSI Approved :: BSD License',
  55         'Operating System :: POSIX :: Linux',
  56         'Operating System :: Unix',
  57         'Programming Language :: Python',
  58         'Topic :: System :: Networking',
  59         'Topic :: Utilities'
  60     ],
  61     keywords='modbus, twisted, scada',
  62     author=__author__,
  63     author_email='bashwork@gmail.com',
  64     maintainer=__maintainer__,
  65     maintainer_email='otlasanju@gmail.com',
  66     url='https://github.com/riptideio/pymodbus/',
  67     license='BSD',
  68     packages=find_packages(exclude=['examples', 'test']),
  69     exclude_package_data={'': ['examples', 'test', 'tools', 'doc']},
  70     py_modules=['ez_setup'],
  71     platforms=['Linux', 'Mac OS X', 'Win'],
  72     include_package_data=True,
  73     zip_safe=True,
  74     install_requires=install_requires,
  75     extras_require={
  76         'quality': [
  77             'coverage >= 3.5.3',
  78             'nose >= 1.2.1',
  79             'mock >= 1.0.0',
  80             'pep8 >= 1.3.3'
  81         ],
  82         'documents': ['sphinx >= 1.1.3',
  83                       'sphinx_rtd_theme',
  84                       'humanfriendly'],
  85         'twisted': [
  86             'twisted >= 12.2.0',
  87             'pyasn1 >= 0.1.4',
  88             'pycrypto >= 2.6'
  89         ],
  90         'tornado': [
  91             'tornado >= 4.5.3'
  92         ],
  93         'repl': [
  94             'click>=6.7',
  95             'prompt-toolkit==2.0.4',
  96             'pygments==2.2.0'
  97         ]
  98     },
  99     entry_points={
  100         'console_scripts': ['pymodbus.console=pymodbus.repl.main:main'],
  101     },
  102     test_suite='nose.collector',
  103     cmdclass=command_classes,
  104 )
  105 
  106
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -85,7 +85,6 @@
           'twisted': [
               'twisted >= 12.2.0',
               'pyasn1 >= 0.1.4',
  -            'pycrypto >= 2.6'
           ],
           'tornado': [
               'tornado >= 4.5.3'
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -85,7 +85,6 @@\n         'twisted': [\n             'twisted >= 12.2.0',\n             'pyasn1 >= 0.1.4',\n-            'pycrypto >= 2.6'\n         ],\n         'tornado': [\n             'tornado >= 4.5.3'\n", "issue": "Use pycryptodome instead of pycrypto.\n<!--\r\nPlease use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) for\r\nsupport questions.\r\n\r\nBefore opening a new issue, make sure you do the following:\r\n    * check that your issue isn't already filed: https://github.com/riptideio/pymodbus/issues\r\n    * prepare a short, runnable example that reproduce the issue with the latest development version of Pymodbus\r\n-->\r\n\r\n### Versions\r\n\r\n* Python: 2.7.12\r\n* OS: Ubuntu 18.04\r\n* Pymodbus: 2.1.0 [twisted]\r\n* Modbus Hardware (if used): \r\n\r\n### Pymodbus Specific\r\n* Server: tcp - async\r\n\r\n### Description\r\n\r\nI am trying to use Mod bus server on TCP protocol, but when I installed pymodbus and I saw it's installed pycrypto, which is deprecated and dead software. \r\n\r\nI already have installed pycryptodome in my application, which is a conflict with pycrypto, \r\nwe can't have both pycrypto and pycryptodome at the same time,\r\n\r\nCan we have pymodbus[twisted] release which can use pycryptodome instead of pycrypto?\n", "before_files": [{"content": "#!/usr/bin/env python\n\"\"\"\nInstalls pymodbus using distutils\n\nRun:\n    python setup.py install\nto install the package from the source archive.\n\nFor information about setuptools\nhttp://peak.telecommunity.com/DevCenter/setuptools#new-and-changed-setup-keywords\n\"\"\"\n\n# --------------------------------------------------------------------------- #\n# initialization\n# --------------------------------------------------------------------------- #\ntry:  # if not installed, install and proceed\n    from setuptools import setup, find_packages\nexcept ImportError:\n    from ez_setup import use_setuptools\n    use_setuptools()\n    from setuptools import setup, find_packages\n\ntry:\n    from setup_commands import command_classes\nexcept ImportError:\n    command_classes={}\nfrom pymodbus import __version__, __author__, __maintainer__\n\nwith open('requirements.txt') as reqs:\n    install_requires = [\n        line for line in reqs.read().split('\\n')\n        if (line and not line.startswith('--'))\n    ]\n    install_requires.append(\"pyserial >= 3.4\")\n# --------------------------------------------------------------------------- #\n# configuration\n# --------------------------------------------------------------------------- #\nsetup(\n    name=\"pymodbus\",\n    version=__version__,\n    description=\"A fully featured modbus protocol stack in python\",\n    long_description=\"\"\"\n        Pymodbus aims to be a fully implemented modbus protocol stack \n        implemented using twisted/asyncio/tornado.  \n        Its orignal goal was to allow simulation of thousands of modbus devices\n        on a single machine for monitoring software testing.\n    \"\"\",\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: Console',\n        'Environment :: X11 Applications :: GTK',\n        'Framework :: Twisted',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: POSIX :: Linux',\n        'Operating System :: Unix',\n        'Programming Language :: Python',\n        'Topic :: System :: Networking',\n        'Topic :: Utilities'\n    ],\n    keywords='modbus, twisted, scada',\n    author=__author__,\n    author_email='bashwork@gmail.com',\n    maintainer=__maintainer__,\n    maintainer_email='otlasanju@gmail.com',\n    url='https://github.com/riptideio/pymodbus/',\n    license='BSD',\n    packages=find_packages(exclude=['examples', 'test']),\n    exclude_package_data={'': ['examples', 'test', 'tools', 'doc']},\n    py_modules=['ez_setup'],\n    platforms=['Linux', 'Mac OS X', 'Win'],\n    include_package_data=True,\n    zip_safe=True,\n    install_requires=install_requires,\n    extras_require={\n        'quality': [\n            'coverage >= 3.5.3',\n            'nose >= 1.2.1',\n            'mock >= 1.0.0',\n            'pep8 >= 1.3.3'\n        ],\n        'documents': ['sphinx >= 1.1.3',\n                      'sphinx_rtd_theme',\n                      'humanfriendly'],\n        'twisted': [\n            'twisted >= 12.2.0',\n            'pyasn1 >= 0.1.4',\n            'pycrypto >= 2.6'\n        ],\n        'tornado': [\n            'tornado >= 4.5.3'\n        ],\n        'repl': [\n            'click>=6.7',\n            'prompt-toolkit==2.0.4',\n            'pygments==2.2.0'\n        ]\n    },\n    entry_points={\n        'console_scripts': ['pymodbus.console=pymodbus.repl.main:main'],\n    },\n    test_suite='nose.collector',\n    cmdclass=command_classes,\n)\n\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n\"\"\"\nInstalls pymodbus using distutils\n\nRun:\n    python setup.py install\nto install the package from the source archive.\n\nFor information about setuptools\nhttp://peak.telecommunity.com/DevCenter/setuptools#new-and-changed-setup-keywords\n\"\"\"\n\n# --------------------------------------------------------------------------- #\n# initialization\n# --------------------------------------------------------------------------- #\ntry:  # if not installed, install and proceed\n    from setuptools import setup, find_packages\nexcept ImportError:\n    from ez_setup import use_setuptools\n    use_setuptools()\n    from setuptools import setup, find_packages\n\ntry:\n    from setup_commands import command_classes\nexcept ImportError:\n    command_classes={}\nfrom pymodbus import __version__, __author__, __maintainer__\n\nwith open('requirements.txt') as reqs:\n    install_requires = [\n        line for line in reqs.read().split('\\n')\n        if (line and not line.startswith('--'))\n    ]\n    install_requires.append(\"pyserial >= 3.4\")\n# --------------------------------------------------------------------------- #\n# configuration\n# --------------------------------------------------------------------------- #\nsetup(\n    name=\"pymodbus\",\n    version=__version__,\n    description=\"A fully featured modbus protocol stack in python\",\n    long_description=\"\"\"\n        Pymodbus aims to be a fully implemented modbus protocol stack \n        implemented using twisted/asyncio/tornado.  \n        Its orignal goal was to allow simulation of thousands of modbus devices\n        on a single machine for monitoring software testing.\n    \"\"\",\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: Console',\n        'Environment :: X11 Applications :: GTK',\n        'Framework :: Twisted',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: POSIX :: Linux',\n        'Operating System :: Unix',\n        'Programming Language :: Python',\n        'Topic :: System :: Networking',\n        'Topic :: Utilities'\n    ],\n    keywords='modbus, twisted, scada',\n    author=__author__,\n    author_email='bashwork@gmail.com',\n    maintainer=__maintainer__,\n    maintainer_email='otlasanju@gmail.com',\n    url='https://github.com/riptideio/pymodbus/',\n    license='BSD',\n    packages=find_packages(exclude=['examples', 'test']),\n    exclude_package_data={'': ['examples', 'test', 'tools', 'doc']},\n    py_modules=['ez_setup'],\n    platforms=['Linux', 'Mac OS X', 'Win'],\n    include_package_data=True,\n    zip_safe=True,\n    install_requires=install_requires,\n    extras_require={\n        'quality': [\n            'coverage >= 3.5.3',\n            'nose >= 1.2.1',\n            'mock >= 1.0.0',\n            'pep8 >= 1.3.3'\n        ],\n        'documents': ['sphinx >= 1.1.3',\n                      'sphinx_rtd_theme',\n                      'humanfriendly'],\n        'twisted': [\n            'twisted >= 12.2.0',\n            'pyasn1 >= 0.1.4',\n        ],\n        'tornado': [\n            'tornado >= 4.5.3'\n        ],\n        'repl': [\n            'click>=6.7',\n            'prompt-toolkit==2.0.4',\n            'pygments==2.2.0'\n        ]\n    },\n    entry_points={\n        'console_scripts': ['pymodbus.console=pymodbus.repl.main:main'],\n    },\n    test_suite='nose.collector',\n    cmdclass=command_classes,\n)\n\n", "path": "setup.py"}]}