Commit a99899f5 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Update Release Candidate

parents 2882db54 1e81c41d
From f8ef2a193edf565d61aa628232f0e46e55a6aa6f Mon Sep 17 00:00:00 2001
From: Pavel Brych <pavel@brych.cz>
Date: Thu, 3 Sep 2015 08:04:53 +0200
Subject: [PATCH] Custom implementation of warnings.formatwarning removed
---
PyPDF2/pdf.py | 15 ++-------------
PyPDF2/utils.py | 6 ------
2 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/PyPDF2/pdf.py b/PyPDF2/pdf.py
index f54680a..3554f40 100644
--- a/PyPDF2/pdf.py
+++ b/PyPDF2/pdf.py
@@ -63,7 +63,7 @@ import warnings
import codecs
from .generic import *
from .utils import readNonWhitespace, readUntilWhitespace, ConvertFunctionsToVirtualList
-from .utils import isString, b_, u_, ord_, chr_, str_, formatWarning
+from .utils import isString, b_, u_, ord_, chr_, str_
if version_info < ( 2, 4 ):
from sets import ImmutableSet as frozenset
@@ -1039,18 +1039,7 @@ class PdfFileReader(object):
``warnings.py`` module with a custom implementation (defaults to
``True``).
"""
- def __init__(self, stream, strict=True, warndest = None, overwriteWarnings = True):
- if overwriteWarnings:
- # have to dynamically override the default showwarning since there are no
- # public methods that specify the 'file' parameter
- def _showwarning(message, category, filename, lineno, file=warndest, line=None):
- if file is None:
- file = sys.stderr
- try:
- file.write(formatWarning(message, category, filename, lineno, line))
- except IOError:
- pass
- warnings.showwarning = _showwarning
+ def __init__(self, stream, strict=True):
self.strict = strict
self.flattenedPages = None
self.resolvedObjects = {}
diff --git a/PyPDF2/utils.py b/PyPDF2/utils.py
index 718a875..7bcb9ce 100644
--- a/PyPDF2/utils.py
+++ b/PyPDF2/utils.py
@@ -64,12 +64,6 @@ def isBytes(b):
return isinstance(b, bytes_type)
-#custom implementation of warnings.formatwarning
-def formatWarning(message, category, filename, lineno, line=None):
- file = filename.replace("/", "\\").rsplit("\\", 1)[1] # find the file name
- return "%s: %s [%s:%s]\n" % (category.__name__, message, file, lineno)
-
-
def readUntilWhitespace(stream, maxchars=None):
"""
Reads non-whitespace characters and returns them.
--
2.23.0
......@@ -18,4 +18,4 @@ md5sum = 307663d73ef3ef94b02567ecd322252e
[template-default]
filename = instance-default.cfg
md5sum = 4ebd9eed7c15a158efb342dd7c9672f0
md5sum = cf68a9c7e03ee0a3a527c4edfb6ab5d1
......@@ -240,5 +240,5 @@ config-port = $${shellinabox-frontend:port}
node-quantity = 1
test-suite-master-url =
instance-dict =
software-path-list = ["https://lab.nexedi.com/nexedi/slapos/raw/2063375310edea5991786083803e8bca9069ae17/software/seleniumrunner/software.cfg"]
software-path-list = ["https://lab.nexedi.com/nexedi/slapos/raw/1.0.152/software/seleniumrunner/software.cfg"]
keep-log-days = 15
......@@ -19,7 +19,7 @@ md5sum = b36b6b3ccb15758d99f3b6258b141db9
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum = f015c14f34dc9f5290188db11f11b4df
md5sum = fb4d76a83ff7c2d0f205d52fb314a9ee
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
......
{% set additional_frontend = slapparameter_dict.get('frontend-additional-instance-guid') %}
{% set enable_http = slapparameter_dict.get('enable-http-server', False) -%}
{% set use_tap = slapparameter_dict.get('use-tap', True) -%}
{% set use_nat = slapparameter_dict.get('use-nat', True) -%}
{% set wipe_disk = slapparameter_dict.get('wipe-disk-ondestroy', False) -%}
{% set nat_restrict = slapparameter_dict.get('nat-restrict-mode', False) -%}
{% set enable_http = str(slapparameter_dict.get('enable-http-server', False)).lower() == 'true' -%}
{% set use_tap = str(slapparameter_dict.get('use-tap', True)).lower() == 'true' -%}
{% set use_nat = str(slapparameter_dict.get('use-nat', True)).lower() == 'true' -%}
{% set wipe_disk = str(slapparameter_dict.get('wipe-disk-ondestroy', False)).lower() == 'true' -%}
{% set nat_restrict = str(slapparameter_dict.get('nat-restrict-mode', False)).lower() == 'true' -%}
{% set name = slapparameter_dict.get('name', 'localhost') -%}
{% set disable_ansible_promise = slapparameter_dict.get('disable-ansible-promise', True) -%}
{% set disable_ansible_promise = str(slapparameter_dict.get('disable-ansible-promise', True)).lower() == 'true' -%}
{% set instance_type = slapparameter_dict.get('type', 'standalone') -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '22 80 443') -%}
{% set disk_device_path = slapparameter_dict.get('disk-device-path', None) -%}
......
......@@ -352,7 +352,13 @@ class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase):
def test(self):
connection_parameter_dict = self.computer_partition\
.getConnectionParameterDict()
result = requests.get(connection_parameter_dict['KVM0-url'], verify=False)
result = requests.get(connection_parameter_dict['test-machine1-url'], verify=False)
self.assertEqual(
httplib.OK,
result.status_code
)
self.assertIn('<title>noVNC</title>', result.text)
result = requests.get(connection_parameter_dict['test-machine2-url'], verify=False)
self.assertEqual(
httplib.OK,
result.status_code
......
......@@ -198,6 +198,11 @@ scripts =
interpreter=
python_for_test
# patches for eggs
patch-binary = ${patch:location}/bin/patch
PyPDF2-patches = ${:_profile_base_location_}/../../component/egg-patch/PyPDF2/0001-Custom-implementation-of-warnings.formatwarning-remo.patch#d25bb0f5dde7f3337a0a50c2f986f5c8
PyPDF2-patch-options = -p1
[git-clone-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
......@@ -265,6 +270,9 @@ requests-toolbelt = 0.8.0
selenium = 3.141.0
slapos.recipe.template = 4.4
# Patched eggs
PyPDF2 = 1.26.0+SlapOSPatched001
# modern versions for SSL fixed support
requests = 2.20.0
certifi = 2018.10.15
......@@ -291,7 +299,6 @@ backports.lzma = 0.0.13
mock = 2.0.0
testfixtures = 6.11
funcsigs = 1.0.2
PyPDF2 = 1.26.0
mysqlclient = 1.3.12
pexpect = 4.8.0
ptyprocess = 0.6.0
......@@ -410,7 +410,7 @@ eggs = ${neoppod:eggs}
paramiko
ply
pyflakes
pypdf2
PyPDF2
python-magic
python-memcached
pytz
......@@ -528,6 +528,8 @@ extra-paths =
# patches for eggs
patch-binary = ${patch:location}/bin/patch
PyPDF2-patches = ${:_profile_base_location_}/../../component/egg-patch/PyPDF2/0001-Custom-implementation-of-warnings.formatwarning-remo.patch#d25bb0f5dde7f3337a0a50c2f986f5c8
PyPDF2-patch-options = -p1
Acquisition-patches = ${:_profile_base_location_}/../../component/egg-patch/Acquisition/aq_dynamic.patch#1d9a56e9af4371f5b6951ebf217a15d7
Acquisition-patch-options = -p1
Products.DCWorkflow-patches = ${:_profile_base_location_}/../../component/egg-patch/Products.DCWorkflow/workflow_method.patch#975b49e96bae33ac8563454fe5fa9899
......@@ -576,6 +578,7 @@ ocropy = 1.0+SlapOSPatched001
pysvn = 1.7.10+SlapOSPatched002
python-ldap = 2.4.32+SlapOSPatched001
python-magic = 0.4.12+SlapOSPatched001
PyPDF2 = 1.26.0+SlapOSPatched001
## https://lab.nexedi.com/nexedi/slapos/merge_requests/648
pylint = 1.4.4
......@@ -623,7 +626,6 @@ Products.MimetypesRegistry = 2.0.10
Products.PluginRegistry = 1.4
Products.TIDStorage = 5.5.0
pyPdf = 1.13
PyPDF2 = 1.26.0
PyStemmer = 1.3.0
PyXML = 0.8.5
Pympler = 0.4.3
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment