Skip to content

Commit

Permalink
Merge pull request #130 from gatech-csl/6.0_development
Browse files Browse the repository at this point in the history
6.0 development
  • Loading branch information
Nigel2016 authored Dec 16, 2019
2 parents 1a6964d + 048f40e commit 48fc90d
Show file tree
Hide file tree
Showing 1,484 changed files with 370,951 additions and 51,944 deletions.
5 changes: 2 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<loadproperties srcFile="${basedir}/build.properties"
if:set="build.properties.exists" />


<!-- Project metadata -->
<property name="release" value="-snapshot" unless:set="release" />

Expand All @@ -42,8 +41,8 @@

<!-- Other metadata -->
<property name="jes.vendor" value="Georgia Institute of Technology" />
<property name="jes.copyright" value="© 2015 Matthew Frazier, Mark Guzdial, and others" />
<property name="jes.version" value="5.02" />
<property name="jes.copyright" value="© 2019 Matthew Frazier, Mark Guzdial, and others" />
<property name="jes.version" value="6.0" />
<property name="jes.release" value="${jes.version}${release}" />

<tstamp>
Expand Down
Binary file modified dependencies/jars/jMusic1.7.jar
Binary file not shown.
Binary file removed dependencies/jars/jython-2.5.3.jar
Binary file not shown.
Binary file added dependencies/jars/jython-2.7.1b3.jar
Binary file not shown.
139 changes: 110 additions & 29 deletions dependencies/jython/ACKNOWLEDGMENTS
Original file line number Diff line number Diff line change
@@ -1,46 +1,84 @@
# -*- coding: utf-8 -*-
ACKNOWLEDGMENTS
Copyright � Corporation for National Research Initiatives

Jim Hugunin invented JPython and was the primary developer while
he was at CNRI. In February 1999, Jim left CNRI for sunny
California and Barry Warsaw became the primary maintainer.
When Barry and the rest of PythonLabs left CNRI, Barry renamed
JPython to Jython, put the sources on SourceForge and made
Finn Bock the primary maintainer.
Jython: Python for the Java Platform

Python's inventor Guido van Rossum and the rest of PythonLabs
continues to help and support Jython by their understanding
of how Jython must live with the limits of Java.
Copyright (c) 2000-2016 Jython Developers.
All rights reserved.

You can contact the Jython maintainers directly via
[email protected], or the Jython community at
[email protected].
Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Harry Mantakos contributed the underlying md5 implementation.
Copyright (c) 2000 The Apache Software Foundation.
All rights reserved.

The SHA1 implementation is taken from cryptix.
Copyright (c) 1995-2000 Corporation for National Research Initiatives.
All Rights Reserved.

Samuele Pedroni has designed and implemented the improved
PackageManagers and java reload support and also fixed a lot
of bugs.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.

Kevin Butler has written and contributed the code for os.environ and
os.system().
Jython links the following libraries:

Brian Zimmer contributed zxJDBC which is a Python DB API subsystem.
* Antlr 3, licensed under the Antlr 3 (BSD) license
* ASM 5, licensed under a BSD license from France Télécom
* BouncyCastle, licensed under a MIT license from The Legion of the
Bouncy Castle Inc.
* Apache Commons Compression and Xerces, licensed under an Apache 2.0
License from the Apache Software Foundation
* Google Guava, licensed under an Apache 2.0 License from Google
* ICU4J, licensed under a BSD license ("ICU License") from IBM and others
* Jar Jar Links, licensed under the Apache 2.0 License from Tonic Systems
* Java Native Runtime, licensed under the Common Public License
* JLine2, licensed under a BSD license
* JUnit, licenseed under Eclipse Public License 1.0 from the JUnit project
* Mock Runner, licensed under the Apache 1.1 license
* Netty 4, licensed under the Apache 2.0 license from the Netty project
* PyPy datetime module, licensed under the MIT License from the PyPy project
* Java sizeof, licensed under the Apache 2.0 License from the Apache Software Foundation

Cyrille Morvan has written the code for the Jythonc ant task.
Jython follows closely the Python language and its reference
implementation CPython, as created by Guido van Rossum.
Jython 2.7 corresponds to CPython 2.7.

Alan Kennedy contributed modjy, which bridges WSGI to the Servlet API
Jython started as JPython, created by Jim Hugunin in 1997. JPython was
renamed to Jython by Barry Warsaw in 1999 with the 2.0 release. Since
then, Jython 2.x releases have corresponded to equivalent CPython 2.x
releases.

