Skip to content

Upgrading weasyprint 51 to 52

Breaking51 → 52.5Platform1New8Changed1Fixed28Other3

BreakingUpgrade verdict

A platform requirement change.

  • Python 3.6+ is now needed, Python 3.5 is not supported anymore.
1 item needs code or config changes

Python requirement changed in 52: >=3.5 → >=3.6.

Adds pillow >=4.0.0.

Platform1
Python 3.6+ is now needed, Python 3.5 is not supported anymore.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • changed: class Attachment(object) → class Attachment
  • changed: class CSS(object) → class CSS
  • changed: class HTML(object) → class HTML
  • changed: constructor CSS(guess=…, filename=…, url=…, file_obj=…, string=…, encoding=…, base_url=…, url_fetcher=…, _check_mime_type=…, media_type=…, font_config=…, matcher=…, page_rules=…) → constructor CSS(guess=…, filename=…, url=…, file_obj=…, string=…, encoding=…, base_url=…, url_fetcher=…, _check_mime_type=…, media_type=…, font_config=…, counter_style=…, matcher=…, page_rules=…)
  • changed: method HTML.render(stylesheets=…, enable_hinting=…, presentational_hints=…, font_config=…) → method HTML.render(stylesheets=…, enable_hinting=…, presentational_hints=…, optimize_images=…, font_config=…, counter_style=…, image_cache=…)
  • changed: method HTML.write_image_surface(stylesheets=…, resolution=…, presentational_hints=…, font_config=…) → method HTML.write_image_surface(stylesheets=…, resolution=…, presentational_hints=…, optimize_images=…, font_config=…, counter_style=…, image_cache=…)
  • changed: method HTML.write_pdf(target=…, stylesheets=…, zoom=…, attachments=…, presentational_hints=…, font_config=…) → method HTML.write_pdf(target=…, stylesheets=…, zoom=…, attachments=…, presentational_hints=…, optimize_images=…, font_config=…, counter_style=…, image_cache=…)
  • changed: method HTML.write_png(target=…, stylesheets=…, resolution=…, presentational_hints=…, font_config=…) → method HTML.write_png(target=…, stylesheets=…, resolution=…, presentational_hints=…, optimize_images=…, font_config=…, counter_style=…, image_cache=…)
  • changed: function find_stylesheets(wrapper_element, device_media_type, url_fetcher, base_url, font_config, page_rules) → function find_stylesheets(wrapper_element, device_media_type, url_fetcher, base_url, font_config, counter_style, page_rules)
  • changed: function get_all_computed_styles(html, user_stylesheets=…, presentational_hints=…, font_config=…, page_rules=…, target_collector=…) → function get_all_computed_styles(html, user_stylesheets=…, presentational_hints=…, font_config=…, counter_style=…, page_rules=…, target_collector=…)
  • changed: function preprocess_stylesheet(device_media_type, base_url, stylesheet_rules, url_fetcher, matcher, page_rules, fonts, font_config, ignore_imports=…) → function preprocess_stylesheet(device_media_type, base_url, stylesheet_rules, url_fetcher, matcher, page_rules, fonts, font_config, counter_style, ignore_imports=…)
  • added: export counters
  • added: export get_url
  • added: function compute_variable(value, name, computed, base_url, parent_style)
  • added: class CounterStyle(dict)
  • added: function parse_counter_style_name(tokens, counter_style)
  • added: function symbol(string_or_url)
  • added: method CounterStyle.copy()
  • added: method CounterStyle.render_marker(counter_name, counter_value)
  • added: method CounterStyle.render_value(counter_value, counter_name=…, counter=…, previous_types=…)
  • added: method CounterStyle.resolve_counter(counter_name, previous_types=…)
  • removed: method TargetCollector.collect_computed_target(anchor_token)
  • changed: class CounterLookupItem(object) → class CounterLookupItem
  • changed: class TargetCollector(object) → class TargetCollector
  • changed: class TargetLookupItem(object) → class TargetLookupItem
  • changed: class CenterKeywordFakeToken(object) → class CenterKeywordFakeToken
  • removed: function font_feature_settings_descriptor(tokens)
  • changed: class NoneFakeToken(object) → class NoneFakeToken
  • changed: class NormalFakeToken(object) → class NormalFakeToken
  • changed: function descriptor(descriptor_name=…, wants_base_url=…) → function descriptor(rule, descriptor_name=…, wants_base_url=…)
  • changed: function preprocess_descriptors(base_url, descriptors) → function preprocess_descriptors(rule, base_url, descriptors)
  • added: function additive_symbols(tokens, base_url)
  • added: function fallback(token)
  • added: function font_feature_settings(tokens)
  • added: function negative(tokens, base_url)
  • added: function pad(tokens, base_url)
  • added: function prefix_suffix(tokens, base_url)
  • added: function range(tokens)
  • added: function symbols(tokens, base_url)
  • added: function system(tokens)
  • added: class AutoFakeToken
  • added: field AutoFakeToken.lower_value
  • added: field AutoFakeToken.type
  • added: function expand_line_clamp(base_url, name, tokens)
  • changed: function list_style_type(keyword) → function list_style_type(token)
  • changed: function property(property_name=…, proprietary=…, unstable=…, wants_base_url=…) → function property(property_name=…, proprietary=…, unstable=…, multiple_values=…, wants_base_url=…)
  • added: function block_ellipsis(token)
  • added: function continue_(keyword)
  • added: function counter_set(tokens)
  • added: function max_lines(token)
  • added: variable MULTIVAL_PROPERTIES
  • changed: class Document(object) → class Document
  • changed: class DocumentMetadata(object) → class DocumentMetadata
  • changed: class Page(object) → class Page
  • changed: method Document.write_pdf(target=…, zoom=…, attachments=…) → method Document.write_pdf(target=…, zoom=…, attachments=…, finisher=…)
  • changed: function draw_inline_level(context, page, box, enable_hinting, offset_x=…, text_overflow=…) → function draw_inline_level(context, page, box, enable_hinting, offset_x=…, text_overflow=…, block_ellipsis=…)
  • changed: function draw_text(context, textbox, enable_hinting, offset_x=…, text_overflow=…) → function draw_text(context, textbox, enable_hinting, offset_x=…, text_overflow=…, block_ellipsis=…)
  • changed: class Box(object) → class Box
  • changed: method ParentBox.copy_with_children(new_children, is_start=…, is_end=…) → method ParentBox.copy_with_children(new_children)
  • added: field LineBox.block_ellipsis
  • added: method InlineLevelBox.remove_decoration(start, end)
  • added: method ParentBox.remove_decoration(start, end)
  • changed: function before_after_to_box(element, pseudo_type, state, style_for, get_image_from_uri, target_collector) → function before_after_to_box(element, pseudo_type, state, style_for, get_image_from_uri, target_collector, counter_style)
  • changed: function build_formatting_structure(element_tree, style_for, get_image_from_uri, base_url, target_collector) → function build_formatting_structure(element_tree, style_for, get_image_from_uri, base_url, target_collector, counter_style)
  • changed: function compute_bookmark_label(element, box, content_list, counter_values, target_collector) → function compute_bookmark_label(element, box, content_list, counter_values, target_collector, counter_style)
  • changed: function compute_content_list(content_list, parent_box, counter_values, css_token, parse_again, target_collector, get_image_from_uri=…, quote_depth=…, quote_style=…, context=…, page=…, element=…) → function compute_content_list(content_list, parent_box, counter_values, css_token, parse_again, target_collector, counter_style, get_image_from_uri=…, quote_depth=…, quote_style=…, context=…, page=…, element=…)
  • changed: function compute_string_set(element, box, string_name, content_list, counter_values, target_collector) → function compute_string_set(element, box, string_name, content_list, counter_values, target_collector, counter_style)
  • changed: function content_to_boxes(style, parent_box, quote_depth, counter_values, get_image_from_uri, target_collector, context=…, page=…) → function content_to_boxes(style, parent_box, quote_depth, counter_values, get_image_from_uri, target_collector, counter_style, context=…, page=…)
  • changed: function element_to_box(element, style_for, get_image_from_uri, base_url, target_collector, state=…) → function element_to_box(element, style_for, get_image_from_uri, base_url, target_collector, counter_style, state=…)
  • changed: function marker_to_box(element, state, parent_style, style_for, get_image_from_uri, target_collector) → function marker_to_box(element, state, parent_style, style_for, get_image_from_uri, target_collector, counter_style)
  • changed: function set_content_lists(element, box, style, counter_values, target_collector) → function set_content_lists(element, box, style, counter_values, target_collector, counter_style)
  • removed: function format(value, counter_style)
  • removed: function format_list_marker(value, counter_style)
  • added: variable HTML5_UA_COUNTER_STYLE
  • changed: class FakeSurface(object) → class FakeSurface
  • changed: class Gradient(object) → class Gradient
  • changed: class RasterImage(object) → class RasterImage
  • changed: class SVGImage(object) → class SVGImage
  • changed: function get_image_from_uri(cache, url_fetcher, url, forced_mime_type=…) → function get_image_from_uri(cache, url_fetcher, optimize_images, url, forced_mime_type=…)
  • changed: class LayoutContext(object) → class LayoutContext
  • changed: constructor LayoutContext(enable_hinting, style_for, get_image_from_uri, font_config, target_collector) → constructor LayoutContext(enable_hinting, style_for, get_image_from_uri, font_config, counter_style, target_collector)
  • changed: class AbsolutePlaceholder(object) → class AbsolutePlaceholder
  • changed: function layout_box_backgrounds(page, box, get_image_from_uri) → function layout_box_backgrounds(page, box, get_image_from_uri, layout_children=…, style=…)
  • changed: function set_canvas_background(page) → function set_canvas_background(page, get_image_from_uri)
  • changed: function block_box_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins) → function block_box_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • changed: function block_container_layout(context, box, max_position_y, skip_stack, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins=…) → function block_container_layout(context, box, max_position_y, skip_stack, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • changed: function block_level_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins) → function block_level_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • changed: function block_level_layout_switch(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins) → function block_level_layout_switch(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • removed: function list_marker_layout(context, box)
  • changed: class OrientedBox(object) → class OrientedBox
  • changed: class PDFDictionary(object) → class PDFDictionary
  • changed: class PDFFile(object) → class PDFFile
  • changed: function write_pdf_metadata(fileobj, scale, url_fetcher, attachments, attachment_links, pages) → function write_pdf_metadata(fileobj, scale, url_fetcher, attachments, attachment_links, pages, finisher)
  • changed: method PDFFile.finish() → method PDFFile.finish(finished=…)
  • changed: class StackingContext(object) → class StackingContext
  • changed: class FontMetrics(object) → class FontMetrics
  • changed: class Layout(object) → class Layout
  • changed: function show_first_line(context, textbox, text_overflow) → function show_first_line(context, textbox, text_overflow, block_ellipsis)
  • added: function get_last_word_end(text, lang)
  • added: variable parser
  • removed: function parse_email(data)
  • removed: function safe_decodebytes(data)