Skip to content

Commit 27122c6

Browse files
authored
Merge branch 'master' into master
2 parents b47e3a1 + 194e101 commit 27122c6

File tree

11 files changed

+90
-136
lines changed

11 files changed

+90
-136
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ python:
55
- "3.3"
66
- "3.4"
77
- "3.5"
8+
- "3.6"
89
- "pypy"
910

1011
sudo: false

AUTHORS.rst

+2
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ Patches and suggestions
4343
- Michael[tm] Smith
4444
- Marc Abramowitz
4545
- Jon Dufresne
46+
- Ville Skyttä
47+
- Jonathan Vanasco

CHANGES.rst

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
Change Log
22
----------
33

4+
unreleased
5+
~~~~~~~~~~~~~~~~~~
6+
47
* Added the seamless attribute for iframes.
8+
* Added `itemscope` as boolean attribute
9+
https://github.com/html5lib/html5lib-python/issues/194
510

611
0.999999999/1.0b10
712
~~~~~~~~~~~~~~~~~~

html5lib/_ihatexml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def escapeRegexp(string):
180180
nonXmlNameFirstBMPRegexp = re.compile('[\x00-@\\[-\\^`\\{-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u0385\u0387\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u0640\u064b-\u0670\u06b8-\u06b9\u06bf\u06cf\u06d4\u06d6-\u06e4\u06e7-\u0904\u093a-\u093c\u093e-\u0957\u0962-\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09db\u09de\u09e2-\u09ef\u09f2-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a58\u0a5d\u0a5f-\u0a71\u0a75-\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abc\u0abe-\u0adf\u0ae1-\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3c\u0b3e-\u0b5b\u0b5e\u0b62-\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c5f\u0c62-\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cdd\u0cdf\u0ce2-\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d5f\u0d62-\u0e00\u0e2f\u0e31\u0e34-\u0e3f\u0e46-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eb1\u0eb4-\u0ebc\u0ebe-\u0ebf\u0ec5-\u0f3f\u0f48\u0f6a-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3006\u3008-\u3020\u302a-\u3040\u3095-\u30a0\u30fb-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]') # noqa
181181

182182
# Simpler things
183-
nonPubidCharRegexp = re.compile("[^\x20\x0D\x0Aa-zA-Z0-9\-\'()+,./:=?;!*#@$_%]")
183+
nonPubidCharRegexp = re.compile("[^\x20\x0D\x0Aa-zA-Z0-9\\-'()+,./:=?;!*#@$_%]")
184184

185185

186186
class InfosetFilter(object):

html5lib/constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@
588588
])
589589

590590
booleanAttributes = {
591-
"": frozenset(["irrelevant"]),
591+
"": frozenset(["irrelevant", "itemscope"]),
592592
"style": frozenset(["scoped"]),
593593
"img": frozenset(["ismap"]),
594594
"audio": frozenset(["autoplay", "controls"]),

html5lib/tests/serializer-testdata/options.test

+69
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,29 @@
4646
"quote_attr_values": "always"
4747
}
4848
},
49+
{
50+
"expected": [
51+
"<div itemscope>"
52+
],
53+
"input": [
54+
[
55+
"StartTag",
56+
"http://www.w3.org/1999/xhtml",
57+
"div",
58+
[
59+
{
60+
"namespace": null,
61+
"name": "itemscope",
62+
"value": "itemscope"
63+
}
64+
]
65+
]
66+
],
67+
"description": "quote_attr_values='always' with itemscope",
68+
"options": {
69+
"quote_attr_values": "always"
70+
}
71+
},
4972
{
5073
"expected": [
5174
"<div irrelevant>"
@@ -171,6 +194,29 @@
171194
"use_trailing_solidus": true
172195
}
173196
},
197+
{
198+
"expected": [
199+
"<div itemscope=itemscope>"
200+
],
201+
"input": [
202+
[
203+
"StartTag",
204+
"http://www.w3.org/1999/xhtml",
205+
"div",
206+
[
207+
{
208+
"namespace": null,
209+
"name": "itemscope",
210+
"value": "itemscope"
211+
}
212+
]
213+
]
214+
],
215+
"description": "minimize_boolean_attributes=false",
216+
"options": {
217+
"minimize_boolean_attributes": false
218+
}
219+
},
174220
{
175221
"expected": [
176222
"<div irrelevant=irrelevant>"
@@ -194,6 +240,29 @@
194240
"minimize_boolean_attributes": false
195241
}
196242
},
243+
{
244+
"expected": [
245+
"<div itemscope=\"\">"
246+
],
247+
"input": [
248+
[
249+
"StartTag",
250+
"http://www.w3.org/1999/xhtml",
251+
"div",
252+
[
253+
{
254+
"namespace": null,
255+
"name": "itemscope",
256+
"value": ""
257+
}
258+
]
259+
]
260+
],
261+
"description": "minimize_boolean_attributes=false with empty value",
262+
"options": {
263+
"minimize_boolean_attributes": false
264+
}
265+
},
197266
{
198267
"expected": [
199268
"<div irrelevant=\"\">"

requirements-install.sh

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
#!/bin/bash -ex
22

3-
pip install pip==6.1.0
3+
if [[ $SIX_VERSION ]]; then
4+
pip install six==$SIX_VERSION
5+
fi
46

5-
pip install -U -r requirements-test.txt
7+
pip install -r requirements-test.txt
68

79
if [[ $USE_OPTIONAL == "true" ]]; then
8-
pip install -U -r requirements-optional.txt
9-
fi
10-
11-
if [[ $SIX_VERSION ]]; then
12-
pip install six==$SIX_VERSION
10+
pip install -r requirements-optional.txt
1311
fi
1412

1513
if [[ $CI == "true" ]]; then
16-
pip install -U codecov
14+
pip install codecov
1715
fi

setup.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ exclude = .git,__pycache__,.tox,doc
99
[flake8]
1010
ignore = N
1111
max-line-length = 139
12+
13+
[metadata]
14+
license_file = LICENSE

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def default_environment():
7070
'Programming Language :: Python :: 3.3',
7171
'Programming Language :: Python :: 3.4',
7272
'Programming Language :: Python :: 3.5',
73+
'Programming Language :: Python :: 3.6',
7374
'Topic :: Software Development :: Libraries :: Python Modules',
7475
'Topic :: Text Processing :: Markup :: HTML'
7576
]

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = {py26,py27,py33,py34,py35,pypy}-{base,optional}
2+
envlist = {py26,py27,py33,py34,py35,py36,pypy}-{base,optional}
33

44
[testenv]
55
deps =

utils/spider.py

-125
This file was deleted.

0 commit comments

Comments
 (0)