Chris Gokey, David Syer and Finn Bock added PyServlet.
Jython includes, modifying as necessary, the CPython standard library,
other code objects, in certain cases ported from C to either Python
and/or Java, and other components such as documentation. These
components are licensed, like Jython itself, under the Python Software
Foundation License version 2 from the Python Software Foundation.

Contacts:

* Jython developers [email protected]
* Jython user community [email protected].

Samuele Pedroni contributed package manager support.

Brian Zimmer contributed zxJDBC to provide Python DB API using JDBC.

Cyrille Morvan contributed the code for the Jythonc ant task.

Alan Kennedy contributed modjy, which bridges WSGI to the Servlet API

Chris Gokey, David Syer and Finn Bock added PyServlet.

Yin Wang and Steve Yegge contributed the static analyzer from Google (also called indexer).
Yin Wang and Steve Yegge contributed the static analyzer from Google
(also called indexer).

The Jython bash startup script (fallback for bin/jython) was adapted
from the similar script written for JRuby.

A huge thanks goes to all the members of the jpython/jython
mailing lists. Other folks who have contributed to JPython and
Jython in ways large and small, in no particular order:
A huge thanks goes to all the members of the jpython/jython
mailing lists. Other folks who have contributed to JPython and
Jython in ways large and small, in no particular order:

Kevin Butler
Harry Mantakos
Greg Ward
Tony Plate
Jim Althoff
Expand Down Expand Up @@ -75,7 +113,7 @@ Copyright
Geoffrey French
Tobias Ivarsson
Lino Mastrodomenico
S�bastien Boisg�rault
Sébastien Boisgérault
Jim Baker
Charlie Groves
Otmar Humbel
Expand All @@ -93,6 +131,49 @@ Copyright
Costantino Cerbo
Alex Groenholm
Anselm Kruis
Andreas Stührk
Dmitry Jemerov
Miki Tebeka
Jeff Allen
Julian Kennedy
Arfrever Frehtes Taifersar Arahesis
Andreas Stührk
Christian Klein
Jezreel Ng
Santoso Wijaya
Brandon Pedersen
Chris Simpson
Indra Talip
Michael Büsch
Richard Eckart de Castilho
Timothée Lecomte
Peter Holloway
Werner Mendizabal
Henning Jacobs
Darjus Loktevic
Raphael Jolly
Yuji Yamano
Pekka Klärck
Nathaniel Kenmir
Jiwon Seo
Dieter Vandenbussche
Paolo Dina
Eliya Sadan
Stefan Richthofer
Jason Madden
Daniel Martin
Richard Fearn
Adam Burke
Eric L Frederich
Tom Alexander
Caleb P. Burns
Stephen Drake
Jan Vorwerk
Eli Oxman
Robert Patrick
Kevin Edwards
Jaime Saiz
Nick Bailey

Local Variables:
mode: indented-text
Expand Down
88 changes: 62 additions & 26 deletions dependencies/jython/Lib/BaseHTTPServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@
import sys
import time
import socket # For gethostbyaddr()
import mimetools
from warnings import filterwarnings, catch_warnings
with catch_warnings():
if sys.py3kwarning:
filterwarnings("ignore", ".*mimetools has been removed",
DeprecationWarning)
import mimetools
import SocketServer

# Default error message
# Default error message template
DEFAULT_ERROR_MESSAGE = """\
<head>
<title>Error response</title>
Expand All @@ -89,6 +94,8 @@
</body>
"""

DEFAULT_ERROR_CONTENT_TYPE = "text/html"

def _quote_html(html):
return html.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")

Expand All @@ -99,6 +106,17 @@ class HTTPServer(SocketServer.TCPServer):
def server_bind(self):
"""Override server_bind to store the server name."""
SocketServer.TCPServer.server_bind(self)
try:
host, port = self.socket.getsockname()[:2]
self.server_name = socket.getfqdn(host)
self.server_port = port
except socket.error:
pass

def server_activate(self):
SocketServer.TCPServer.server_activate(self)
# Adding a second call to getsockname() because of this issue
# http://wiki.python.org/jython/NewSocketModule#Deferredsocketcreationonjython
host, port = self.socket.getsockname()[:2]
self.server_name = socket.getfqdn(host)
self.server_port = port
Expand Down Expand Up @@ -216,6 +234,12 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
# where each string is of the form name[/version].
server_version = "BaseHTTP/" + __version__

# The default request version. This only affects responses up until
# the point where the request line is parsed, so it mainly decides what
# the client gets back when sending a malformed request line.
# Most web servers default to HTTP 0.9, i.e. don't send a status line.
default_request_version = "HTTP/0.9"

