<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pygments-git.git/tests/test_data.py, branch 2.7.4</title>
<subtitle>github.com: pygments/pygments.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/'/>
<entry>
<title>Speed up JSON and reduce HTML formatter consumption (#1569)</title>
<updated>2020-10-26T20:33:05+00:00</updated>
<author>
<name>Kurt McKee</name>
<email>contactme@kurtmckee.org</email>
</author>
<published>2020-10-26T20:33:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=164dcb5a6b192ef6488f378b166d2fec8a708a0b'/>
<id>164dcb5a6b192ef6488f378b166d2fec8a708a0b</id>
<content type='text'>
* Update the JSON-LD keyword list to match JSON-LD 1.1

Changes in this patch:

* Update the JSON-LD URL to HTTPS
* Update the list of JSON-LD keywords
* Make the JSON-LD parser less dependent on the JSON lexer implementation
* Add unit tests for the JSON-LD lexer

* Add unit tests for the JSON parser

This includes:

* Testing valid literals
* Testing valid string escapes
* Testing that object keys are tokenized differently from string values

* Rewrite the JSON lexer

Related to #1425

Included in this change:

* The JSON parser is rewritten
* The JSON bare object parser no longer requires additional code
* `get_tokens_unprocessed()` returns as much as it can to reduce yields
  (for example, side-by-side punctuation is not returned separately)
* The unit tests were updated
* Add unit tests based on Hypothesis test results

* Reduce HTML formatter memory consumption by ~33% and speed it up

Related to #1425

Tested on a 118MB JSON file. Memory consumption tops out at ~3GB before
this patch and drops to only ~2GB with this patch. These were the command
lines used:

python -m pygments -l json -f html -o .\new-code-classes.html .\jc-output.txt
python -m pygments -l json -f html -O "noclasses" -o .\new-code-styles.html .\jc-output.txt

* Add an LRU cache to the HTML formatter's HTML-escaping and line-splitting

For a 118MB JSON input file, this reduces memory consumption by ~500MB
and reduces formatting time by ~15 seconds.

* JSON: Add a catastrophic backtracking test back to the test suite

* JSON: Update the comment that documents the internal queue

* JSON: Document in comments that ints/floats/constants are not validated</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Update the JSON-LD keyword list to match JSON-LD 1.1

Changes in this patch:

* Update the JSON-LD URL to HTTPS
* Update the list of JSON-LD keywords
* Make the JSON-LD parser less dependent on the JSON lexer implementation
* Add unit tests for the JSON-LD lexer

* Add unit tests for the JSON parser

This includes:

* Testing valid literals
* Testing valid string escapes
* Testing that object keys are tokenized differently from string values

* Rewrite the JSON lexer

Related to #1425

Included in this change:

* The JSON parser is rewritten
* The JSON bare object parser no longer requires additional code
* `get_tokens_unprocessed()` returns as much as it can to reduce yields
  (for example, side-by-side punctuation is not returned separately)
* The unit tests were updated
* Add unit tests based on Hypothesis test results

* Reduce HTML formatter memory consumption by ~33% and speed it up

Related to #1425

Tested on a 118MB JSON file. Memory consumption tops out at ~3GB before
this patch and drops to only ~2GB with this patch. These were the command
lines used:

python -m pygments -l json -f html -o .\new-code-classes.html .\jc-output.txt
python -m pygments -l json -f html -O "noclasses" -o .\new-code-styles.html .\jc-output.txt

* Add an LRU cache to the HTML formatter's HTML-escaping and line-splitting

For a 118MB JSON input file, this reduces memory consumption by ~500MB
and reduces formatting time by ~15 seconds.

* JSON: Add a catastrophic backtracking test back to the test suite

* JSON: Update the comment that documents the internal queue

* JSON: Document in comments that ints/floats/constants are not validated</pre>
</div>
</content>
</entry>
<entry>
<title>fix regression in JSON lexer, bump to 2.7.1</title>
<updated>2020-09-17T07:00:50+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2020-09-17T06:59:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=4587a7e80145d79ef49de1c15ca58a1a13cc9987'/>
<id>4587a7e80145d79ef49de1c15ca58a1a13cc9987</id>
<content type='text'>
Fixes #1544
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #1544
</pre>
</div>
</content>
</entry>
<entry>
<title>all: remove "u" string prefix (#1536)</title>
<updated>2020-09-08T18:20:19+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2020-09-08T18:20:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=9f5672672bd61f7149d2a165b49f0617a1a9fe8e'/>
<id>9f5672672bd61f7149d2a165b49f0617a1a9fe8e</id>
<content type='text'>
* all: remove "u" string prefix

* util: remove unirange

Since Python 3.3, all builds are wide unicode compatible.

* unistring: remove support for narrow-unicode builds

which stopped being relevant with Python 3.3</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* all: remove "u" string prefix

* util: remove unirange

Since Python 3.3, all builds are wide unicode compatible.

* unistring: remove support for narrow-unicode builds

which stopped being relevant with Python 3.3</pre>
</div>
</content>
</entry>
<entry>
<title>more explicitly define escape sequencies in JsonLexer (fix #1065) (#1528)</title>
<updated>2020-08-31T14:17:38+00:00</updated>
<author>
<name>Nick Gerner</name>
<email>nick.gerner@gmail.com</email>
</author>
<published>2020-08-31T14:17:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=9514e794e0c2a5c7c048df97fcfef4a099e05ac3'/>
<id>9514e794e0c2a5c7c048df97fcfef4a099e05ac3</id>
<content type='text'>
* more explicitly define escape sequencies in JsonLexer (fix #1065)

* adding test coverage for #1065</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* more explicitly define escape sequencies in JsonLexer (fix #1065)

* adding test coverage for #1065</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unittest classes from the test suite.</title>
<updated>2019-11-10T09:15:13+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2019-05-06T16:02:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=7827966acdb6431636520d20fc3c148ce52de59b'/>
<id>7827966acdb6431636520d20fc3c148ce52de59b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #1528 -- Yaml gets confused when a comment contains a key:value pair.</title>
<updated>2019-07-20T09:37:16+00:00</updated>
<author>
<name>Matth?us G. Chajdas</name>
<email>dev@anteru.net</email>
</author>
<published>2019-07-20T09:37:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=e5960b872253450c10b1e9ff5666302daa2537bc'/>
<id>e5960b872253450c10b1e9ff5666302daa2537bc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Robustify json-object against unexpected '}'</title>
<updated>2016-06-01T05:17:14+00:00</updated>
<author>
<name>Tim Hatch</name>
<email>tim@timhatch.com</email>
</author>
<published>2016-06-01T05:17:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=1d8d274199f2ed7cb2ec84fe976a49c54fca24af'/>
<id>1d8d274199f2ed7cb2ec84fe976a49c54fca24af</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a new lexer that assumes json object is already open.</title>
<updated>2016-06-01T05:06:40+00:00</updated>
<author>
<name>Tim Hatch</name>
<email>tim@timhatch.com</email>
</author>
<published>2016-06-01T05:06:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=d991f8d278baeb1a236af71f09b15859487114ca'/>
<id>d991f8d278baeb1a236af71f09b15859487114ca</id>
<content type='text'>
Fixes #884
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #884
</pre>
</div>
</content>
</entry>
</feed>
