Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

emit warning when a block or def is named "body"

Open
#263 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Reproduce the supplied Template example first and compare the output for block names "bodi" and "body". Trace how Template processes block and def names, then verify that naming either one "body" emits a warning while rendering still produces the expected content.

Written by the indexing model from the issue text.

Description

bug

Migrated issue, originally created by Bérenger Enselme (@benselme)

This is using CPython 3.6.1

from mako.template import Template

if __name__ == '__main__':
    s = Template("""aaaa<%block name="bodi"></%block>bbbb""").render()
    assert s == 'aaaabbbb'  # success
    s = Template("""aaaa<%block name="body"></%block>bbbb""").render()
    assert s == 'aaaabbbb'  # failure, s == '\n '
Dominant language
Python
Stars
459
Forks
90
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sqlalchemy/mako

All issues in sqlalchemy/mako

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.