def parse_request(self):
"""Parse a request (internal).
Expand All @@ -228,17 +252,14 @@ def parse_request(self):
"""
self.command = None # set in case of error on the first line
self.request_version = version = "HTTP/0.9" # Default
self.request_version = version = self.default_request_version
self.close_connection = 1
requestline = self.raw_requestline
if requestline[-2:] == '\r\n':
requestline = requestline[:-2]
elif requestline[-1:] == '\n':
requestline = requestline[:-1]
requestline = requestline.rstrip('\r\n')
self.requestline = requestline
words = requestline.split()
if len(words) == 3:
[command, path, version] = words
command, path, version = words
if version[:5] != 'HTTP/':
self.send_error(400, "Bad request version (%r)" % version)
return False
Expand All @@ -264,7 +285,7 @@ def parse_request(self):
"Invalid HTTP Version (%s)" % base_version_number)
return False
elif len(words) == 2:
[command, path] = words
command, path = words
self.close_connection = 1
if command != 'GET':
self.send_error(400,
Expand Down Expand Up @@ -296,18 +317,32 @@ def handle_one_request(self):
commands such as GET and POST.
"""
self.raw_requestline = self.rfile.readline()
if not self.raw_requestline:
try:
self.raw_requestline = self.rfile.readline(65537)
if len(self.raw_requestline) > 65536:
self.requestline = ''
self.request_version = ''
self.command = ''
self.send_error(414)
return
if not self.raw_requestline:
self.close_connection = 1
return
if not self.parse_request():
# An error code has been sent, just exit
return
mname = 'do_' + self.command
if not hasattr(self, mname):
self.send_error(501, "Unsupported method (%r)" % self.command)
return
method = getattr(self, mname)
method()
self.wfile.flush() #actually send the response if not already done.
except socket.timeout, e:
#a read or a write timed out. Discard this connection
self.log_error("Request timed out: %r", e)
self.close_connection = 1
return
if not self.parse_request(): # An error code has been sent, just exit
return
mname = 'do_' + self.command
if not hasattr(self, mname):
self.send_error(501, "Unsupported method (%r)" % self.command)
return
method = getattr(self, mname)
method()

def handle(self):
"""Handle multiple requests if necessary."""
Expand Down Expand Up @@ -342,13 +377,14 @@ def send_error(self, code, message=None):
content = (self.error_message_format %
{'code': code, 'message': _quote_html(message), 'explain': explain})
self.send_response(code, message)
self.send_header("Content-Type", "text/html")
self.send_header("Content-Type", self.error_content_type)
self.send_header('Connection', 'close')
self.end_headers()
if self.command != 'HEAD' and code >= 200 and code not in (204, 304):
self.wfile.write(content)

error_message_format = DEFAULT_ERROR_MESSAGE
error_content_type = DEFAULT_ERROR_CONTENT_TYPE

def send_response(self, code, message=None):
"""Send the response header and log the response code.
Expand Down Expand Up @@ -396,7 +432,7 @@ def log_request(self, code='-', size='-'):
self.log_message('"%s" %s %s',
self.requestline, str(code), str(size))

def log_error(self, *args):
def log_error(self, format, *args):
"""Log an error.
This is called when a request cannot be fulfilled. By
Expand All @@ -408,7 +444,7 @@ def log_error(self, *args):
"""

self.log_message(*args)
self.log_message(format, *args)

def log_message(self, format, *args):
"""Log an arbitrary message.
Expand All @@ -422,13 +458,13 @@ def log_message(self, format, *args):
specified as subsequent arguments (it's just like
printf!).
The client host and current date/time are prefixed to
every message.
The client ip address and current date/time are prefixed to every
message.
"""

sys.stderr.write("%s - - [%s] %s\n" %
(self.address_string(),
(self.client_address[0],
self.log_date_time_string(),
format%args))

Expand Down Expand Up @@ -521,7 +557,7 @@ def address_string(self):
'Request forbidden -- authorization will not help'),
404: ('Not Found', 'Nothing matches the given URI'),
405: ('Method Not Allowed',
'Specified method is invalid for this server.'),
'Specified method is invalid for this resource.'),
406: ('Not Acceptable', 'URI not available in preferred format.'),
407: ('Proxy Authentication Required', 'You must authenticate with '
'this proxy before proceeding.'),
Expand Down
Loading

0 comments on commit 48fc90d

Please sign in to comment.