/usr/lib/python2.7/dist-packages/Chameleon-2.24.egg-info/PKG-INFO is in python-chameleon 2.24-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 | Metadata-Version: 1.1
Name: Chameleon
Version: 2.24
Summary: Fast HTML/XML Template Compiler.
Home-page: http://www.pagetemplates.org/
Author: Malthe Borch
Author-email: mborch@gmail.com
License: BSD-like (http://repoze.org/license.html)
Description: Overview
========
Chameleon is an HTML/XML template engine for `Python
<http://www.python.org>`_. It uses the *page templates* language.
You can use it in any Python web application with just about any
version of Python (2.5 and up, including 3.x and `pypy
<http://pypy.org>`_).
Visit the `website <http://pagetemplates.org/>`_ for more information
or the `documentation <http://chameleon.readthedocs.org/en/latest/>`_.
License and Copyright
---------------------
This software is made available as-is under a BSD-like license [1]_
(see included copyright notice).
Notes
-----
.. [1] This software is licensed under the `Repoze
<http://repoze.org/license.html>`_ license.
Changes
=======
2.24 (2015-10-28)
-----------------
- Fixed Python 3.5 compatibility.
- Fixed brown bag release.
2.23 (2015-10-26)
-----------------
- Added ``enable_data_attributes`` option that allows using HTML5 data
attributes as control attributes instead or in addition to XML
namespace attributes.
2.22 (2015-02-06)
-----------------
- Fix brown bag release.
2.21 (2015-02-06)
-----------------
- Added ``RenderError`` exception which indicates that an error
occurred during the evaluation of an expression.
- Clean up ``TemplateError`` exception implementation.
2.20 (2015-01-12)
-----------------
- Pass ``search_path`` to template class when loaded using
``TemplateLoader`` (or one of the derived classes).
[faassen]
2.19 (2015-01-06)
-----------------
- Fix logging deprecation.
- Fix environment-based configuration logging error.
2.18 (2014-11-03)
-----------------
- Fix minor compilation error.
2.17 (2014-11-03)
-----------------
- Add support for ``i18n:context``.
[wiggy]
- Add missing 'parity' repeat property.
[voxspox]
- Don't modify environment when getting variables from it.
[fschulze]
2.16 (2014-05-06)
-----------------
- If a repeat expression evaluates to ``None`` then it is now
equivalent to an empty set.
This changes a behavior introduced in 2.14.
This fixes issue #172.
- Remove fossil test dependency on deprecated ``distribute``.
- Add explicit support / testing for Python 3.3 / 3.4.
- Drop explicit support for Python 2.5 (out of maintenance, and no longer
supported by ``tox`` or ``Travis-CI``).
2.15 (2014-03-11)
-----------------
- Add Support for Python 3.4's ``NameConstant``.
[brakhane]
2.14 (2013-11-28)
-----------------
- Element repetition using the ``TAL`` namespace no longer includes
whitespace. This fixes issue #110.
- Use absolute import for ``chameleon.interfaces`` module. This fixes
issue #161.
2.13-1 (2013-10-24)
-------------------
- Fixing brown bag release.
2.13 (2013-10-21)
-----------------
Bugfixes:
- The template cache mechanism now includes additional configuration
settings as part of the cache key such as ``strict`` and
``trim_attribute_space``.
[ossmkitty]
- Fix cache issue where sometimes cached templates would not load
correctly.
[ossmkitty]
- In debug-mode, correctly remove temporary files when the module
loader is garbage-collected (on ``__del__``).
[graffic]
- Fix error message when duplicate i18n:name directives are used in a
translation.
- Using the three-argument form of ``getattr`` on a
``chameleon.tal.RepeatDict`` no longer raises ``KeyError``,
letting the default provided to ``getattr`` be used. This fixes
attempting to adapt a ``RepeatDict`` to a Zope interface under
PyPy.
2.12 (2013-03-26)
-----------------
Changes:
- When a ``tal:case`` condition succeeds, no other case now will.
Bugfixes:
- Implicit translation now correctly extracts and normalizes complete
sentences, instead of words.
[witsch]
- The ``default`` symbol in a ``tal:case`` condition now allows the
element only if no other case succeeds.
2.11 (2012-11-15)
-----------------
Bugfixes:
- An issue was resolved where a METAL statement was combined with a
``tal:on-error`` handler.
- Fix minor parser issue with incorrectly formatted processing
instructions.
- Provide proper error handling for Python inline code blocks.
Features:
- The simple translation function now supports the
``translationstring`` interface.
Optimizations:
- Minor optimization which correctly detects when an element has no
attributes.
2.10 (2012-10-12)
-----------------
Deprecations:
- The ``fast_translate`` function has been deprecated. Instead, the
default translation function is now always a function that simply
interpolates the mapping onto the message default or id.
The motivation is that since version 2.9, the ``context`` argument
is non-trivial: the ``econtext`` mapping is passed. This breaks an
expectation on the Zope platform that the ``context`` parameter is
the HTTP request. Previously, with Chameleon this parameter was
simply not provided and so that did not cause issues as such.
- The ``ast24`` module has been renamed to ``ast25``. This should help
clear up any confusion that Chameleon 2.x might be support a Python
interpreter less than version 2.5 (it does not).
Features:
- The ``ProxyExpr`` expression class (and hence the ``load:``
expression type) is now a TALES-expression. In practical terms, this
means that the expression type (which computes a string result using
the standard ``"${...}"`` interpolation syntax and proxies the
result through a function) now supports fallback using the pipe
operator (``"|"``). This fixes issue #128.
- An attempt to interpolate using the empty string as the expression
(i.e. ``${}``) now does nothing: the string ``${}`` is simply output
as is.
- Added support for adding, modifying, and removing attributes using a
dictionary expression in ``tal:attributes`` (analogous to Genshi's
``py:attrs`` directive)::
<div tal:attributes="name value; attrs" />
In the example above, ``name`` is an identifier, while ``value`` and
``attrs`` are Python expressions. However, ``attrs`` must evaluate
to a Python dictionary object (more concisely, the value must
implement the dictionary API-methods ``update()`` and ``items()``).
Optimizations:
- In order to cut down on the size of the compiled function objects,
some conversion and quoting statements have been put into
functions. In one measurement, the reduction was 35%. The benchmark
suite does *not* report of an increased render time (actually
slightly decreased).
Bugfixes:
- An exception is now raised if a trivial string is passed for
``metal:fill-slot``. This fixes issue #89.
- An empty string is now never translated. Not really a bug, but it's
been reported in as an issue (#92) because some translation
frameworks handle this case incorrectly.
- The template module loader (file cache) now correctly encodes
generated template source code as UTF-8. This fixes issue #125.
- Fixed issue where a closure might be reused unsafely in nested
template rendering.
- Fixed markup class ``__repr__`` method. This fixes issue #124.
- Added missing return statement to fix printing the non-abbreviated
filename in case of an exception.
[tomo]
2.9.2 (2012-06-06)
------------------
Bugfixes:
- Fixed a PyPy incompatibility.
- Fixed issue #109 which caused testing failures on some platforms.
2.9.1 (2012-06-01)
------------------
Bugfixes:
- Fixed issue #103. The ``tal:on-error`` statement now always adds an
explicit end-tag to the element, even with a substitution content of
nothing.
- Fixed issue #113. The ``tal:on-error`` statement now works correctly
also for dynamic attributes. That is, the fallback tag now includes
only static attributes.
- Fixed name error which prevented the benchmark from running
correctly.
Compatibility:
- Fixed deprecation warning on Python 3 for zope interface implements
declaration. This fixes issue #116.
2.9.0 (2012-05-31)
------------------
Features:
- The translation function now gets the ``econtext`` argument as the
value for ``context``. Note that historically, this was usually an
HTTP request which might provide language negotiation data through a
dictionary interface.
[alvinyue]
Bugfixes:
- Fixed import alias issue which would lead to a syntax error in
generated Python code. Fixes issue #114.
2.8.5 (2012-05-02)
------------------
Bugfixes:
- Fixed minor installation issues on Python 2.5 and 3.
[ppaez]
- Ensure output is unicode even when trivial (an empty string).
2.8.4 (2012-04-18)
------------------
Features:
- In exception output, long filenames are now truncated to 60
characters of output, preventing line wrap which makes it difficult
to scan the exception output.
Bugfixes:
- Include filename and location in exception output for exceptions
raised during compilation.
- If a trivial translation substitution variable is given (i.e. an
empty string), simply ignore it. This fixes issue #106.
2.8.3 (2012-04-16)
------------------
Features:
- Log template source on debug-level before cooking.
- The `target_language` argument, if given, is now available as a
variable in templates.
2.8.2 (2012-03-30)
------------------
Features:
- Temporary caches used in debug mode are cleaned up eagerly, rather
than waiting for process termination.
[mitchellrj]
Bugfixes:
- The `index`, `start` and `end` methods on the TAL repeat object are
now callable. This fixes an incompatibility with ZPT.
- The loader now correctly handles absolute paths on Windows.
[rdale]
2.8.1 (2012-03-29)
------------------
Features:
- The exception formatter now lists errors in 'wrapping order'. This
means that the innermost, and presumably most relevant exception is
shown last.
Bugfixes:
- The exception formatter now correctly recognizes nested errors and
does not rewrap the dynamically generated exception class.
- The exception formatter now correctly sets the ``__module__``
attribute to that of the original exception class.
2.8.0 (2012-02-29)
------------------
Features:
- Added support for code blocks using the `<?python ... ?>` processing
instruction syntax.
The scope is name assignments is up until the nearest macro
definition, or the template itself if macros are not used.
Bugfixes:
- Fall back to the exception class' ``__new__`` method to safely
create an exception object that is not implemented in Python.
- The exception formatter now keeps track of already formatted
exceptions, and ignores them from further output.
2.7.4 (2012-02-27)
------------------
- The error handler now invokes the ``__init__`` method of
``BaseException`` instead of the possibly overriden method (which
may take required arguments). This fixes issue #97.
[j23d, malthe]
2.7.3 (2012-01-16)
------------------
Bugfixes:
- The trim whitespace option now correctly trims actual whitespace to
a single character, appearing either to the left or to the right of
an element prefix or suffix string.
2.7.2 (2012-01-08)
------------------
Features:
- Added option ``trim_attribute_space`` that decides whether attribute
whitespace is stripped (at most down to a single space). This option
exists to provide compatibility with the reference
implementation. Fixes issue #85.
Bugfixes:
- Ignore unhashable builtins when generating a reverse builtin
map to quickly look up a builtin value.
[malthe]
- Apply translation mapping even when a translation function is not
available. This fixes issue #83.
[malthe]
- Fixed issue #80. The translation domain for a slot is defined by the
source document, i.e. the template providing the content for a slot
whether it be the default or provided through ``metal:fill-slot``.
[jcbrand]
- In certain circumstances, a Unicode non-breaking space character would cause
a define clause to fail to parse.
2.7.1 (2011-12-29)
------------------
Features:
- Enable expression interpolation in CDATA.
- The page template class now implements dictionary access to macros::
template[name]
This is a short-hand for::
template.macros[name]
Bugfixes:
- An invalid define clause would be silently ignored; we now raise a
language error exception. This fixes issue #79.
- Fixed regression where ``${...}`` interpolation expressions could
not span multiple lines. This fixes issue #77.
2.7.0 (2011-12-13)
------------------
Features:
- The ``load:`` expression now derives from the string expression such
that the ``${...}`` operator can be used for expression
interpolation.
- The ``load:`` expression now accepts asset specs; these are resolved
by the ``pkg_resources.resource_filename`` function::
<package_name>:<path>
An example from the test suite::
chameleon:tests/inputs/hello_world.pt
Bugfixes:
- If an attribute name for translation was not a valid Python
identifier, the compiler would generate invalid code. This has been
fixed, and the compiler now also throws an exception if an attribute
specification contains a comma. (Note that the only valid separator
character is the semicolon, when specifying attributes for
translation via the ``i18n:translate`` statement). This addresses
issue #76.
2.6.2 (2011-12-08)
------------------
Bugfixes:
- Fixed issue where ``tal:on-error`` would not respect
``tal:omit-tag`` or namespace elements which are omitted by default
(such as ``<tal:block />``).
- Fixed issue where ``macros`` attribute would not be available on
file-based templates due to incorrect initialization.
- The ``TryExcept`` and ``TryFinally`` AST nodes are not available on
Python 3.3. These have been aliased to ``Try``. This fixes issue
#75.
Features:
- The TAL repeat item now makes a security declaration that grants
access to unprotected subobjects on the Zope 2 platform::
__allow_access_to_unprotected_subobjects__ = True
This is required for legacy compatibility and does not affect other
environments.
- The template object now has a method ``write(body)`` which
explicitly decodes and cooks a string input.
- Added configuration option ``loader_class`` which sets the class
used to create the template loader object.
The class (essentially a callable) is created at template
construction time.
2.6.1 (2011-11-30)
------------------
Bugfixes:
- Decode HTML entities in expression interpolation strings. This fixes
issue #74.
- Allow ``xml`` and ``xmlns`` attributes on TAL, I18N and METAL
namespace elements. This fixes issue #73.
2.6.0 (2011-11-24)
------------------
Features:
- Added support for implicit translation:
The ``implicit_i18n_translate`` option enables implicit translation
of text. The ``implicit_i18n_attributes`` enables implicit
translation of attributes. The latter must be a set and for an
attribute to be implicitly translated, its lowercase string value
must be included in the set.
- Added option ``strict`` (enabled by default) which decides whether
expressions are required to be valid at compile time. That is, if
not set, an exception is only raised for an invalid expression at
evaluation time.
- An expression error now results in an exception only if the
expression is attempted evaluated during a rendering.
- Added a configuration option ``prepend_relative_search_path`` which
decides whether the path relative to a file-based template is
prepended to the load search path. The default is ``True``.
- Added a configuration option ``search_path`` to the file-based
template class, which adds additional paths to the template load
instance bound to the ``load:`` expression. The option takes a
string path or an iterable yielding string paths. The default value
is the empty set.
Bugfixes:
- Exception instances now support pickle/unpickle.
- An attributes in i18n:attributes no longer needs to match an
existing or dynamic attribute in order to appear in the
element. This fixes issue #66.
2.5.3 (2011-10-23)
------------------
Bugfixes:
- Fixed an issue where a nested macro slot definition would fail even
though there existed a parent macro definition. This fixes issue
#69.
2.5.2 (2011-10-12)
------------------
Bugfixes:
- Fixed an issue where technically invalid input would result in a
compiler error.
Features:
- The markup class now inherits from the unicode string type such that
it's compatible with the string interface.
2.5.1 (2011-09-29)
------------------
Bugfixes:
- The symbol names "convert", "decode" and "translate" are now no
longer set as read-only *compiler internals*. This fixes issue #65.
- Fixed an issue where a macro extension chain nested two levels (a
template uses a macro that extends a macro) would lose the middle
slot definitions if slots were defined nested.
The compiler now throws an error if a nested slot definition is used
outside a macro extension context.
2.5.0 (2011-09-23)
------------------
Features:
- An expression type ``structure:`` is now available which wraps the
expression result as *structure* such that it is not escaped on
insertion, e.g.::
<div id="content">
${structure: context.body}
</div>
This also means that the ``structure`` keyword for ``tal:content``
and ``tal:replace`` now has an alternative spelling via the
expression type ``structure:``.
- The string-based template constructor now accepts encoded input.
2.4.6 (2011-09-23)
------------------
Bugfixes:
- The ``tal:on-error`` statement should catch all exceptions.
- Fixed issue that would prevent escaping of interpolation expression
values appearing in text.
2.4.5 (2011-09-21)
------------------
Bugfixes:
- The ``tal:on-error`` handler should have a ``error`` variable
defined that has the value of the exception thrown.
- The ``tal:on-error`` statement is a substitution statement and
should support the "text" and "structure" insertion methods.
2.4.4 (2011-09-15)
------------------
Bugfixes:
- An encoding specified in the XML document preamble is now read and
used to decode the template input to unicode. This fixes issue #55.
- Encoded expression input on Python 3 is now correctly
decoded. Previously, the string representation output would be
included instead of an actually decoded string.
- Expression result conversion steps are now correctly included in
error handling such that the exception output points to the
expression location.
2.4.3 (2011-09-13)
------------------
Features:
- When an encoding is provided, pass the 'ignore' flag to avoid
decoding issues with bad input.
Bugfixes:
- Fixed pypy compatibility issue (introduced in previous release).
2.4.2 (2011-09-13)
------------------
Bugfixes:
- Fixed an issue in the compiler where an internal variable (such as a
translation default value) would be cached, resulting in variable
scope corruption (see issue #49).
2.4.1 (2011-09-08)
------------------
Bugfixes:
- Fixed an issue where a default value for an attribute would
sometimes spill over into another attribute.
- Fixed issue where the use of the ``default`` name in an attribute
interpolation expression would print the attribute value. This is
unexpected, because it's an expression, not a static text suitable
for output. An attribute value of ``default`` now correctly drops
the attribute.
2.4.0 (2011-08-22)
------------------
Features:
- Added an option ``boolean_attributes`` to evaluate and render a
provided set of attributes using a boolean logic: if the attribute
is a true value, the value will be the attribute name, otherwise the
attribute is dropped.
In the reference implementation, the following attributes are
configured as boolean values when the template is rendered in
HTML-mode::
"compact", "nowrap", "ismap", "declare", "noshade",
"checked", "disabled", "readonly", "multiple", "selected",
"noresize", "defer"
Note that in Chameleon, these attributes must be manually provided.
Bugfixes:
- The carriage return character (used on Windows platforms) would
incorrectly be included in Python comments.
It is now replaced with a line break.
This fixes issue #44.
2.3.8 (2011-08-19)
------------------
- Fixed import error that affected Python 2.5 only.
2.3.7 (2011-08-19)
------------------
Features:
- Added an option ``literal_false`` that disables the default behavior
of dropping an attribute for a value of ``False`` (in addition to
``None``). This modified behavior is the behavior exhibited in
reference implementation.
Bugfixes:
- Undo attribute special HTML attribute behavior (see previous
release).
This turned out not to be a compatible behavior; rather, boolean
values should simply be coerced to a string.
Meanwhile, the reference implementation does support an HTML mode in
which the special attribute behavior is exhibited.
We do not currently support this mode.
2.3.6 (2011-08-18)
------------------
Features:
- Certain HTML attribute names now have a special behavior for a
attribute value of ``True`` (or ``default`` if no default is
defined). For these attributes, this return value will result in the
name being printed as the value::
<input type="input" tal:attributes="checked True" />
will be rendered as::
<input type="input" checked="checked" />
This behavior is compatible with the reference implementation.
2.3.5 (2011-08-18)
------------------
Features:
- Added support for the set operator (``{item, item, ...}``).
Bugfixes:
- If macro is defined on the same element as a translation name, this
no longer results in a "translation name not allowed outside
translation" error. This fixes issue #43.
- Attribute fallback to dictionary lookup now works on multiple items
(e.g. ``d1.d2.d2``). This fixes issue #42.
2.3.4 (2011-08-16)
------------------
Features:
- When inserting content in either attributes or text, a value of
``True`` (like ``False`` and ``None``) will result in no
action.
- Use statically assigned variables for ``"attrs"`` and
``"default"``. This change yields a performance improvement of
15-20%.
- The template loader class now accepts an optional argument
``default_extension`` which accepts a filename extension which will
be appended to the filename if there's not already an extension.
Bugfixes:
- The default symbol is now ``True`` for an attribute if the attribute
default is not provided. Note that the result is that the attribute
is dropped. This fixes issue #41.
- Fixed an issue where assignment to a variable ``"type"`` would
fail. This fixes issue #40.
- Fixed an issue where an (unsuccesful) assignment for a repeat loop
to a compiler internal name would not result in an error.
- If the translation function returns the identical object, manually
coerce it to string. This fixes a compatibility issue with
translation functions which do not convert non-string objects to a
string value, but simply return them unchanged.
2.3.3 (2011-08-15)
------------------
Features:
- The ``load:`` expression now passes the initial keyword arguments to
its template loader (e.g. ``auto_reload`` and ``encoding``).
- In the exception output, string variable values are now limited to a
limited output of characters, single line only.
Bugfixes:
- Fixed horizontal alignment of exception location info
(i.e. 'String:', 'Filename:' and 'Location:') such that they match
the template exception formatter.
2.3.2 (2011-08-11)
------------------
Bugfixes:
- Fixed issue where i18n:domain would not be inherited through macros
and slots. This fixes issue #37.
2.3.1 (2011-08-11)
------------------
Features:
- The ``Builtin`` node type may now be used to represent any Python
local or global name. This allows expression compilers to refer to
e.g. ``get`` or ``getitem``, or to explicit require a builtin object
such as one from the ``extra_builtins`` dictionary.
Bugfixes:
- Builtins which are not explicitly disallowed may now be redefined
and used as variables (e.g. ``nothing``).
- Fixed compiler issue with circular node annotation loop.
2.3 (2011-08-10)
----------------
Features:
- Added support for the following syntax to disable inline evaluation
in a comment:
<!--? comment appears verbatim (no ${...} evaluation) -->
Note that the initial question mark character (?) will be omitted
from output.
- The parser now accepts '<' and '>' in attributes. Note that this is
invalid markup. Previously, the '<' would not be accepted as a valid
attribute value, but this would result in an 'unexpected end tag'
error elsewhere. This fixes issue #38.
- The expression compiler now provides methods ``assign_text`` and
``assign_value`` such that a template engine might configure this
value conversion to support e.g. encoded strings.
Note that currently, the only client for the ``assign_text`` method
is the string expression type.
- Enable template loader for string-based template classes. Note that
the ``filename`` keyword argument may be provided on initialization
to identify the template source by filename. This fixes issue #36.
- Added ``extra_builtins`` option to the page template class. These
builtins are added to the default builtins dictionary at cook time
and may be provided at initialization using the ``extra_builtins``
keyword argument.
Bugfixes:
- If a translation domain is set for a fill slot, use this setting
instead of the macro template domain.
- The Python expression compiler now correctly decodes HTML entities
``'gt'`` and ``'lt'``. This fixes issue #32.
- The string expression compiler now correctly handles encoded text
(when support for encoded strings is enabled). This fixes issue #35.
- Fixed an issue where setting the ``filename`` attribute on a
file-based template would not automatically cause an invalidation.
- Exceptions raised by Chameleon can now be copied via
``copy.copy``. This fixes issue #36.
[leorochael]
- If copying the exception fails in the exception handler, simply
re-raise the original exception and log a warning.
2.2 (2011-07-28)
----------------
Features:
- Added new expression type ``load:`` that allows loading a
template. Both relative and absolute paths are supported. If the
path given is relative, then it will be resolved with respect to the
directory of the template.
- Added support for dynamic evaluation of expressions.
Note that this is to support legacy applications. It is not
currently wired into the provided template classes.
- Template classes now have a ``builtins`` attribute which may be used
to define built-in variables always available in the template
variable scope.
Incompatibilities:
- The file-based template class no longer accepts a parameter
``loader``. This parameter would be used to load a template from a
relative path, using a ``find(filename)`` method. This was however,
undocumented, and probably not very useful since we have the
``TemplateLoader`` mechanism already.
- The compiled template module now contains an ``initialize`` function
which takes values that map to the template builtins. The return
value of this function is a dictionary that contains the render
functions.
Bugfixes:
- The file-based template class no longer verifies the existance of a
template file (using ``os.lstat``). This now happens implicitly if
eager parsing is enabled, or otherwise when first needed (e.g. at
render time).
This is classified as a bug fix because the previous behavior was
probably not what you'd expect, especially if an application
initializes a lot of templates without needing to render them
immediately.
2.1.1 (2011-07-28)
------------------
Features:
- Improved exception display. The expression string is now shown in
the context of the original source (if available) with a marker
string indicating the location of the expression in the template
source.
Bugfixes:
- The ``structure`` insertion mode now correctly decodes entities for
any expression type (including ``string:``). This fixes issue #30.
- Don't show internal variables in the exception formatter variable
listing.
2.1 (2011-07-25)
----------------
Features:
- Expression interpolation (using the ``${...}`` operator and
previously also ``$identifier``) now requires braces everywhere
except inside the ``string:`` expression type.
This change is motivated by a number of legacy templates in which
the interpolation format without braces ``$identifier`` appears as
text.
2.0.2 (2011-07-25)
------------------
Bugfixes:
- Don't use dynamic variable scope for lambda-scoped variables (#27).
- Avoid duplication of exception class and message in traceback.
- Fixed issue where a ``metal:fill-slot`` would be ignored if a macro
was set to be used on the same element (#16).
2.0.1 (2011-07-23)
------------------
Bugfixes:
- Fixed issue where global variable definition from macro slots would
fail (they would instead be local). This also affects error
reporting from inside slots because this would be recorded
internally as a global.
- Fixed issue with template cache digest (used for filenames); modules
are now invalidated whenever any changes are made to the
distribution set available (packages on ``sys.path``).
- Fixed exception handler to better let exceptions propagate through
the renderer.
- The disk-based module compiler now mangles template source filenames
such that the output Python module is valid and at root level (dots
and hyphens are replaced by an underscore). This fixes issue #17.
- Fixed translations (i18n) on Python 2.5.
2.0 (2011-07-14)
----------------
- Point release.
2.0-rc14 (2011-07-13)
---------------------
Bugfixes:
- The tab character (``\t``) is now parsed correctly when used inside
tags.
Features:
- The ``RepeatDict`` class now works as a proxy behind a seperate
dictionary instance.
- Added template constructor option ``keep_body`` which is a flag
(also available as a class attribute) that controls whether to save
the template body input in the ``body`` attribute.
This is disabled by default, unless debug-mode is enabled.
- The page template loader class now accepts an optional ``formats``
argument which can be used to select an alternative template class.
2.0-rc13 (2011-07-07)
---------------------
Bugfixes:
- The backslash character (followed by optional whitespace and a line
break) was not correctly interpreted as a continuation for Python
expressions.
Features:
- The Python expression implementation is now more flexible for
external subclassing via a new ``parse`` method.
2.0-rc12 (2011-07-04)
---------------------
Bugfixes:
- Initial keyword arguments passed to a template now no longer "leak"
into the template variable space after a macro call.
- An unexpected end tag is now an unrecoverable error.
Features:
- Improve exception output.
2.0-rc11 (2011-05-26)
---------------------
Bugfixes:
- Fixed issue where variable names that begin with an underscore were
seemingly allowed, but their use resulted in a compiler error.
Features:
- Template variable names are now allowed to be prefixed with a single
underscore, but not two or more (reserved for internal use).
Examples of valid names::
item
ITEM
_item
camelCase
underscore_delimited
help
- Added support for Genshi's comment "drop" syntax::
<!--! This comment will be dropped -->
Note the additional exclamation (!) character.
This fixes addresses issue #10.
2.0-rc10 (2011-05-24)
---------------------
Bugfixes:
- The ``tal:attributes`` statement now correctly operates
case-insensitive. The attribute name given in the statement will
replace an existing attribute with the same name, without respect to
case.
Features:
- Added ``meta:interpolation`` statement to control expression
interpolation setting.
Strings that disable the setting: ``"off"`` and ``"false"``.
Strings that enable the setting: ``"on"`` and ``"true"``.
- Expression interpolation now works inside XML comments.
2.0-rc9 (2011-05-05)
--------------------
Features:
- Better debugging support for string decode and conversion. If a
naive join fails, each element in the output will now be attempted
coerced to unicode to try and trigger the failure near to the bad
string.
2.0-rc8 (2011-04-11)
--------------------
Bugfixes:
- If a macro defines two slots with the same name, a caller will now
fill both with a single usage.
- If a valid of ``None`` is provided as the translation function
argument, we now fall back to the class default.
2.0-rc7 (2011-03-29)
--------------------
Bugfixes:
- Fixed issue with Python 2.5 compatibility AST. This affected at
least PyPy 1.4.
Features:
- The ``auto_reload`` setting now defaults to the class value; the
base template class gives a default value of
``chameleon.config.AUTO_RELOAD``. This change allows a subclass to
provide a custom default value (such as an application-specific
debug mode setting).
2.0-rc6 (2011-03-19)
--------------------
Features:
- Added support for ``target_language`` keyword argument to render
method. If provided, the argument will be curried onto the
translation function.
Bugfixes:
- The HTML entities 'lt', 'gt' and 'quot' appearing inside content
subtition expressions are now translated into their native character
values. This fixes an issue where you could not dynamically create
elements using the ``structure`` (which is possible in ZPT). The
need to create such structure stems from the lack of an expression
interpolation operator in ZPT.
- Fixed duplicate file pointer issue with test suite (affected Windows
platforms only). This fixes issue #9.
[oliora]
- Use already open file using ``os.fdopen`` when trying to write out
the module source. This fixes LP #731803.
2.0-rc5 (2011-03-07)
--------------------
Bugfixes:
- Fixed a number of issues concerning the escaping of attribute
values:
1) Static attribute values are now included as they appear in the
source.
This means that invalid attribute values such as ``"true &&
false"`` are now left alone. It's not the job of the template
engine to correct such markup, at least not in the default mode
of operation.
2) The string expression compiler no longer unescapes
values. Instead, this is left to each expression
compiler. Currently only the Python expression compiler unescapes
its input.
3) The dynamic escape code sequence now correctly only replaces
ampersands that are part of an HTML escape format.
Imports:
- The page template classes and the loader class can now be imported
directly from the ``chameleon`` module.
Features:
- If a custom template loader is not provided, relative paths are now
resolved using ``os.abspath`` (i.e. to the current working
directory).
- Absolute paths are normalized using ``os.path.normpath`` and
``os.path.expanduser``. This ensures that all paths are kept in
their "canonical" form.
2.0-rc4 (2011-03-03)
--------------------
Bugfixes:
- Fixed an issue where the output of an end-to-end string expression
would raise an exception if the expression evaluated to ``None`` (it
should simply output nothing).
- The ``convert`` function (which is configurable on the template
class level) now defaults to the ``translate`` function (at
run-time).
This fixes an issue where message objects were not translated (and
thus converted to a string) using the a provided ``translate``
function.
- Fixed string interpolation issue where an expression immediately
succeeded by a right curly bracket would not parse.
This fixes issue #5.
- Fixed error where ``tal:condition`` would be evaluated after
``tal:repeat``.
Features:
- Python expression is now a TALES expression. That means that the
pipe operator can be used to chain two or more expressions in a
try-except sequence.
This behavior was ported from the 1.x series. Note that while it's
still possible to use the pipe character ("|") in an expression, it
must now be escaped.
- The template cache can now be shared by multiple processes.
2.0-rc3 (2011-03-02)
--------------------
Bugfixes:
- Fixed ``atexit`` handler.
This fixes issue #3.
- If a cache directory is specified, it will now be used even when not
in debug mode.
- Allow "comment" attribute in the TAL namespace.
This fixes an issue in the sense that the reference engine allows
any attribute within the TAL namespace. However, only "comment" is
in common use.
- The template constructor now accepts a flag ``debug`` which puts the
template *instance* into debug-mode regardless of the global
setting.
This fixes issue #1.
Features:
- Added exception handler for exceptions raised while evaluating an
expression.
This handler raises (or attempts to) a new exception of the type
``RenderError``, with an additional base class of the original
exception class. The string value of the exception is a formatted
error message which includes the expression that caused the
exception.
If we are unable to create the exception class, the original
exception is re-raised.
2.0-rc2 (2011-02-28)
--------------------
- Fixed upload issue.
2.0-rc1 (2011-02-28)
--------------------
- Initial public release. See documentation for what's new in this
series.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
|