Skip to content

Commit 3d481e3

Browse files
authored
Update DLR and prep release (#682)
1 parent 24e9cd9 commit 3d481e3

7 files changed

Lines changed: 18 additions & 18 deletions

File tree

Build/steps.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ steps:
108108
SourceFolder: '$(Build.Repository.LocalPath)/Package/Release/Packages'
109109
Contents: |
110110
**/*.nupkg
111+
**/*.snupkg
111112
**/*.zip
112113
TargetFolder: '$(Build.ArtifactStagingDirectory)'
113114
condition: and(succeededOrFailed(), eq(variables['system.pullrequest.isfork'], false))

CurrentVersion.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
<MinorVersion>7</MinorVersion>
66
<MicroVersion>10</MicroVersion>
77
<!-- Allowed: alpha,beta,candidate,final -->
8-
<ReleaseLevel>alpha</ReleaseLevel>
9-
<ReleaseSerial>1</ReleaseSerial>
10-
8+
<ReleaseLevel>candidate</ReleaseLevel>
9+
<ReleaseSerial>1</ReleaseSerial><!-- this should only be 0 when final -->
1110
<AssemblyRevision>0</AssemblyRevision>
1211
</PropertyGroup>
1312
</Project>

Package/nuget/IronPython.nuspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
44
<id>IronPython</id>
55
<title>IronPython</title>
6-
<version>2.7.9</version>
6+
<version>2.7.10</version>
77
<authors>IronPython Contributors,Microsoft</authors>
88
<owners>IronPython Community</owners>
99
<projectUrl>http://ironpython.net</projectUrl>
@@ -16,21 +16,21 @@
1616
<tags>ironpython python dynamic dlr</tags>
1717
<dependencies>
1818
<group targetFramework="net45">
19-
<dependency id="DynamicLanguageRuntime" version="[1.2.3-alpha0]" />
19+
<dependency id="DynamicLanguageRuntime" version="[1.2.3-candidate1]" />
2020
</group>
2121
<group targetFramework="netcoreapp2.1">
2222
<dependency id="System.Text.Encoding.CodePages" version="4.6.0" />
2323
<dependency id="Microsoft.Win32.Registry" version="4.5.0" />
24-
<dependency id="DynamicLanguageRuntime" version="[1.2.3-alpha0]" />
24+
<dependency id="DynamicLanguageRuntime" version="[1.2.3-candidate1]" />
2525
</group>
2626
<group targetFramework="netstandard2.0">
2727
<dependency id="System.Text.Encoding.CodePages" version="4.6.0" />
2828
<dependency id="Microsoft.Win32.Registry" version="4.5.0" />
29-
<dependency id="DynamicLanguageRuntime" version="[1.2.3-alpha0]" />
29+
<dependency id="DynamicLanguageRuntime" version="[1.2.3-candidate1]" />
3030
</group>
3131
<group targetFramework="netcoreapp3.0">
3232
<dependency id="Microsoft.Win32.Registry" version="4.6.0" />
33-
<dependency id="DynamicLanguageRuntime" version="[1.2.3-alpha0]" />
33+
<dependency id="DynamicLanguageRuntime" version="[1.2.3-candidate1]" />
3434
</group>
3535
</dependencies>
3636
</metadata>

Src/IronPython.Wpf/DynamicXamlReader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static object LoadComponent(dynamic scope, DynamicOperations operations,
8181
return myWriter.Result;
8282
}
8383

84-
class DynamicWriter : XamlObjectWriter {
84+
private class DynamicWriter : XamlObjectWriter {
8585
private readonly object _scope;
8686
private readonly DynamicOperations _operations;
8787
private readonly Stack<bool> _nameStack = new Stack<bool>();
@@ -111,13 +111,13 @@ public static void Adder(object inst, object args) {
111111

112112
private static MethodInfo Dummy = new Action<object, object>(Adder).Method;
113113

114-
class DynamicEventMember : XamlMember {
114+
private class DynamicEventMember : XamlMember {
115115
public DynamicEventMember(DynamicWriter writer, EventInfo eventInfo, XamlSchemaContext ctx)
116116
: base(eventInfo.Name, Dummy, ctx, new DynamicEventInvoker(eventInfo, writer)) {
117117
}
118118
}
119119

120-
class DynamicEventInvoker : XamlMemberInvoker {
120+
private class DynamicEventInvoker : XamlMemberInvoker {
121121
private readonly DynamicWriter _writer;
122122
private readonly EventInfo _info;
123123

Src/IronPython/Modules/Builtin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,11 +2016,11 @@ public static PythonType reversed {
20162016
}
20172017

20182018
public static double round(double number) {
2019-
return MathUtils.RoundAwayFromZero(number);
2019+
return MathUtils.Round(number, 0, MidpointRounding.AwayFromZero);
20202020
}
20212021

20222022
public static double round(double number, int ndigits) {
2023-
return PythonOps.CheckMath(number, MathUtils.RoundAwayFromZero(number, ndigits));
2023+
return PythonOps.CheckMath(number, MathUtils.Round(number, ndigits, MidpointRounding.AwayFromZero));
20242024
}
20252025

20262026
public static double round(double number, BigInteger ndigits) {

Src/IronPython/Runtime/Operations/FloatOps.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ private static string DoubleToFormatString(CodeContext/*!*/ context, double self
853853
// only have as single digit avoid exponents.
854854
if (digitCnt > spec.Precision.Value && digitCnt != 1) {
855855
// first round off the decimal value
856-
self = MathUtils.RoundAwayFromZero(self, 0);
856+
self = MathUtils.Round(self, 0, MidpointRounding.AwayFromZero);
857857

858858
// then remove any insignificant digits
859859
double pow = Math.Pow(10, digitCnt - Math.Max(spec.Precision.Value, 1));
@@ -868,7 +868,7 @@ private static string DoubleToFormatString(CodeContext/*!*/ context, double self
868868
// round to match CPython's behavior
869869
int decimalPoints = Math.Max(spec.Precision.Value - digitCnt, 0);
870870

871-
self = MathUtils.RoundAwayFromZero(self, decimalPoints);
871+
self = MathUtils.Round(self, decimalPoints, MidpointRounding.AwayFromZero);
872872
digits = self.ToString("0.0" + new string('#', decimalPoints));
873873
}
874874
} else {
@@ -898,7 +898,7 @@ private static string DoubleToFormatString(CodeContext/*!*/ context, double self
898898
// only have as single digit avoid exponents.
899899
if (digitCnt > precision && digitCnt != 1) {
900900
// first round off the decimal value
901-
self = MathUtils.RoundAwayFromZero(self, 0);
901+
self = MathUtils.Round(self, 0, MidpointRounding.AwayFromZero);
902902

903903
// then remove any insignificant digits
904904
double pow = Math.Pow(10, digitCnt - Math.Max(precision, 1));
@@ -934,7 +934,7 @@ private static string DoubleToFormatString(CodeContext/*!*/ context, double self
934934
}
935935
int decimalPoints = Math.Max(precision - digitCnt, 0);
936936

937-
self = MathUtils.RoundAwayFromZero(self, decimalPoints);
937+
self = MathUtils.Round(self, decimalPoints, MidpointRounding.AwayFromZero);
938938

939939
if (spec.Type == 'n' && context.LanguageContext.NumericCulture != PythonContext.CCulture) {
940940
if (digitCnt != precision && (self % 1) != 0) {

0 commit comments

Comments
 (0)