Update to 4.4.0
This commit is contained in:
parent
aa066bab50
commit
a115b73573
4 changed files with 6 additions and 82 deletions
32
497.patch
32
497.patch
|
|
@ -1,32 +0,0 @@
|
|||
From b61b8bb719fc676d5a140015a829c6a08d04abb5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Mon, 8 Jul 2019 15:49:19 +0200
|
||||
Subject: [PATCH] Allow approximate equality in TestVector.test_normalize for
|
||||
smaller arches
|
||||
|
||||
Fixes https://github.com/Ultimaker/Uranium/issues/496
|
||||
---
|
||||
tests/Math/TestVector.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/Math/TestVector.py b/tests/Math/TestVector.py
|
||||
index 33f7f0889..292f415f3 100644
|
||||
--- a/tests/Math/TestVector.py
|
||||
+++ b/tests/Math/TestVector.py
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import unittest
|
||||
import numpy
|
||||
+import pytest
|
||||
|
||||
from UM.Math.Vector import Vector
|
||||
|
||||
@@ -30,7 +31,7 @@ def test_angleBetweenVectors(self):
|
||||
|
||||
def test_normalize(self):
|
||||
vector = Vector(10, 10, 10)
|
||||
- assert vector.normalized().length() == 1
|
||||
+ assert vector.normalized().length() == pytest.approx(1)
|
||||
|
||||
def test_setValues(self):
|
||||
x = 10
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From d7ed5eb59a49eaf5219c27cf93251764237ccd91 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Wed, 10 Jul 2019 09:05:51 +0200
|
||||
Subject: [PATCH] Fix visiting string constants in CPython 3.8+
|
||||
|
||||
The Cura builds target CPython 3.5.2 now so it's not a problem for that, but if we upgrade to CPython 3.8 or higher in the future, or right now for the package managers in Linux, this fixes some function evaluations.
|
||||
|
||||
Fixes #498.
|
||||
---
|
||||
UM/Settings/SettingFunction.py | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/UM/Settings/SettingFunction.py b/UM/Settings/SettingFunction.py
|
||||
index 4d6b0a0dc..48365b137 100644
|
||||
--- a/UM/Settings/SettingFunction.py
|
||||
+++ b/UM/Settings/SettingFunction.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-# Copyright (c) 2018 Ultimaker B.V.
|
||||
+# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import ast
|
||||
@@ -180,10 +180,18 @@ def visit_Name(self, node: ast.Name) -> None: # [CodeStyle: ast.NodeVisitor req
|
||||
self.values.add(node.id)
|
||||
self.keys.add(node.id)
|
||||
|
||||
+ ## This one is used before Python 3.8 to visit string types.
|
||||
+ #
|
||||
+ # visit_Str will be marked as deprecated from Python 3.8 and onwards.
|
||||
def visit_Str(self, node: ast.AST) -> None:
|
||||
if node.s not in self._knownNames and node.s not in dir(builtins): # type: ignore #AST uses getattr stuff, so ignore type of node.s.
|
||||
self.keys.add(node.s) # type: ignore
|
||||
|
||||
+ ## This one is used on Python 3.8+ to visit string types.
|
||||
+ def visit_Constant(self, node: ast.AST) -> None:
|
||||
+ if isinstance(node.value, str) and node.value not in self._knownNames and node.value not in dir(builtins): # type: ignore #AST uses getattr stuff, so ignore type of node.value.
|
||||
+ self.keys.add(node.value) # type: ignore
|
||||
+
|
||||
_knownNames = {
|
||||
"math",
|
||||
"max",
|
||||
|
|
@ -1,17 +1,11 @@
|
|||
Name: python-uranium
|
||||
Version: 4.1.0
|
||||
Release: 3%{?dist}
|
||||
Version: 4.4.0
|
||||
Release: 1%{?dist}
|
||||
Summary: A Python framework for building desktop applications
|
||||
License: LGPLv3+
|
||||
URL: https://github.com/Ultimaker/Uranium
|
||||
Source0: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz
|
||||
|
||||
# Approximate equality in numeric tests
|
||||
Patch0: %{url}/pull/497.patch
|
||||
|
||||
# Python 3.8 fixes
|
||||
Patch1: %{url}/commit/d7ed5eb59a49eaf5219c27cf93251764237ccd91.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: /usr/bin/doxygen
|
||||
|
|
@ -110,6 +104,9 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 21 2019 Gabriel Féron <feron.gabriel@gmail.com> - 4.4.0-1
|
||||
- Update to 4.4.0
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1.0-3
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (Uranium-4.1.0.tar.gz) = 537b0aaf7d946ab25994e6532f85f2e235d809381aa84e93f27b544a85c420ee76824cd1bfa5b5aa159b8891dae697053faf06644b1c8797620c50f424fb891c
|
||||
SHA512 (Uranium-4.4.0.tar.gz) = 2f8966a1ce383ec927360d62c586cdedcde54591efbb1c6feea06268bf14b74410d7d411a001b9811f109d3bddd91f6e44d8d0b0f34ebe351d9ac170f87d3937
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue