Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-108303: Move ann_module*.py files to typinganndata/ folder (GH-108354) #109672

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lib/test/test_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

# different import patterns to check that __annotations__ does not interfere
# with import machinery
import test.ann_module as ann_module
import test.typinganndata.ann_module as ann_module
import typing
from test import ann_module2
from test.typinganndata import ann_module2
import test

# These are shared with test_tokenize and other test modules.
Expand Down Expand Up @@ -463,7 +463,7 @@ def test_var_annot_module_semantics(self):
def test_var_annot_in_module(self):
# check that functions fail the same way when executed
# outside of module where they were defined
ann_module3 = import_helper.import_fresh_module("test.ann_module3")
ann_module3 = import_helper.import_fresh_module("test.typinganndata.ann_module3")
with self.assertRaises(NameError):
ann_module3.f_bad_ann()
with self.assertRaises(NameError):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4584,7 +4584,7 @@ def func(*args, **kwargs):

def test_base_class_have_text_signature(self):
# see issue 43118
from test.ann_module7 import BufferedReader
from test.typinganndata.ann_module7 import BufferedReader
class MyBufferedReader(BufferedReader):
"""buffer reader class."""

Expand Down
4 changes: 3 additions & 1 deletion Lib/test/test_module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ def test_annotations_getset_raises(self):
del foo.__annotations__

def test_annotations_are_created_correctly(self):
ann_module4 = import_helper.import_fresh_module('test.ann_module4')
ann_module4 = import_helper.import_fresh_module(
'test.typinganndata.ann_module4',
)
self.assertTrue("__annotations__" in ann_module4.__dict__)
del ann_module4.__annotations__
self.assertFalse("__annotations__" in ann_module4.__dict__)
Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_opcodes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Python test set -- part 2, opcodes

import unittest
from test import ann_module, support
from test import support
from test.typinganndata import ann_module

class OpcodeTest(unittest.TestCase):

Expand Down
6 changes: 4 additions & 2 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5306,7 +5306,7 @@ def test_errors(self):


# We need this to make sure that `@no_type_check` respects `__module__` attr:
from test import ann_module8
from test.typinganndata import ann_module8

@no_type_check
class NoTypeCheck_Outer:
Expand Down Expand Up @@ -5893,7 +5893,9 @@ def test_overload_registry_repeated(self):

# Definitions needed for features introduced in Python 3.6

from test import ann_module, ann_module2, ann_module3, ann_module5, ann_module6
from test.typinganndata import (
ann_module, ann_module2, ann_module3, ann_module5, ann_module6,
)

T_a = TypeVar('T_a')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.