Skip to content

Commit 7dbaf0c

Browse files
authored
Merge pull request #2 from IronLanguages/ipy-2.7-maint
2 parents 31f5c88 + a949455 commit 7dbaf0c

16,030 files changed

Lines changed: 115279 additions & 2011198 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ root = true
55
indent_style = space
66
indent_size = 4
77

8+
[*.cs]
9+
csharp_new_line_before_open_brace = none
10+
csharp_new_line_before_else = false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*.exe binary
3030
*.bmp binary
3131
*.zip binary
32+
*.pickle binary
3233

3334
# Do not normalize on commit.
3435
*.pdf -text

.gitignore

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@ bin/
66
/bin/
77
/Stage
88
/Packages
9+
/.vscode
10+
11+
#Backup files
12+
*.bak
913

1014
# Temporary VS files
1115
*.suo
1216
*.csproj.user
1317
*.wixproj.user
1418
*.pidb
19+
*.db
20+
*.opendb
21+
*.lock.json
22+
*.nuget.targets
23+
24+
# Visual Studio 2015 cache/options directory
25+
.vs/
1526

1627
# Generated files
1728
BuildInfo.Generated.cs
@@ -22,29 +33,17 @@ Solutions/TestResults/
2233
Runtime/Samples/Hosting/Scenarios/bin/
2334

2435
# TODO - testing scripts should not create these files
25-
debug.log
2636
External.LCA_RESTRICTED/Languages/IronPython/27/Lib/@test_*
27-
External.LCA_RESTRICTED/Languages/IronPython/27/Lib/lib2to3/Grammar2.9.9.alpha.0.pickle
28-
External.LCA_RESTRICTED/Languages/IronPython/27/Lib/lib2to3/PatternGrammar2.9.9.alpha.0.pickle
29-
Languages/IronPython/Tests/ImportTestDir/
30-
Languages/IronPython/Tests/InheritanceTypes.dll
31-
Languages/IronPython/Tests/OutterDir/
32-
Languages/IronPython/Tests/another.py
33-
Languages/IronPython/Tests/cached_type_dll.dll
34-
Languages/IronPython/Tests/cp7007/
35-
Languages/IronPython/Tests/finaltest.dll
36-
Languages/IronPython/Tests/foo
37-
Languages/IronPython/Tests/imfpstart.tpy
38-
Languages/IronPython/Tests/impcp13736.py
39-
Languages/IronPython/Tests/impmodfrmpkg/
40-
Languages/IronPython/Tests/onlyread.tmp
41-
Languages/IronPython/Tests/onlywrite.tmp
42-
Languages/IronPython/Tests/tempFile1.tpy
43-
Languages/IronPython/Tests/temp_syspath_none.py
44-
Languages/IronPython/Tests/test.dll
45-
Languages/IronPython/Tests/test.pyil
46-
Languages/IronPython/Tests/test.xaml
47-
Languages/IronPython/Tests/testfile.tmp
48-
Languages/IronPython/Tests/testilcode.dll
49-
Languages/IronPython/Tests/the_dir/
50-
Languages/IronPython/Tests/vbproptest0.*.dll
37+
38+
# created by CPython tests
39+
External.LCA_RESTRICTED/Languages/IronPython/27/Lib/lib2to3/Grammar*.pickle
40+
External.LCA_RESTRICTED/Languages/IronPython/27/Lib/lib2to3/PatternGrammar*.pickle
41+
42+
# created by side by side tests
43+
Languages/IronPython/Tests/compat/*.log
44+
Languages/IronPython/Tests/compat/*.pyc
45+
Languages/IronPython/Tests/compat/*/*.pyc
46+
Languages/IronPython/Tests/compat/sbs_library.dll
47+
Languages/IronPython/Tests/compat/tempfile.txt
48+
Languages/IronPython/Tests/Tools/stdmodules.py.stdout.log
49+
Languages/IronPython/Tests/test_data.gz

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: csharp
2+
3+
sudo: required
4+
5+
env:
6+
- CONFIGURATION=Release
7+
8+
mono:
9+
- 4.8.0
10+
11+
solution: Solutions/IronPython.sln
12+
13+
install:
14+
- if [[ "$TRAVIS_OS_NAME" != "osx" ]] ; then sudo apt-get install -y binfmt-support libmono-system-windows-forms4.0-cil ; fi
15+
- nuget restore Solutions/IronPython.sln
16+
17+
script:
18+
- make test-ipy-release
19+
20+
notifications:
21+
email:
22+
recipients:
23+
- slide.o.mix@gmail.com
24+
- ticotimo@gmail.com
25+
on_success: always # default: change
26+
#on_failure: [always|never|change] # default: always
27+
webhooks:
28+
urls:
29+
- https://webhooks.gitter.im/e/9fdb5c75f38c850816f8

