Merge pull request #156630 from fabaff/fix-sgmllib3k
python3Packages.sgmllib3k: disable failing test on Python 3.10
This commit is contained in:
@@ -3,11 +3,14 @@
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, sgmllib3k
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "feedparser";
|
||||
version = "6.0.8";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
@@ -15,13 +18,20 @@ buildPythonPackage rec {
|
||||
sha256 = "sha256-XOBBCgWrJIyMfPyjoOoiA5aO6f9EhgZzea9IJ6WflmE=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ sgmllib3k ];
|
||||
propagatedBuildInputs = [
|
||||
sgmllib3k
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
python -Wd tests/runtests.py
|
||||
# Tests are failing
|
||||
# AssertionError: unexpected '~' char in declaration
|
||||
rm tests/wellformed/sanitize/xml_declaration_unexpected_character.xml
|
||||
${python.interpreter} -Wd tests/runtests.py
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "feedparser" ];
|
||||
pythonImportsCheck = [
|
||||
"feedparser"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/kurtmckee/feedparser";
|
||||
|
||||
@@ -2,14 +2,17 @@
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, isPy27
|
||||
, pytestCheckHook
|
||||
, pythonAtLeast
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sgmllib3k";
|
||||
version = "1.0.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = isPy27;
|
||||
|
||||
# fetchFromGitHub instead of fetchPypi to run tests.
|
||||
src = fetchFromGitHub {
|
||||
owner = "hsoft";
|
||||
repo = "sgmllib";
|
||||
@@ -17,6 +20,18 @@ buildPythonPackage rec {
|
||||
sha256 = "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
||||
"test_declaration_junk_chars"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"sgmllib"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pypi.org/project/sgmllib3k/";
|
||||
description = "Python 3 port of sgmllib";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, isPy27
|
||||
{ lib
|
||||
, Babel
|
||||
, buildPythonPackage
|
||||
, cssselect
|
||||
, python-dateutil
|
||||
, feedparser
|
||||
, futures ? null
|
||||
, fetchPypi
|
||||
, gdata
|
||||
, gnupg
|
||||
, google-api-python-client
|
||||
@@ -16,6 +16,9 @@
|
||||
, pillow
|
||||
, prettytable
|
||||
, pyqt5
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, pyyaml
|
||||
, requests
|
||||
, simplejson
|
||||
@@ -26,28 +29,18 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "weboob";
|
||||
version = "2.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1c69vzf8sg8471lcaafpz9iw2q3rfj5hmcpqrs2k59fkgbvy32zw";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# Disable doctests that require networking:
|
||||
sed -i -n -e '/^ *def \+pagination *(.*: *$/ {
|
||||
p; n; p; /"""\|'\'\'\'''/!b
|
||||
|
||||
:loop
|
||||
n; /^ *\(>>>\|\.\.\.\)/ { h; bloop }
|
||||
x; /^ *\(>>>\|\.\.\.\)/bloop; x
|
||||
p; /"""\|'\'\'\'''/b
|
||||
bloop
|
||||
}; p' weboob/browser/browsers.py weboob/browser/pages.py
|
||||
'';
|
||||
|
||||
checkInputs = [ nose ];
|
||||
|
||||
nativeBuildInputs = [ pyqt5 ];
|
||||
nativeBuildInputs = [
|
||||
pyqt5
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
Babel
|
||||
@@ -70,15 +63,35 @@ buildPythonPackage rec {
|
||||
simplejson
|
||||
termcolor
|
||||
unidecode
|
||||
] ++ lib.optionals isPy27 [ futures ];
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "with-doctest = 1" "" \
|
||||
--replace "with-coverage = 1" "" \
|
||||
--replace "weboob.browser.filters.standard," "" \
|
||||
--replace "weboob.browser.tests.filters," "" \
|
||||
--replace "weboob.tools.application.formatters.json," "" \
|
||||
--replace "weboob.tools.application.formatters.table," "" \
|
||||
--replace "weboob.tools.capabilities.bank.transactions," ""
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
nose
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
meta = {
|
||||
pythonImportsCheck = [
|
||||
"weboob"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Collection of applications and APIs to interact with websites";
|
||||
homepage = "http://weboob.org";
|
||||
description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser";
|
||||
license = lib.licenses.agpl3;
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy27
|
||||
, Babel
|
||||
, buildPythonPackage
|
||||
, colorama
|
||||
, cssselect
|
||||
, python-dateutil
|
||||
, feedparser
|
||||
, fetchFromGitLab
|
||||
, gdata
|
||||
, gnupg
|
||||
, google-api-python-client
|
||||
@@ -19,6 +17,8 @@
|
||||
, pillow
|
||||
, prettytable
|
||||
, pyqt5
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, pyyaml
|
||||
, requests
|
||||
, simplejson
|
||||
@@ -29,22 +29,21 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "woob";
|
||||
version = "3.0";
|
||||
disabled = isPy27;
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "09hpxy5zhn2b8li0xjf3zd7s46lawb0315p5mdcsci3bj3s4v1j7";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "woob";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-XLcHNidclORbxVXgcsHY6Ja/dak+EVSKTaVQmg1f/rw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Disable doctests that require networking:
|
||||
./no-test-requiring-network.patch
|
||||
nativeBuildInputs = [
|
||||
pyqt5
|
||||
];
|
||||
|
||||
checkInputs = [ nose ];
|
||||
|
||||
nativeBuildInputs = [ pyqt5 ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
Babel
|
||||
colorama
|
||||
@@ -69,14 +68,28 @@ buildPythonPackage rec {
|
||||
unidecode
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "with-doctest = 1" "" \
|
||||
--replace "with-coverage = 1" ""
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
nose
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"woob"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Collection of applications and APIs to interact with websites";
|
||||
homepage = "https://woob.tech";
|
||||
description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser";
|
||||
license = licenses.lgpl3Plus;
|
||||
maintainers = [ maintainers.DamienCassou ];
|
||||
};
|
||||
maintainers = with maintainers; [ DamienCassou ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
--- a/woob/browser/browsers.py
|
||||
+++ b/woob/browser/browsers.py
|
||||
@@ -930,23 +930,6 @@
|
||||
|
||||
:class:`NextPage` constructor can take an url or a Request object.
|
||||
|
||||
- >>> from .pages import HTMLPage
|
||||
- >>> class Page(HTMLPage):
|
||||
- ... def iter_values(self):
|
||||
- ... for el in self.doc.xpath('//li'):
|
||||
- ... yield el.text
|
||||
- ... for next in self.doc.xpath('//a'):
|
||||
- ... raise NextPage(next.attrib['href'])
|
||||
- ...
|
||||
- >>> class Browser(PagesBrowser):
|
||||
- ... BASEURL = 'https://woob.tech'
|
||||
- ... list = URL('/tests/list-(?P<pagenum>\d+).html', Page)
|
||||
- ...
|
||||
- >>> b = Browser()
|
||||
- >>> b.list.go(pagenum=1) # doctest: +ELLIPSIS
|
||||
- <woob.browser.browsers.Page object at 0x...>
|
||||
- >>> list(b.pagination(lambda: b.page.iter_values()))
|
||||
- ['One', 'Two', 'Three', 'Four']
|
||||
"""
|
||||
while True:
|
||||
try:
|
||||
--- a/woob/browser/pages.py
|
||||
+++ b/woob/browser/pages.py
|
||||
@@ -49,25 +49,6 @@
|
||||
|
||||
:class:`NextPage` constructor can take an url or a Request object.
|
||||
|
||||
- >>> class Page(HTMLPage):
|
||||
- ... @pagination
|
||||
- ... def iter_values(self):
|
||||
- ... for el in self.doc.xpath('//li'):
|
||||
- ... yield el.text
|
||||
- ... for next in self.doc.xpath('//a'):
|
||||
- ... raise NextPage(next.attrib['href'])
|
||||
- ...
|
||||
- >>> from .browsers import PagesBrowser
|
||||
- >>> from .url import URL
|
||||
- >>> class Browser(PagesBrowser):
|
||||
- ... BASEURL = 'https://woob.tech'
|
||||
- ... list = URL('/tests/list-(?P<pagenum>\d+).html', Page)
|
||||
- ...
|
||||
- >>> b = Browser()
|
||||
- >>> b.list.go(pagenum=1) # doctest: +ELLIPSIS
|
||||
- <woob.browser.pages.Page object at 0x...>
|
||||
- >>> list(b.page.iter_values())
|
||||
- ['One', 'Two', 'Three', 'Four']
|
||||
"""
|
||||
|
||||
@wraps(func)
|
||||
Reference in New Issue
Block a user