Skip to content

Commit

Permalink
tag: ppft-1.6.4.5 (release of pp fork as standalone package ppft)
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.mystic.cacr.caltech.edu/pathos/ppft@733 8bfda07e-5b16-0410-ab1d-fd04ec2748df
  • Loading branch information
mmckerns committed Jan 14, 2015
0 parents commit 2dbe69c
Show file tree
Hide file tree
Showing 34 changed files with 6,329 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Vitalii Vanovschi - support@parallelpython.com
77 changes: 77 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
pp-1.6.4:
1) Start ppworker using -m
2) Fixed windows compatibility issue.

pp-1.6.3:
1) Added -P pid_file command line argument to ppserver.py
2) Modified print_stats() to output the number of active tasks.
3) Added SIGUSR1 handler to ppserver.py to print stats when signal is received.

pp-1.6.2:
1) Made socket timeout configurable via constructor argument socket_timeout and command line argument of ppserver.py -k.
2) Fixed sresult referenced before assignment bug
3) Removed shell from subprocess.Popen call.
4) Fixed race condition in autodiscovery.

pp-1.6.1:
1) Fixed struct.unpack("!Q", size_packed) bug which started to happen with Python 2.7 on certain platforms.
2) Fixed bug with auto-discovery not working after ppserver is restarted.
3) Added full support of python import statements.
For instance "from numpy.linalg import det as determinant" is now supported.
For compatibility old module name imports will continue to work.
4) Exposed more detailed network error messages in ppserver.py.

pp-1.6.0:
1) Changed logging mechanism. Now logger is obtained as logging.getLogger('pp').
2) Modified ppworker to use exec instead of eval.
3) Modified exception handling on destruction. Now if server was destroyed,
uncompleted jobs throw DestroyedServerError exception on call.
4) Fixed issue with submitting a method of an instance of a class inherited from another.
5) Added timeouts to all socket operations.
6) Changed default proto type to 2.
7) Moved from thread module to threading. Made all pp threads daemons.
8 ) Refactored ppserver.py to improve testability
9) Fixed bug with ppsecret in user module
Changes w.r.t RC1:
10) Fixed issue with argument which is an instance of an imported class
Changes w.r.t RC2:
11) Fixed DEBUG logging in ppserver.
12) Added a flag (-f) to ppserver to set a custom log format. Changed default log format.
13) Made printing of the expected exceptions optional and improved the way they are handled.
14) Removed default logging handler from pp module (to improve logging flexibility).
Changes w.r.t RC3:
15) Created a common module ppcommon.py and moved common functions there.
16) Fixed issue with pipes not being closed.
Changes w.r.t. RC4:
17) Fixed issues with ppserver exiting on first connection.
18) Fixed deadlock when using ppworker restart option.
19) Enables support for submodule importing.

pp-1.5.7:
1) Added ppworker restart after task completion functionality
2) Added pickle protocol option
3) Merged patch for Python 2.6 compatibility (contributed by mrtss)
4) Merged patch for config file support (contributed by stevemilner)
5) Documentation has been moved to doc folder

pp-1.5.6
1) Fixed problem with autodiscovery service on Winsows XP and Vista
2) Merged new code quality improvement patches (contributed by stevemilner)

pp-1.5.5
1) Fixed bug which caused segmentation fault when calling destroy() method.
2) Merged performance and quality improvement patches (contributed by stevemilner)

pp-1.5.4
1) Fixed bug with unindented comments
2) easy_intall functionality repaired
3) Code quality improved (many small changes)

pp-1.5.3
1) Added support for methods of new-style classes.
2) Added ability to read secret key from pp_secret variable of .pythonrc.py
3) ppdoc.html and ppserver.1 are included in the distribution
4) examples bundled with the distribution
CHANGELOG started

