Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipython/ipython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9.0.1
Choose a base ref
...
head repository: ipython/ipython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9.0.2
Choose a head ref
  • 15 commits
  • 14 files changed
  • 4 contributors

Commits on Mar 3, 2025

  1. back to dev

    Carreau committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    1a7363f View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2025

  1. Configuration menu
    Copy the full SHA
    2bdf8ad View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2025

  1. Configuration menu
    Copy the full SHA
    6b9ab89 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2025

  1. Configuration menu
    Copy the full SHA
    c11def9 View commit details
    Browse the repository at this point in the history
  2. tip typo (#14816)

    this was bothering me on startup :)
    Carreau authored Mar 6, 2025
    Configuration menu
    Copy the full SHA
    a6a4b0a View commit details
    Browse the repository at this point in the history
  3. Fix accept invisible completions

    See `#14137`, I think there are invisible completions and when the
    current line is a prefix of an existing history entry, we happend to
    have autocompletions but they are not shown.
    
    I need to check how this affects the multiline completions though, and
    we might need a more general solution.
    Carreau committed Mar 6, 2025
    Configuration menu
    Copy the full SHA
    5c05926 View commit details
    Browse the repository at this point in the history
  4. reaccept non lowercase colorscheme

    This otherwise break pycharm
    
    See #14810
    Carreau committed Mar 6, 2025
    Configuration menu
    Copy the full SHA
    29a7f1e View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2025

  1. Fix logstart option.

    This should fix issue #14825
    Carreau committed Mar 7, 2025
    Configuration menu
    Copy the full SHA
    ae029cb View commit details
    Browse the repository at this point in the history
  2. parametrize and reformat

    Carreau committed Mar 7, 2025
    Configuration menu
    Copy the full SHA
    3531299 View commit details
    Browse the repository at this point in the history
  3. Fix logstart option. (#14826)

    This should fix issue #14825
    Carreau authored Mar 7, 2025
    Configuration menu
    Copy the full SHA
    40e2853 View commit details
    Browse the repository at this point in the history
  4. fix: transform inputs with dedent (#14822)

    fixes: #14818
    
    The `leading_indent` function in IPython/core/inputtransformer2.py had
    an issue in that it checked to see if the first line had a comment
    anywhere in it, and if it did, then it just would ignore checking if the
    rest of the input could possibly need to have indentation removed.
    
    The main issue is that it looks like the function assumes you can just
    check the first line, but that is not the case. You need to check the
    indentation level of every line in the input and remove the minimum (in
    terms of length) indentation common to all lines.
    
    I'm not sure why this function isn't just using `textwrap.dedent`, which
    seems like it does exactly what we want to be doing. I just switched the
    function to use this.
    
    For the tests, it turns out that there was a test cases that wasn't even
    being checked. I fixed that as well and added the sample I noted in
    #14818 as a 3rd test case.
    
    While working on this, I wrote a more involved test, which didn't really
    fit with the style of the other tests, but I'll put it here in case you
    want to include it.
    
    <details>
    
    ```python
    def test_regression_14818():
        from IPython.core import inputtransformer2 as ipt2
        from textwrap import dedent
    
        def indent(text, prefix='    '):
            """Indents a block of text"""
            return prefix + text.replace('\n', '\n' + prefix)
    
        targets = {}
        targets['two_statements'] = dedent(
            """
            x = 1
            print(x)
            """
        ).strip()
        targets['aligned_comment_and_two_statements'] = dedent(
            """
            # This is a comment
            x = 1
            print(x)
            """
        ).strip()
        targets['misaligned_comment_and_two_statements'] = dedent(
            """
                # This is a misaligned comment
            x = 1
            print(x)
            """
        ).strip()
    
        # Check that all of the targets are valid python
        for target_name, target_code in targets.items():
            exec(target_code, {}, {})
    
        # Modify the target text to test that ipt2.leading_indent can undo the
        # modifications.
        cases = []
        for target_name, target_code in targets.items():
            cases.append({
                'name': target_name + '_space',
                'sample': indent(target_code, prefix='    '),
                'target': target_code,
            })
            cases.append({
                'name': target_name + '_tab',
                'sample': indent(target_code, prefix='\t'),
                'target': target_code,
            })
    
        for case in cases:
            case_name = case['name']
            lines = case['sample'].splitlines(keepends=True)
            recon_lines = ipt2.leading_indent(lines)
            reconstructed = ''.join(recon_lines)
            assert reconstructed == case['target'], f'failed case {case_name}'
    ```
    
    </details>
    Carreau authored Mar 7, 2025
    Configuration menu
    Copy the full SHA
    3c6a7a3 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2025

  1. reaccept non lowercase colorscheme (#14824)

    This otherwise break pycharm
    
    Plus a few other fixes.
    
    See #14810
    Carreau authored Mar 8, 2025
    Configuration menu
    Copy the full SHA
    01f1876 View commit details
    Browse the repository at this point in the history
  2. Fix accept invisible completions (#14823)

    See `#14137`, I think there are invisible completions and when the
    current line is a prefix of an existing history entry, we happend to
    have autocompletions but they are not shown.
    
    I need to check how this affects the multiline completions though, and
    we might need a more general solution.
    Carreau authored Mar 8, 2025
    Configuration menu
    Copy the full SHA
    c3032f8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a3505d View commit details
    Browse the repository at this point in the history
  4. release 9.0.2

    Carreau committed Mar 8, 2025
    Configuration menu
    Copy the full SHA
    9970f5e View commit details
    Browse the repository at this point in the history
Loading