Skip to content

Upgrading weasyprint 53 to 54

Review needed53.4 → 54.3New7Changed3Fixed22Other8

Review neededUpgrade verdict

3 changed defaults.

  • Nothing in this range needs changes to your code. It adds features and fixes.
Nothing to change

No breaking, platform, security or deprecated items in this range.

Nothing in this upgrade needs a code or configuration change.

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

  • changed: method HTML.write_pdf(target=…, stylesheets=…, zoom=…, attachments=…, presentational_hints=…, optimize_size=…, font_config=…, counter_style=…, image_cache=…) → method HTML.write_pdf(target=…, stylesheets=…, zoom=…, attachments=…, finisher=…, presentational_hints=…, optimize_size=…, font_config=…, counter_style=…, image_cache=…)
  • added: function expand_text_align(base_url, name, tokens)
  • removed: function text_align(keyword)
  • changed: function display(keyword) → function display(tokens)
  • added: function footnote_display(keyword)
  • added: function footnote_policy(keyword)
  • added: function text_align_all(keyword)
  • added: function text_align_last(keyword)
  • added: function draw_emojis(stream, font_size, x, y, emojis)
  • removed: field TextBox.ascii_to_wide
  • added: class FootnoteAreaBox(BlockBox)
  • added: constructor FootnoteAreaBox(page, style)
  • added: field Box.footnote
  • added: method Box.is_footnote()
  • changed: function build_formatting_structure(element_tree, style_for, get_image_from_uri, base_url, target_collector, counter_style) → function build_formatting_structure(element_tree, style_for, get_image_from_uri, base_url, target_collector, counter_style, footnotes)
  • changed: function element_to_box(element, style_for, get_image_from_uri, base_url, target_collector, counter_style, state=…) → function element_to_box(element, style_for, get_image_from_uri, base_url, target_collector, counter_style, footnotes, state=…)
  • added: function create_anonymous_boxes(box)
  • added: function process_text_transform(box)
  • added: variable ASCII_TO_WIDE
  • changed: constructor RasterImage(pillow_image, optimize_size) → constructor RasterImage(pillow_image, image_id, optimize_size)
  • changed: constructor SVGImage(string, base_url, url_fetcher, context) → constructor SVGImage(tree, base_url, url_fetcher, context)
  • added: export block_level_layout
  • added: export build
  • added: method LayoutContext.layout_footnote(footnote)
  • added: method LayoutContext.overflows_page(bottom_space, position_y)
  • added: method LayoutContext.report_footnote(footnote)
  • changed: function absolute_block(context, box, containing_block, fixed_boxes) → function absolute_block(context, box, containing_block, fixed_boxes, bottom_space, skip_stack)
  • changed: function absolute_box_layout(context, box, containing_block, fixed_boxes) → function absolute_box_layout(context, box, containing_block, fixed_boxes, bottom_space, skip_stack)
  • changed: function absolute_flex(context, box, containing_block_sizes, fixed_boxes, containing_block) → function absolute_flex(context, box, containing_block, fixed_boxes, bottom_space, skip_stack, containing_block_sizes)
  • changed: function absolute_layout(context, placeholder, containing_block, fixed_boxes) → function absolute_layout(context, placeholder, containing_block, fixed_boxes, bottom_space, skip_stack)
  • added: function box_rectangle(box, which_rectangle)
  • added: function layout_background_layer(box, page, resolution, image, size, clip, repeat, origin, position, attachment)
  • added: function layout_backgrounds(page, get_image_from_uri)
  • added: function layout_box_backgrounds(page, box, get_image_from_uri, layout_children=…, style=…)
  • added: function set_canvas_background(page, get_image_from_uri)
  • added: variable Background
  • added: variable BackgroundLayer
  • removed: function box_rectangle(box, which_rectangle)
  • removed: function layout_background_layer(box, page, resolution, image, size, clip, repeat, origin, position, attachment)
  • removed: function layout_backgrounds(page, get_image_from_uri)
  • removed: function layout_box_backgrounds(page, box, get_image_from_uri, layout_children=…, style=…)
  • removed: function set_canvas_background(page, get_image_from_uri)
  • removed: variable Background
  • removed: variable BackgroundLayer
  • added: function block_box_layout(context, box, bottom_space, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • added: function block_container_layout(context, box, bottom_space, skip_stack, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • added: function block_level_layout(context, box, bottom_space, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • added: function block_level_layout_switch(context, box, bottom_space, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • added: function block_level_page_break(sibling_before, sibling_after)
  • added: function block_level_page_name(sibling_before, sibling_after)
  • added: function block_level_width(box, containing_block)
  • added: function collapse_margin(adjoining_margins)
  • added: function establishes_formatting_context(box)
  • added: function find_earlier_page_break(children, absolute_boxes, fixed_boxes)
  • added: function find_last_in_flow_child(children)
  • added: function relative_positioning(box, containing_block)
  • added: function remove_placeholders(box_list, absolute_boxes, fixed_boxes)
  • added: function reversed_enumerate(seq)
  • removed: function block_box_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • removed: function block_container_layout(context, box, max_position_y, skip_stack, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • removed: function block_level_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard)
  • removed: 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 block_level_page_break(sibling_before, sibling_after)
  • removed: function block_level_page_name(sibling_before, sibling_after)
  • removed: function block_level_width(box, containing_block)
  • removed: function block_replaced_box_layout(box, containing_block)
  • removed: function block_replaced_width(box, containing_block)
  • removed: function collapse_margin(adjoining_margins)
  • removed: function establishes_formatting_context(box)
  • removed: function find_earlier_page_break(children, absolute_boxes, fixed_boxes)
  • removed: function relative_positioning(box, containing_block)
  • removed: function remove_placeholders(box_list, absolute_boxes, fixed_boxes)
  • removed: function reversed_enumerate(seq)
  • added: function columns_layout(context, box, bottom_space, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins)
  • removed: function columns_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins)
  • changed: function flex_layout(context, box, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes) → function flex_layout(context, box, bottom_space, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes)
  • changed: function float_layout(context, box, containing_block, absolute_boxes, fixed_boxes) → function float_layout(context, box, containing_block, absolute_boxes, fixed_boxes, bottom_space, skip_stack)
  • added: function add_word_spacing(context, box, justification_spacing, x_advance)
  • added: function aligned_subtree_verticality(box, top_bottom_subtrees, baseline_y)
  • added: function atomic_box(context, box, position_x, skip_stack, containing_block, absolute_boxes, fixed_boxes)
  • added: function can_break_inside(box)
  • added: function count_spaces(box)
  • added: function first_letter_to_box(box, skip_stack, first_letter_style)
  • added: function get_next_linebox(context, linebox, position_y, bottom_space, skip_stack, containing_block, absolute_boxes, fixed_boxes, first_letter_style)
  • added: function inline_block_baseline(box)
  • added: function inline_block_box_layout(context, box, position_x, skip_stack, containing_block, absolute_boxes, fixed_boxes)
  • added: function inline_block_width(box, context, containing_block)
  • added: function inline_box_verticality(box, top_bottom_subtrees, baseline_y)
  • added: function is_phantom_linebox(linebox)
  • added: function iter_line_boxes(context, box, position_y, bottom_space, skip_stack, containing_block, absolute_boxes, fixed_boxes, first_letter_style)
  • added: function justify_line(context, line, extra_width)
  • added: function line_box_verticality(box)
  • added: function remove_last_whitespace(context, box)
  • added: function skip_first_whitespace(box, skip_stack)
  • added: function split_inline_box(context, box, position_x, max_x, bottom_space, skip_stack, containing_block, absolute_boxes, fixed_boxes, line_placeholders, waiting_floats, line_children)
  • added: function split_inline_level(context, box, position_x, max_x, bottom_space, skip_stack, containing_block, absolute_boxes, fixed_boxes, line_placeholders, waiting_floats, line_children)
  • added: function split_text_box(context, box, available_width, skip)
  • added: function text_align(context, line, available_width, last)
  • added: function translate_subtree(box, dy)
  • removed: function add_word_spacing(context, box, justification_spacing, x_advance)
  • removed: function aligned_subtree_verticality(box, top_bottom_subtrees, baseline_y)
  • removed: function atomic_box(context, box, position_x, skip_stack, containing_block, absolute_boxes, fixed_boxes)
  • removed: function can_break_inside(box)
  • removed: function count_spaces(box)
  • removed: function first_letter_to_box(box, skip_stack, first_letter_style)
  • removed: function get_next_linebox(context, linebox, position_y, skip_stack, containing_block, absolute_boxes, fixed_boxes, first_letter_style)
  • removed: function handle_leaders(context, line, containing_block)
  • removed: function inline_block_baseline(box)
  • removed: function inline_block_box_layout(context, box, position_x, skip_stack, containing_block, absolute_boxes, fixed_boxes)
  • removed: function inline_block_width(box, context, containing_block)
  • removed: function inline_box_verticality(box, top_bottom_subtrees, baseline_y)
  • removed: function inline_replaced_box_layout(box, containing_block)
  • removed: function inline_replaced_box_width_height(box, containing_block)
  • removed: function is_phantom_linebox(linebox)
  • removed: function iter_line_boxes(context, box, position_y, skip_stack, containing_block, absolute_boxes, fixed_boxes, first_letter_style)
  • removed: function justify_line(context, line, extra_width)
  • removed: function leader_index(box)
  • removed: function line_box_verticality(box)
  • removed: function min_max_auto_replaced(box)
  • removed: function remove_last_whitespace(context, box)
  • removed: function replaced_box_height(box)
  • removed: function replaced_box_width(box, containing_block)
  • removed: function skip_first_whitespace(box, skip_stack)
  • removed: function split_inline_box(context, box, position_x, max_x, skip_stack, containing_block, absolute_boxes, fixed_boxes, line_placeholders, waiting_floats, line_children)
  • removed: function split_inline_level(context, box, position_x, max_x, skip_stack, containing_block, absolute_boxes, fixed_boxes, line_placeholders, waiting_floats, line_children)
  • removed: function split_text_box(context, box, available_width, skip)
  • removed: function text_align(context, line, available_width, last)
  • removed: function translate_subtree(box, dy)
  • added: function handle_leader(context, line, containing_block)
  • added: function leader_index(box)
  • added: class HorizontalBox(OrientedBox)
  • added: class OrientedBox
  • added: class VerticalBox(OrientedBox)
  • added: constructor HorizontalBox(context, box)
  • added: constructor VerticalBox(context, box)
  • added: function compute_fixed_dimension(context, box, outer, vertical, top_or_left)
  • added: function compute_variable_dimension(context, side_boxes, vertical, outer_sum)
  • added: function make_all_pages(context, root_box, html, pages)
  • added: function make_margin_boxes(context, page, state)
  • added: function make_page(context, root_box, page_type, resume_at, page_number, page_state)
  • added: function margin_box_content_layout(context, page, box)
  • added: function page_height(box, context, containing_block_height)
  • added: function page_width(box, context, containing_block_width)
  • added: function page_width_or_height(box, containing_block_size)
  • added: function remake_page(index, context, root_box, html)
  • added: function set_page_type_computed_styles(page_type, html, style_for)
  • added: method HorizontalBox.restore_box_attributes()
  • added: method OrientedBox.shrink_to_fit(available)
  • added: method VerticalBox.restore_box_attributes()
  • added: property HorizontalBox.max_content_size
  • added: property HorizontalBox.min_content_size
  • added: property OrientedBox.outer
  • added: property OrientedBox.outer_max_content_size
  • added: property OrientedBox.outer_min_content_size
  • added: property OrientedBox.sugar
  • added: property VerticalBox.max_content_size
  • added: property VerticalBox.min_content_size
  • removed: class HorizontalBox(OrientedBox)
  • removed: class OrientedBox
  • removed: class VerticalBox(OrientedBox)
  • removed: constructor HorizontalBox(context, box)
  • removed: constructor VerticalBox(context, box)
  • removed: function compute_fixed_dimension(context, box, outer, vertical, top_or_left)
  • removed: function compute_variable_dimension(context, side_boxes, vertical, outer_sum)
  • removed: function make_all_pages(context, root_box, html, pages)
  • removed: function make_margin_boxes(context, page, state)
  • removed: function make_page(context, root_box, page_type, resume_at, page_number, page_state)
  • removed: function margin_box_content_layout(context, page, box)
  • removed: function page_height(box, context, containing_block_height)
  • removed: function page_width(box, context, containing_block_width)
  • removed: function page_width_or_height(box, containing_block_size)
  • removed: function remake_page(index, context, root_box, html)
  • removed: function set_page_type_computed_styles(page_type, html, style_for)
  • removed: method HorizontalBox.restore_box_attributes()
  • removed: method OrientedBox.shrink_to_fit(available)
  • removed: method VerticalBox.restore_box_attributes()
  • removed: property HorizontalBox.max_content_size
  • removed: property HorizontalBox.min_content_size
  • removed: property OrientedBox.outer
  • removed: property OrientedBox.outer_max_content_size
  • removed: property OrientedBox.outer_min_content_size
  • removed: property OrientedBox.sugar
  • removed: property VerticalBox.max_content_size
  • removed: property VerticalBox.min_content_size
  • added: function percentage(value, refer_to)
  • added: function resolve_one_percentage(box, property_name, refer_to, main_flex_direction=…)
  • added: function resolve_percentages(box, containing_block, main_flex_direction=…)
  • added: function resolve_position_percentages(box, containing_block)
  • added: function resolve_radii_percentages(box)
  • removed: function percentage(value, refer_to)
  • removed: function resolve_one_percentage(box, property_name, refer_to, main_flex_direction=…)
  • removed: function resolve_percentages(box, containing_block, main_flex_direction=…)
  • removed: function resolve_position_percentages(box, containing_block)
  • removed: function resolve_radii_percentages(box)
  • added: function block_replaced_box_layout(context, box, containing_block)
  • added: function block_replaced_width(box, containing_block)
  • added: function inline_replaced_box_layout(box, containing_block)
  • added: function inline_replaced_box_width_height(box, containing_block)
  • added: function min_max_auto_replaced(box)
  • added: function replaced_box_height(box)
  • added: function replaced_box_width(box, containing_block)
  • added: function add_top_padding(box, extra_padding)
  • added: function auto_table_layout(context, box, containing_block)
  • added: function cell_baseline(cell)
  • added: function distribute_excess_width(context, grid, excess_width, column_widths, constrainedness, column_intrinsic_percentages, column_max_content_widths, column_slice=…)
  • added: function find_in_flow_baseline(box, last=…, baseline_types=…)
  • added: function fixed_table_layout(box)
  • added: function table_layout(context, table, bottom_space, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes)
  • added: function table_wrapper_width(context, wrapper, containing_block)
  • removed: function add_top_padding(box, extra_padding)
  • removed: function auto_table_layout(context, box, containing_block)
  • removed: function cell_baseline(cell)
  • removed: function distribute_excess_width(context, grid, excess_width, column_widths, constrainedness, column_intrinsic_percentages, column_max_content_widths, column_slice=…)
  • removed: function find_in_flow_baseline(box, last=…, baseline_types=…)
  • removed: function fixed_table_layout(box)
  • removed: function table_layout(context, table, max_position_y, skip_stack, containing_block, page_is_empty, absolute_boxes, fixed_boxes)
  • removed: function table_wrapper_width(context, wrapper, containing_block)
  • changed: constructor SVG(bytestring_svg, url) → constructor SVG(tree, url)
  • changed: method Node.get_href() → method Node.get_href(base_url)
  • added: export get_url_attribute
  • added: variable dll_directories