Config/Signed/App.config

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<?xml version="1.0"?>
22
<configuration>
33
<configSections>
4-
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.1.0.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
4+
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.1.2.22, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
55
</configSections>
66

77
<microsoft.scripting>
88
<languages>
9-
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.7" type="IronPython.Runtime.PythonContext, IronPython, Version=2.7.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
10-
<language names="IronRuby;Ruby;rb" extensions=".rb" displayName="IronRuby" type="IronRuby.Runtime.RubyContext, IronRuby, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
9+
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.7" type="IronPython.Runtime.PythonContext, IronPython, Version=2.7.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
1110
</languages>
12-
13-
<options>
14-
<set language="Ruby" option="StandardLibrary" value="..\..\Languages\Ruby\StdLib"/>
15-
</options>
1611
</microsoft.scripting>
1712
</configuration>

Config/Unsigned/App.config

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
33
<configSections>
4-
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1" requirePermission="false" />
4+
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.1.2.22, Culture=neutral, PublicKeyToken=7f709c5b713576e1" requirePermission="false" />
55
</configSections>
66

77
<microsoft.scripting>
88
<languages>
9-
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.7" type="IronPython.Runtime.PythonContext, IronPython, Version=2.7.5.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1" />
10-
<language names="IronRuby;Ruby;rb" extensions=".rb" displayName="IronRuby" type="IronRuby.Runtime.RubyContext, IronRuby, Version=1.1.3.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1" />
9+
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.7" type="IronPython.Runtime.PythonContext, IronPython, Version=2.7.7.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1" />
1110
</languages>
12-
13-
<options>
14-
<set language="Ruby" option="StandardLibrary" value="..\..\Languages\Ruby\StdLib"/>
15-
</options>
1611
</microsoft.scripting>
1712
</configuration>

CurrentVersion.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
<PropertyGroup>
44
<MajorVersion>2</MajorVersion>
55
<MinorVersion>7</MinorVersion>
6-
<MicroVersion>6</MicroVersion>
6+
<MicroVersion>7</MicroVersion>
77
<!-- Allowed: alpha,beta,candidate,final -->
8-
<ReleaseLevel>alpha</ReleaseLevel>
9-
<ReleaseSerial>0</ReleaseSerial>
8+
<ReleaseLevel>candidate</ReleaseLevel>
9+
<ReleaseSerial>2</ReleaseSerial>
1010

1111
<AssemblyRevision>0</AssemblyRevision>
1212
</PropertyGroup>
1313
<PropertyGroup>
1414
<DlrMajorVersion>1</DlrMajorVersion>
1515
<DlrMinorVersion>1</DlrMinorVersion>
16-
<DlrMicroVersion>0</DlrMicroVersion>
16+
<DlrMicroVersion>2</DlrMicroVersion>
1717
<!-- Allowed: alpha,beta,candidate,final -->
18-
<DlrReleaseLevel>final</DlrReleaseLevel>
19-
<DlrReleaseSerial>0</DlrReleaseSerial>
18+
<DlrReleaseLevel>candidate</DlrReleaseLevel>
19+
<DlrReleaseSerial>2</DlrReleaseSerial>
2020

