From 7ab98c1b25d4a13331c81bed11dab54133e88ce7 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 5 Sep 2009 16:09:44 +0200 Subject: [PATCH] * delete or text files to hacking/ directory. * split license file into authors and license file, minor fixes. * minor unicode fixes --HG-- branch : trunk --- AUTHORS | 10 ++++ LICENSE | 21 +++++++- hacking/{NOTES => execnet-impl-notes.txt} | 0 .../TODO.txt => hacking/execnet_path.txt | 2 + hacking/improve-remote-tracebacks.txt | 31 ------------ {py/path => hacking}/notes-svn-quoting.txt | 0 py/LICENSE | 49 ------------------- py/__init__.py | 3 +- py/rest/resthtml.py | 2 +- py/test/dist/mypickle.py | 8 ++- 10 files changed, 42 insertions(+), 84 deletions(-) create mode 100644 AUTHORS mode change 120000 => 100644 LICENSE rename hacking/{NOTES => execnet-impl-notes.txt} (100%) rename py/path/gateway/TODO.txt => hacking/execnet_path.txt (96%) delete mode 100644 hacking/improve-remote-tracebacks.txt rename {py/path => hacking}/notes-svn-quoting.txt (100%) delete mode 100644 py/LICENSE diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..9a55b453c --- /dev/null +++ b/AUTHORS @@ -0,0 +1,10 @@ +Holger Krekel, holger at merlinux eu +Guido Wesdorp, johnny at johnnydebris net +Samuele Pedroni, pedronis at openend se +Carl Friedrich Bolz, cfbolz at gmx de +Benjamin Peterson, benjamin@python.org +Armin Rigo, arigo at tunes org +Maciek Fijalkowski, fijal at genesilico.pl +Brian Dorsey, briandorsey at gmail com +merlinux GmbH, Germany, office at merlinux eu + diff --git a/LICENSE b/LICENSE deleted file mode 120000 index 3916913c4..000000000 --- a/LICENSE +++ /dev/null @@ -1 +0,0 @@ -py/LICENSE \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..4099bb3e4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +All files in the 'py' directory are licensed under the MIT license: + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + diff --git a/hacking/NOTES b/hacking/execnet-impl-notes.txt similarity index 100% rename from hacking/NOTES rename to hacking/execnet-impl-notes.txt diff --git a/py/path/gateway/TODO.txt b/hacking/execnet_path.txt similarity index 96% rename from py/path/gateway/TODO.txt rename to hacking/execnet_path.txt index da94d17f2..f10c88e99 100644 --- a/py/path/gateway/TODO.txt +++ b/hacking/execnet_path.txt @@ -1,3 +1,5 @@ +Execnet / Path combination + I think the nice code in this directory should be refactored so that you can use it like this: diff --git a/hacking/improve-remote-tracebacks.txt b/hacking/improve-remote-tracebacks.txt deleted file mode 100644 index 5d06f0183..000000000 --- a/hacking/improve-remote-tracebacks.txt +++ /dev/null @@ -1,31 +0,0 @@ -Goal: "remote" tracebacks have file/lineno references to local source code - -Current Problem: - tracebacks have file/lineno references that point to one - large file (consisting of all source code of all modules that - we sent as a bootstrap). Makes debugging execnet harder. - -solution variant 0: minimal change to source code - at master side: send name/source pairs - at slave side: put each module into own file, re-using basename of source file - -solution variant 1: aimed at simplicity - pack and send zip of py lib containing py.__.execnet, py.__.thread, etc - put this into some file-location at the other side, add it to sys.path - (or experiment with zipfile-imports over RAM and sys.meta_hooks/path_hooks) - -solution variant 2: aimed at minimizing bandwidth usage - - initiating side receiving side - ------------------------------------------------------------- - loop: - send [dottedname1: hash1] - serve_hash_requests - if not lookup(hash1): - send(dottedname1: hash1) - content = receive(hash1) - else: - content = get(hash1) - - - diff --git a/py/path/notes-svn-quoting.txt b/hacking/notes-svn-quoting.txt similarity index 100% rename from py/path/notes-svn-quoting.txt rename to hacking/notes-svn-quoting.txt diff --git a/py/LICENSE b/py/LICENSE deleted file mode 100644 index 5f7e5afe3..000000000 --- a/py/LICENSE +++ /dev/null @@ -1,49 +0,0 @@ -py lib Copyright holders, 2003-2009 -======================================= - -The files in the 'py' directory are copyrighted by one or more -of the following people and organizations: - - Holger Krekel, holger at merlinux eu - Guido Wesdorp, johnny at johnnydebris net - Samuele Pedroni, pedronis at openend se - Carl Friedrich Bolz, cfbolz at gmx de - Armin Rigo, arigo at tunes org - Maciek Fijalkowski, fijal at genesilico.pl - Brian Dorsey, briandorsey at gmail com - merlinux GmbH, Germany, office at merlinux eu - -Contributors include:: - - Chris Lamb - Harald Armin Massa - Ralf Schmitt - Martijn Faassen - Ian Bicking - Jan Balster - Grig Gheorghiu - Bob Ippolito - Christian Tismer - -Except when otherwise stated (look for LICENSE files or information at -the beginning of each file) all files in the 'py' directory are -licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - diff --git a/py/__init__.py b/py/__init__.py index e2f9fe857..40835e1ce 100644 --- a/py/__init__.py +++ b/py/__init__.py @@ -15,7 +15,8 @@ For questions please check out http://pylib.org/contact.html .. _`py.execnet`: http://pylib.org/execnet.html .. _`py.path`: http://pylib.org/path.html .. _`py.code`: http://pylib.org/code.html - + +(c) Holger Krekel and others, 2009 """ from py.initpkg import initpkg trunk = "trunk" diff --git a/py/rest/resthtml.py b/py/rest/resthtml.py index 502302e6c..edba3a4a5 100644 --- a/py/rest/resthtml.py +++ b/py/rest/resthtml.py @@ -53,7 +53,7 @@ def process(txtpath, encoding='latin1'): stylesheet = None content = unicode(txtpath.read(), encoding) doc = convert_rest_html(content, txtpath, stylesheet=stylesheet, encoding=encoding) - htmlpath.write(doc) + htmlpath.open('wb').write(doc) #log("wrote %r" % htmlpath) #if txtpath.check(svnwc=1, versioned=1): # info = txtpath.info() diff --git a/py/test/dist/mypickle.py b/py/test/dist/mypickle.py index 34d0a4d53..386883196 100644 --- a/py/test/dist/mypickle.py +++ b/py/test/dist/mypickle.py @@ -14,7 +14,7 @@ import py from py.__.execnet.gateway_base import Channel -import sys, os +import sys, os, struct #debug = open("log-mypickle-%d" % os.getpid(), 'w') if sys.version_info >= (3,0): @@ -49,6 +49,12 @@ class MyPickler(Pickler): self.write(self.put(key)) self.memo[id(obj)] = key, obj + #if sys.version_info < (3,0): + # def save_string(self, obj, pack=struct.pack): + # obj = unicode(obj) + # self.save_unicode(obj, pack=pack) + # Pickler.dispatch[str] = save_string + class ImmutablePickler: def __init__(self, uneven, protocol=0): """ ImmutablePicklers are instantiated in Pairs.