Skip to content

Commit 74c28f1

Browse files
committed
Remove 'self' from interactive shell
1 parent 3e79a8e commit 74c28f1

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ Changelog
22
---------
33

44

5+
2.6.x (unreleased)
6+
~~~~~~~~~~~~~~~~~~
7+
8+
* Remove ``self`` from vars available in interactive mode.
9+
It was giving wrong suggestions in case of typing error.
10+
11+
512
2.6.3 (2026-03-18)
613
~~~~~~~~~~~~~~~~~~
714

odooly.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,6 @@ def connect(self, env_name=None, *, server=None, database=None, user=None):
14651465
assert not user, f"Use client.login({user!r}) instead"
14661466
self._globals['client'] = self.env.client
14671467
self._globals['env'] = env = self.env
1468-
self._globals['self'] = env.user if env.uid else None
14691468
self._set_prompt()
14701469
# Logged in?
14711470
if env.uid:

odooly_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def patch_colors(module):
127127
global THEME
128128
try: # Python >= 3.14
129129
from _pyrepl.utils import BUILTINS, THEME
130-
BUILTINS |= {'Client', 'client', 'env', 'self'}
130+
BUILTINS |= {'Client', 'client', 'env'}
131131
except ImportError:
132132
pass
133133

0 commit comments

Comments
 (0)