21-
<DlrAssemblyRevision>21</DlrAssemblyRevision>
21+
<DlrAssemblyRevision>22</DlrAssemblyRevision>
2222
</PropertyGroup>
2323
</Project>

External.LCA_RESTRICTED/Languages/IronPython/27/LICENSE.txt

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,9 @@ the various releases.
3636
2.1 2.0+1.6.1 2001 PSF no
3737
2.0.1 2.0+1.6.1 2001 PSF yes
3838
2.1.1 2.1+2.0.1 2001 PSF yes
39-
2.2 2.1.1 2001 PSF yes
4039
2.1.2 2.1.1 2002 PSF yes
4140
2.1.3 2.1.2 2002 PSF yes
42-
2.2.1 2.2 2002 PSF yes
43-
2.2.2 2.2.1 2002 PSF yes
44-
2.2.3 2.2.2 2003 PSF yes
45-
2.3 2.2.2 2002-2003 PSF yes
46-
2.3.1 2.3 2002-2003 PSF yes
47-
2.3.2 2.3.1 2002-2003 PSF yes
48-
2.3.3 2.3.2 2002-2003 PSF yes
49-
2.3.4 2.3.3 2004 PSF yes
50-
2.3.5 2.3.4 2005 PSF yes
51-
2.4 2.3 2004 PSF yes
52-
2.4.1 2.4 2005 PSF yes
53-
2.4.2 2.4.1 2005 PSF yes
54-
2.4.3 2.4.2 2006 PSF yes
55-
2.4.4 2.4.3 2006 PSF yes
56-
2.5 2.4 2006 PSF yes
57-
2.5.1 2.5 2007 PSF yes
58-
2.5.2 2.5.1 2008 PSF yes
59-
2.5.3 2.5.2 2008 PSF yes
60-
2.6 2.5 2008 PSF yes
61-
2.6.1 2.6 2008 PSF yes
62-
2.6.2 2.6.1 2009 PSF yes
63-
2.6.3 2.6.2 2009 PSF yes
64-
2.6.4 2.6.3 2009 PSF yes
65-
2.6.5 2.6.4 2010 PSF yes
66-
2.7 2.6 2010 PSF yes
41+
2.2 and above 2.1.1 2001-now PSF yes
6742

6843
Footnotes:
6944

@@ -98,9 +73,10 @@ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
9873
analyze, test, perform and/or display publicly, prepare derivative works,
9974
distribute, and otherwise use Python alone or in any derivative version,
10075
provided, however, that PSF's License Agreement and PSF's notice of copyright,
101-
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
102-
Python Software Foundation; All Rights Reserved" are retained in Python alone or
103-
in any derivative version prepared by Licensee.
76+
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
77+
2011, 2012, 2013, 2014, 2015, 2016 Python Software Foundation; All Rights
78+
Reserved" are retained in Python alone or in any derivative version prepared by
79+
Licensee.
10480

10581
3. In the event Licensee prepares a derivative work that is based on
10682
or incorporates Python or any part thereof, and wants to make
@@ -328,7 +304,7 @@ This copy of Python includes a copy of bzip2, which is licensed under the follow
328304
--------------------------------------------------------------------------
329305

330306
This program, "bzip2", the associated library "libbzip2", and all
331-
documentation, are copyright (C) 1996-2007 Julian R Seward. All
307+
documentation, are copyright (C) 1996-2010 Julian R Seward. All
332308
rights reserved.
333309

334310
Redistribution and use in source and binary forms, with or without
@@ -363,7 +339,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
363339
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
364340

365341
Julian Seward, jseward@bzip.org
366-
bzip2/libbzip2 version 1.0.5 of 10 December 2007
342+
bzip2/libbzip2 version 1.0.6 of 6 September 2010
367343

368344
--------------------------------------------------------------------------
369345

@@ -516,7 +492,7 @@ This copy of Python includes a copy of openssl, which is licensed under the foll
516492
---------------
517493

