Skip to content

Conversation

@henryiii
Copy link
Collaborator

@henryiii henryiii commented May 20, 2025

Simpler changelog blocks in pull requests, and simpler in creating the GitHub releases.

Removed the mention of the upgrade guide as I think not one single person has ever added anything in that block.

  • chore: move changelog to markdown
  • chore: switch to simpler block def

📚 Documentation preview 📚: https://pybind11--5672.org.readthedocs.build/

@henryiii
Copy link
Collaborator Author

3.14t macOS.

______________ test_run_in_process_direct[_intentional_deadlock] _______________

test_fn = <function _intentional_deadlock at 0x2898f7a4740>

    @pytest.mark.skipif(sys.platform.startswith("emscripten"), reason="Requires threads")
    @pytest.mark.parametrize("test_fn", ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK)
    @pytest.mark.skipif(
        "env.GRAALPY",
        reason="GraalPy transiently complains about unfinished threads at process exit",
    )
    def test_run_in_process_direct(test_fn):
        """Makes sure there is no GIL deadlock when using processes.
    
        This test is for completion, but it was never an issue.
        """
>       assert _run_in_process(test_fn) == 0

test_fn    = <function _intentional_deadlock at 0x2898f7a4740>

test_gil_scoped.py:269: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

target = <function _intentional_deadlock at 0x2898f7a4740>, args = ()
kwargs = {}, test_fn = <function _intentional_deadlock at 0x2898f7a4740>
timeout = 0.1
process = <Process name='Process-72' pid=5355 parent=5115 stopped exitcode=0 daemon>
t_start = 1747718249.89369, t_delta = 0.10827970504760742, @py_assert1 = 0
@py_assert4 = None, @py_assert3 = False
@py_format6 = "0\n{0 = <Process name='Process-72' pid=5355 parent=5115 stopped exitcode=0 daemon>.exitcode\n} is None"
@py_format8 = "assert 0\n{0 = <Process name='Process-72' pid=5355 parent=5115 stopped exitcode=0 daemon>.exitcode\n} is None"

    def _run_in_process(target, *args, **kwargs):
        test_fn = target if len(args) == 0 else args[0]
        # Do not need to wait much, 10s should be more than enough.
        timeout = 0.1 if test_fn is _intentional_deadlock else 10
        process = multiprocessing.Process(target=target, args=args, kwargs=kwargs)
        process.daemon = True
        try:
            t_start = time.time()
            process.start()
            if timeout >= 100:  # For debugging.
                print(
                    "\nprocess.pid STARTED", process.pid, (sys.argv, target, args, kwargs)
                )
                print(f"COPY-PASTE-THIS: gdb {sys.argv[0]} -p {process.pid}", flush=True)
            process.join(timeout=timeout)
            if timeout >= 100:
                print("\nprocess.pid JOINED", process.pid, flush=True)
            t_delta = time.time() - t_start
            if process.exitcode == 66 and m.defined_THREAD_SANITIZER:  # Issue #2754
                # WOULD-BE-NICE-TO-HAVE: Check that the message below is actually in the output.
                # Maybe this could work:
                # https://gist.github.com/alexeygrigorev/01ce847f2e721b513b42ea4a6c96905e
                pytest.skip(
                    "ThreadSanitizer: starting new threads after multi-threaded fork is not supported."
                )
            elif test_fn is _intentional_deadlock:
>               assert process.exitcode is None
E               AssertionError: assert 0 is None
E                +  where 0 = <Process name='Process-72' pid=5355 parent=5115 stopped exitcode=0 daemon>.exitcode

args       = ()
kwargs     = {}
process    = <Process name='Process-72' pid=5355 parent=5115 stopped exitcode=0 daemon>
t_delta    = 0.10827970504760742
t_start    = 1747718249.89369
target     = <function _intentional_deadlock at 0x2898f7a4740>
test_fn    = <function _intentional_deadlock at 0x2898f7a4740>
timeout    = 0.1

test_gil_scoped.py:187: AssertionError
=============================== warnings summary ===============================
<frozen importlib._bootstrap>:491
  <frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'exo_planet_c_api', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR converts changelog sections from reStructuredText to Markdown and updates references accordingly.

  • Renames the changelog entry regex and adjusts its pattern for Markdown.
  • Updates output formatting to use Markdown syntax and switches file references from .rst to .md.
  • Updates GitHub configuration files to recognize the new changelog file.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/make_changelog.py Renames regex and prints entries in Markdown, handles legacy RST entries separately.
docs/release.rst Updates release documentation to reference the Markdown changelog.
.github/pull_request_template.md Adjusts the pull request template to accommodate the new changelog format.
.github/labeler_merged.yml Updates file globs to target the Markdown changelog.
.github/labeler.yml Adjusts labeler configuration to ignore the Markdown changelog.
Comments suppressed due to low confidence (1)

tools/make_changelog.py:34

  • [nitpick] Consider renaming the variable 'old' to a more descriptive name such as 'old_rst_entries' to clarify its purpose.
old = []

@henryiii henryiii force-pushed the henryiii/chore/mdchglg branch from 7ff1af2 to d647e16 Compare May 20, 2025 15:17
henryiii added 2 commits May 20, 2025 11:53
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii force-pushed the henryiii/chore/mdchglg branch from b074ab8 to 1e1bd6d Compare May 20, 2025 15:55
@henryiii
Copy link
Collaborator Author

I also would like to grep and fix PYBIND11_GLOBAL_, it's, and setup.py, but will do it in a followup. We did lose the contents of .. <...>, but I don't think it really matters, it's just a grouping.

@henryiii henryiii merged commit ec8b050 into pybind:master May 20, 2025
74 checks passed
@henryiii henryiii deleted the henryiii/chore/mdchglg branch May 20, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant