Skip to content

ci: also run upstream Nvim if_pyth tests#611

Merged
justinmk merged 1 commit intoneovim:masterfrom
brianhuster:oldtest
Feb 6, 2026
Merged

ci: also run upstream Nvim if_pyth tests#611
justinmk merged 1 commit intoneovim:masterfrom
brianhuster:oldtest

Conversation

@brianhuster
Copy link
Contributor

@brianhuster brianhuster commented Feb 5, 2026

Nvim oldtest for if_pyth cover some cases not covered by test suite of pynvim. Instead of porting them to pynvim, we can just clone neovim repo to run those oldtest

@brianhuster brianhuster force-pushed the oldtest branch 2 times, most recently from 6e16abe to 7e2dfd3 Compare February 5, 2026 15:22
@brianhuster
Copy link
Contributor Author

Currently oldtest fail with the following error

Found errors in Test_python3_pyeval():
Caught exception in Test_python3_pyeval(): Vim(return):E5108: Lua: Vim:error caught while processing request 'python_eval ['vim']': Traceback (most recent call last):stack traceback:   [C]: at 0x5c4857697c46 @ command line..script /media/brianhuster/D/Projects/neovim/test/old/testdir/runtest.vim[657]..function RunTheTest[61]..Test_python3_pyeval[42]..provider#python3#Call, line 1

The test fail is

  let caught_859 = 0
  try
    let v = py3eval("vim")
  catch /can not serialize 'LegacyVim' object/
    let caught_859 = 1
  endtry
  call assert_equal(1, caught_859)

For pynvim installed with uv tool install pynvim --reinstall, if I run :let v = pyeval("vim"), it returns error can not serialize 'LegacyVim' object as the test expects. But if checkout to latest 0.6.0 release (git checkout 466ffc8cc0caacca91c434d0adb61dfba73ccd7e) and install from source with uv tool install . --reinstall, then run :let v = pyeval("vim") then the error is just

E5108: Lua: Vim:error caught while processing request 'python_eval ['vim']': Traceback (most recent call last):
stack traceback:
	[C]: at 0x58fda7d70460

No idea why it cannot show pynvim error now

@justinmk
Copy link
Member

justinmk commented Feb 5, 2026

LegacyVim is stored in sys.modules here:

self.legacy_vim = LegacyVim.from_nvim(nvim)
sys.modules['vim'] = self.legacy_vim

perhaps the VimPathFinder.find_module which was removed in 9f7df02 was helping with serialization? Try reverting that commit here?

@brianhuster

This comment was marked as resolved.

@justinmk
Copy link
Member

justinmk commented Feb 5, 2026

if I install from uv registry, it works. But if I checkout to the same release (0.6.0) and install from current directory, it doesn't

We do some pre-processing for releases, e.g. we remove debug logging:

for f in $(find . -name '*.py'); do
echo "Processing: $f"
../scripts/logging_statement_modifier.py "$f"

@brianhuster
Copy link
Contributor Author

Oh yes, that is the reason. If I run ./scripts/disable_log_statements.sh before installing from source, then tests will pass

@brianhuster brianhuster force-pushed the oldtest branch 13 times, most recently from 6d40891 to 596f1d5 Compare February 5, 2026 18:16
@brianhuster brianhuster force-pushed the oldtest branch 2 times, most recently from e7955ff to 179ab2e Compare February 6, 2026 06:29
@brianhuster

This comment was marked as outdated.

@brianhuster brianhuster force-pushed the oldtest branch 5 times, most recently from 57b517a to 15e16ea Compare February 6, 2026 07:16
@brianhuster brianhuster marked this pull request as ready for review February 6, 2026 10:47
@brianhuster
Copy link
Contributor Author

Ready for review. Only a few MacOS tests (that have always been flaky) fail

@brianhuster brianhuster force-pushed the oldtest branch 2 times, most recently from 963cd75 to 6d4af1f Compare February 6, 2026 13:24
@brianhuster brianhuster force-pushed the oldtest branch 4 times, most recently from f2b4206 to 555cb27 Compare February 6, 2026 13:57
@justinmk
Copy link
Member

justinmk commented Feb 6, 2026

@brianhuster brianhuster force-pushed the oldtest branch 4 times, most recently from 3313694 to 151bcb4 Compare February 6, 2026 14:25
Nvim oldtest for if_pyth cover some cases not covered by test suite of
pynvim. Instead of porting them to pynvim, we can just clone neovim repo
to run those oldtest

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
@justinmk justinmk merged commit c5279a5 into neovim:master Feb 6, 2026
18 of 22 checks passed
@justinmk justinmk changed the title ci: also run Nvim oldtest for if_pyth ci: also run upstream Nvim if_pyth tests Feb 6, 2026
@brianhuster brianhuster deleted the oldtest branch February 7, 2026 03:25
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.

2 participants