518494
/* ====================================================================
519-
* Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved.
495+
* Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved.
520496
*
521497
* Redistribution and use in source and binary forms, with or without
522498
* modification, are permitted provided that the following conditions
@@ -668,7 +644,7 @@ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
668644
are acquiring the software on behalf of the Department of Defense, the
669645
software shall be classified as "Commercial Computer Software" and the
670646
Government shall have only "Restricted Rights" as defined in Clause
671-
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
647+
252.227-7013 (b) (3) of DFARs. Notwithstanding the foregoing, the
672648
authors grant the U.S. Government and others acting in its behalf
673649
permission to use and distribute the software in accordance with the
674650
terms specified in this license.
@@ -710,7 +686,7 @@ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
710686
are acquiring the software on behalf of the Department of Defense, the
711687
software shall be classified as "Commercial Computer Software" and the
712688
Government shall have only "Restricted Rights" as defined in Clause
713-
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
689+
252.227-7013 (b) (3) of DFARs. Notwithstanding the foregoing, the
714690
authors grant the U.S. Government and others acting in its behalf
715691
permission to use and distribute the software in accordance with the
716692
terms specified in this license.
-40 Bytes
Binary file not shown.

External.LCA_RESTRICTED/Languages/IronPython/27/Lib/BaseHTTPServer.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,11 @@ def parse_request(self):
244244
self.request_version = version = self.default_request_version
245245
self.close_connection = 1
246246
requestline = self.raw_requestline
247-
if requestline[-2:] == '\r\n':
248-
requestline = requestline[:-2]
249-
elif requestline[-1:] == '\n':
250-
requestline = requestline[:-1]
247+
requestline = requestline.rstrip('\r\n')
251248
self.requestline = requestline
252249
words = requestline.split()
253250
if len(words) == 3:
254-
[command, path, version] = words
251+
command, path, version = words
255252
if version[:5] != 'HTTP/':
256253
self.send_error(400, "Bad request version (%r)" % version)
257254
return False
@@ -277,7 +274,7 @@ def parse_request(self):
277274
"Invalid HTTP Version (%s)" % base_version_number)
278275
return False
279276
elif len(words) == 2:
280-
[command, path] = words
277+
command, path = words
281278
self.close_connection = 1
282279
if command != 'GET':
283280
self.send_error(400,
@@ -365,14 +362,25 @@ def send_error(self, code, message=None):
365362
message = short
366363
explain = long
367364
self.log_error("code %d, message %s", code, message)
368-
# using _quote_html to prevent Cross Site Scripting attacks (see bug #1100201)
369-
content = (self.error_message_format %
370-
{'code': code, 'message': _quote_html(message), 'explain': explain})
371365
self.send_response(code, message)
372-
self.send_header("Content-Type", self.error_content_type)
373366
self.send_header('Connection', 'close')
367+
368+
# Message body is omitted for cases described in:
369+
# - RFC7230: 3.3. 1xx, 204(No Content), 304(Not Modified)
370+
# - RFC7231: 6.3.6. 205(Reset Content)
371+
content = None
372+
if code >= 200 and code not in (204, 205, 304):
373+
# HTML encode to prevent Cross Site Scripting attacks
374+
# (see bug #1100201)
375+
content = (self.error_message_format % {
376+
'code': code,
377+
'message': _quote_html(message),
378+
'explain': explain
379+
})
380+
self.send_header("Content-Type", self.error_content_type)
374381
self.end_headers()
375-
if self.command != 'HEAD' and code >= 200 and code not in (204, 304):
382+
383+
if self.command != 'HEAD' and content:
376384
self.wfile.write(content)
377385

378386
error_message_format = DEFAULT_ERROR_MESSAGE
@@ -450,13 +458,13 @@ def log_message(self, format, *args):
450458
specified as subsequent arguments (it's just like
451459
printf!).
452460
453-
The client host and current date/time are prefixed to
454-
every message.
461+
The client ip address and current date/time are prefixed to every
462+
message.
455463
456464
"""
457465

458466
sys.stderr.write("%s - - [%s] %s\n" %
459-
(self.address_string(),
467+
(self.client_address[0],
460468
self.log_date_time_string(),
461469
format%args))
462470

0 commit comments

Comments
 (0)