* - nicknames of the contributors refer to the PP forum profile login names.
25 changes: 25 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Parallel Python Software: http://www.parallelpython.com
Copyright (c) 2005-2012, Vitalii Vanovschi
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
17 changes: 17 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include AUTHORS
include COPYING
include MANIFEST.in
include CHANGELOG
include PKG-INFO
include README.md
include python-restlib.spec
include examples/auto_diff.py
include examples/callback.py
include examples/dynamic_ncpus.py
include examples/quicksort.py
include examples/reverse_md5.py
include examples/sum_primes.py
include examples/sum_primes_functor.py
recursive-include doc *
recursive-include python2 *
recursive-include python3 *
101 changes: 101 additions & 0 deletions MODS.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
Only in ppft: MODS.diff
Only in ppft: MODS2.diff
Only in ppft: MODS3.diff
Only in ppft: MODSe.diff
Only in pp-1.6.4: README
Only in ppft: README.md
Only in ppft: README_MODS
Common subdirectories: pp-1.6.4/doc and ppft/doc
Common subdirectories: pp-1.6.4/examples and ppft/examples
Only in pp-1.6.4: pp.py
Only in pp-1.6.4: ppauto.py
Only in pp-1.6.4: ppcommon.py
Only in pp-1.6.4: ppserver.py
Only in pp-1.6.4: pptransport.py
Only in pp-1.6.4: ppworker.py
Only in ppft: python2
Only in ppft: python3
diff pp-1.6.4/MANIFEST.in ppft/MANIFEST.in
6c6
< include README
---
> include README.md
15a16,17
> recursive-include python2 *
> recursive-include python3 *
diff pp-1.6.4/setup.py ppft/setup.py
9,10c9,12
< import os.path
< from distutils.core import setup
---
> import sys
> import os, os.path
> pyversion = sys.version_info[0]
> pkgdir = 'python%s' % pyversion
12c14,27
< from pp import version as VERSION
---
> try:
> from setuptools import setup
> has_setuptools = True
> except ImportError:
> from distutils.core import setup
> has_setuptools = False
>
> # os.chdir(pkgdir)
> # sys.path.insert(0, '.')
> # from ppcommon import __version__ as VERSION
> VERSION = '1.6.4.5'
> # sys.path.pop(0)
> # if os.path.exists('ppcommon.pyc'): os.remove('ppcommon.pyc')
> # os.chdir('..')
26,40c41,57
< setup(
< name="pp",
< url="http://www.parallelpython.com",
< version=VERSION,
< download_url="http://www.parallelpython.com/downloads/pp/pp-%s.zip" % (
< VERSION),
< author="Vitalii Vanovschi",
< author_email="support@parallelpython.com",
< py_modules=["pp", "ppauto", "ppcommon", "pptransport", "ppworker"],
< scripts=["ppserver.py"],
< description="Parallel and distributed programming for Python",
< platforms=["Windows", "Linux", "Unix"],
< long_description=LONG_DESCRIPTION,
< license="BSD-like",
< classifiers=[
---
> kwds = {
> "name" : "ppft",
> "url" : "http://www.parallelpython.com",
> "version" : VERSION,
> "download_url" : "http://dev.danse.us/packages/",
> "author" : "Vitalii Vanovschi",
> "author_email" : "support@parallelpython.com",
> "maintainer" : "Mike McKerns",
> "maintainer_email" : "mmckerns@caltech.edu",
> "package_dir" : {'': pkgdir},
> "py_modules" : ["pp", "ppauto", "ppcommon", "pptransport", "ppworker"],
> "scripts" : ["%s/ppserver.py" % pkgdir],
> "description" : "Parallel and distributed programming for Python",
> "platforms" : ["Windows", "Linux", "Unix"],
> "long_description" : LONG_DESCRIPTION,
> "license" : "BSD-like",
> "classifiers" : [
50c67,79
< )
---
> }
>
> if has_setuptools:
> kwds.update({
> "zip_safe" : False,
> })
> if has_setuptools and pyversion > 2:
> kwds.update({
> "install_requires" : ['six>=1.7.3'],
> })
>
> setup(**kwds)
>
153 changes: 153 additions & 0 deletions MODS2.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
Only in pp-1.6.4: AUTHORS
Only in pp-1.6.4: CHANGELOG
Only in pp-1.6.4: COPYING
Only in pp-1.6.4: MANIFEST.in
Only in pp-1.6.4: PKG-INFO
Only in pp-1.6.4: README
Only in pp-1.6.4: doc
Only in pp-1.6.4: examples
diff pp-1.6.4/pp.py ppft/python2/pp.py
42c42,58
< import cPickle as pickle
---
> try:
> import dill as pickle
> from dill.source import importable
> from dill.source import getname
> from dill.source import _wrap
> except ImportError:
> import cPickle as pickle
> def importable(func): # the original code
> #get lines of the source and adjust indent
> sourcelines = inspect.getsourcelines(func)[0]
> #remove indentation from the first line
> sourcelines[0] = sourcelines[0].lstrip()
> return "".join(sourcelines)
> def getname(obj): # just get __name__
> return obj.__name__
> def _wrap(f): # do nothing
> return f
48c64
< version = "1.6.4"
---
> __version__ = version = "1.6.4.5"
352c368
< port = Server.default_port
---
> port = ppcommon.randomport()
467c483
< (tid, func.func_name))
---
> (tid, getname(func)))
637a654
> # should probably just 'try' above, if fail rely on dill.dumps
639c656
< (funcs[0].func_name, sources, modules),
---
> (getname(funcs[0]), sources, modules),
703,707c720
< #get lines of the source and adjust indent
< sourcelines = inspect.getsourcelines(func)[0]
< #remove indentation from the first line
< sourcelines[0] = sourcelines[0].lstrip()
< self.__sourcesHM[hashf] = "".join(sourcelines)
---
> self.__sourcesHM[hashf] = importable(func)
diff pp-1.6.4/ppauto.py ppft/python2/ppauto.py
40c40
< version = "1.6.4"
---
> __version__ = version = "1.6.4.5"
diff pp-1.6.4/ppcommon.py ppft/python2/ppcommon.py
36c36
< version = "1.6.4"
---
> __version__ = version = "1.6.4.5"
62a63,115
>
> class portnumber(object):
> '''port selector
>
> Usage:
> >>> pick = portnumber(min=1024,max=65535)
> >>> print( pick() )
> '''
>
> def __init__(self, min=0, max=64*1024):
> '''select a port number from a given range.
>
> The first call will return a random number from the available range,
> and each subsequent call will return the next number in the range.
>
> Inputs:
> min -- minimum port number [default = 0]
> max -- maximum port number [default = 65536]
> '''
> self.min = min
> self.max = max
> self.first = -1
> self.current = -1
> return
>
> def __call__(self):
> import random
>
> if self.current < 0: #first call
> self.current = random.randint(self.min, self.max)
> self.first = self.current
> return self.current
> else:
> self.current += 1
>
> if self.current > self.max:
> self.current = self.min
> if self.current == self.first:
> raise RuntimeError( 'Range exhausted' )
> return self.current
> return
>
>
> def randomport(min=1024, max=65536):
> '''select a random port number
>
> Inputs:
> min -- minimum port number [default = 1024]
> max -- maximum port number [default = 65536]
> '''
> return portnumber(min, max)()
>
>
diff pp-1.6.4/ppserver.py ppft/python2/ppserver.py
32a33
> from __future__ import with_statement
53c54
< version = "1.6.4"
---
> __version__ = version = "1.6.4.5"
84c85
< self.port = self.default_port
---
> self.port = ppcommon.randomport()
139c140,141
< except socket.error as e:
---
> except socket.error:
> e = sys.exc_info()[1]
diff pp-1.6.4/pptransport.py ppft/python2/pptransport.py
40c40
< version = "1.6.4"
---
> __version__ = version = "1.6.4.5"
diff pp-1.6.4/ppworker.py ppft/python2/ppworker.py
35c35,38
< import cPickle as pickle
---
> try:
> import dill as pickle
> except ImportError:
> import cPickle as pickle
39c42
< version = "1.6.4"
---
> __version__ = version = "1.6.4.5"
Only in pp-1.6.4: setup.py

0 comments on commit 2dbe69c

Please sign in to comment.