diff --git a/pydantic/main.py b/pydantic/main.py
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -259,6 +259,11 @@ def __new__(mcs, name, bases, namespace, **kwargs):  # noqa C901
 
         prepare_config(config, name)
 
+        untouched_types = ANNOTATED_FIELD_UNTOUCHED_TYPES
+
+        def is_untouched(v: Any) -> bool:
+            return isinstance(v, untouched_types) or v.__class__.__name__ == 'cython_function_or_method'
+
         if (namespace.get('__module__'), namespace.get('__qualname__')) != ('pydantic.main', 'BaseModel'):
             annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
             # annotation only fields need to come first in fields
@@ -270,7 +275,7 @@ def __new__(mcs, name, bases, namespace, **kwargs):  # noqa C901
                     value = namespace.get(ann_name, Undefined)
                     allowed_types = get_args(ann_type) if get_origin(ann_type) is Union else (ann_type,)
                     if (
-                        isinstance(value, ANNOTATED_FIELD_UNTOUCHED_TYPES)
+                        is_untouched(value)
                         and ann_type != PyObject
                         and not any(
                             lenient_issubclass(get_origin(allowed_type), Type) for allowed_type in allowed_types
@@ -289,7 +294,7 @@ def __new__(mcs, name, bases, namespace, **kwargs):  # noqa C901
 
             untouched_types = UNTOUCHED_TYPES + config.keep_untouched
             for var_name, value in namespace.items():
-                can_be_changed = var_name not in class_vars and not isinstance(value, untouched_types)
+                can_be_changed = var_name not in class_vars and not is_untouched(value)
                 if isinstance(value, ModelPrivateAttr):
                     if not is_valid_private_name(var_name):
                         raise NameError(

diff --git a/tests/test_edge_cases.py b/tests/test_edge_cases.py
--- a/tests/test_edge_cases.py
+++ b/tests/test_edge_cases.py
@@ -20,6 +20,11 @@
 )
 from pydantic.fields import Field, Schema
 
+try:
+    import cython
+except ImportError:
+    cython = None
+
 
 def test_str_bytes():
     class Model(BaseModel):
@@ -1745,3 +1750,26 @@ class Child(Parent):
         pass
 
     assert Child(foo=['a', 'b']).foo == ['a-1', 'b-1']
+
+
+@pytest.mark.skipif(cython is None, reason='cython not installed')
+def test_cython_function_untouched():
+    Model = cython.inline(
+        # language=Python
+        """
+from pydantic import BaseModel
+
+class Model(BaseModel):
+    a = 0.0
+    b = 10
+
+    def get_double_a(self) -> float:
+        return self.a + self.b
+
+return Model
+"""
+    )
+    model = Model(a=10.2)
+    assert model.a == 10.2
+    assert model.b == 10
+    return model.get_double_a() == 20.2

Impl. of BaseModel with method crashes when Cythonized
# Bug

Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
             pydantic version: 1.6.1
            pydantic compiled: True
                 install path: /Users/mordaren/Source/pydantic/pydantic
               python version: 3.7.7 (default, Mar 10 2020, 15:43:27)  [Clang 10.0.0 (clang-1000.11.45.5)]
                     platform: Darwin-17.2.0-x86_64-i386-64bit
     optional deps. installed: ['typing-extensions', 'email-validator', 'devtools']
```


Here's a minimal example:

main.py:
```py
from pydantic import BaseModel

class MyModel(BaseModel):
    x: float = 123

    def x2(self):
        return self.x**2

def main():
    model = MyModel(x=10)
    print("x^2 = ", model.x2())
```

setup.py:
```
from setuptools import setup
from Cython.Build import cythonize

setup(
    name='testapp',
    ext_modules=cythonize("main.py"),
)
```

Cythonize the script using the following command (mac OS): 

``` python setup.py build_ext --inplace```


When trying to import main, the following crash occurs (ensure that you're importing the actual Cythonized file):
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "main.py", line 5, in init main
    class MyModel(BaseModel):
  File "pydantic/main.py", line 285, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 309, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 271, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 351, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 529, in pydantic.fields.ModelField.populate_validators
  File "pydantic/validators.py", line 593, in find_validators
RuntimeError: no validator found for <class 'cython_function_or_method'>, see `arbitrary_types_allowed` in Config
```



tests/test_edge_cases.py::test_cython_function_untouched
tests/test_edge_cases.py::test_str_bytes tests/test_edge_cases.py::test_str_bytes_none tests/test_edge_cases.py::test_union_int_str tests/test_edge_cases.py::test_union_priority tests/test_edge_cases.py::test_typed_list tests/test_edge_cases.py::test_typed_set tests/test_edge_cases.py::test_dict_dict tests/test_edge_cases.py::test_none_list tests/test_edge_cases.py::test_typed_dict[value0-result0] tests/test_edge_cases.py::test_typed_dict[value1-result1] tests/test_edge_cases.py::test_typed_dict[value2-result2] tests/test_edge_cases.py::test_typed_dict_error[1-errors0] tests/test_edge_cases.py::test_typed_dict_error[value1-errors1] tests/test_edge_cases.py::test_typed_dict_error[value2-errors2] tests/test_edge_cases.py::test_dict_key_error tests/test_edge_cases.py::test_tuple tests/test_edge_cases.py::test_tuple_more tests/test_edge_cases.py::test_tuple_length_error tests/test_edge_cases.py::test_tuple_invalid tests/test_edge_cases.py::test_tuple_value_error tests/test_edge_cases.py::test_recursive_list tests/test_edge_cases.py::test_recursive_list_error tests/test_edge_cases.py::test_list_unions tests/test_edge_cases.py::test_recursive_lists tests/test_edge_cases.py::test_str_enum tests/test_edge_cases.py::test_any_dict tests/test_edge_cases.py::test_success_values_include tests/test_edge_cases.py::test_include_exclude_unset tests/test_edge_cases.py::test_include_exclude_defaults tests/test_edge_cases.py::test_skip_defaults_deprecated tests/test_edge_cases.py::test_advanced_exclude tests/test_edge_cases.py::test_advanced_exclude_by_alias tests/test_edge_cases.py::test_advanced_value_include tests/test_edge_cases.py::test_advanced_value_exclude_include tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude0-expected0] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude1-expected1] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude2-expected2] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude3-expected3] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude4-expected4] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude5-expected5] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude6-expected6] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude7-expected7] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude8-expected8] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude9-expected9] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude10-expected10] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude11-expected11] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude12-expected12] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude13-expected13] tests/test_edge_cases.py::test_advanced_exclude_nested_lists[exclude14-expected14] tests/test_edge_cases.py::test_advanced_include_nested_lists[include0-expected0] tests/test_edge_cases.py::test_advanced_include_nested_lists[include1-expected1] tests/test_edge_cases.py::test_advanced_include_nested_lists[include2-expected2] tests/test_edge_cases.py::test_advanced_include_nested_lists[include3-expected3] tests/test_edge_cases.py::test_advanced_include_nested_lists[include4-expected4] tests/test_edge_cases.py::test_advanced_include_nested_lists[include5-expected5] tests/test_edge_cases.py::test_advanced_include_nested_lists[include6-expected6] tests/test_edge_cases.py::test_advanced_include_nested_lists[include7-expected7] tests/test_edge_cases.py::test_advanced_include_nested_lists[include8-expected8] tests/test_edge_cases.py::test_advanced_include_nested_lists[include9-expected9] tests/test_edge_cases.py::test_advanced_include_nested_lists[include10-expected10] tests/test_edge_cases.py::test_advanced_include_nested_lists[include11-expected11] tests/test_edge_cases.py::test_advanced_include_nested_lists[include12-expected12] tests/test_edge_cases.py::test_advanced_include_nested_lists[include13-expected13] tests/test_edge_cases.py::test_advanced_include_nested_lists[include14-expected14] tests/test_edge_cases.py::test_field_set_ignore_extra tests/test_edge_cases.py::test_field_set_allow_extra tests/test_edge_cases.py::test_field_set_field_name tests/test_edge_cases.py::test_values_order tests/test_edge_cases.py::test_inheritance tests/test_edge_cases.py::test_invalid_type tests/test_edge_cases.py::test_valid_string_types[a tests/test_edge_cases.py::test_valid_string_types[some tests/test_edge_cases.py::test_valid_string_types[value2-foobar] tests/test_edge_cases.py::test_valid_string_types[123-123] tests/test_edge_cases.py::test_valid_string_types[123.45-123.45] tests/test_edge_cases.py::test_valid_string_types[value5-12.45] tests/test_edge_cases.py::test_valid_string_types[True-True] tests/test_edge_cases.py::test_valid_string_types[False-False] tests/test_edge_cases.py::test_valid_string_types[a10-a10] tests/test_edge_cases.py::test_valid_string_types[whatever-whatever] tests/test_edge_cases.py::test_invalid_string_types[value0-errors0] tests/test_edge_cases.py::test_invalid_string_types[value1-errors1] tests/test_edge_cases.py::test_inheritance_config tests/test_edge_cases.py::test_partial_inheritance_config tests/test_edge_cases.py::test_annotation_inheritance tests/test_edge_cases.py::test_string_none tests/test_edge_cases.py::test_return_errors_ok tests/test_edge_cases.py::test_return_errors_error tests/test_edge_cases.py::test_optional_required tests/test_edge_cases.py::test_invalid_validator tests/test_edge_cases.py::test_unable_to_infer tests/test_edge_cases.py::test_multiple_errors tests/test_edge_cases.py::test_validate_all tests/test_edge_cases.py::test_force_extra tests/test_edge_cases.py::test_illegal_extra_value tests/test_edge_cases.py::test_multiple_inheritance_config tests/test_edge_cases.py::test_submodel_different_type tests/test_edge_cases.py::test_self tests/test_edge_cases.py::test_self_recursive[BaseModel] tests/test_edge_cases.py::test_self_recursive[BaseSettings] tests/test_edge_cases.py::test_nested_init[BaseModel] tests/test_edge_cases.py::test_nested_init[BaseSettings] tests/test_edge_cases.py::test_values_attr_deprecation tests/test_edge_cases.py::test_init_inspection tests/test_edge_cases.py::test_type_on_annotation tests/test_edge_cases.py::test_assign_type tests/test_edge_cases.py::test_optional_subfields tests/test_edge_cases.py::test_not_optional_subfields tests/test_edge_cases.py::test_scheme_deprecated tests/test_edge_cases.py::test_fields_deprecated tests/test_edge_cases.py::test_optional_field_constraints tests/test_edge_cases.py::test_field_str_shape tests/test_edge_cases.py::test_field_type_display[int-int] tests/test_edge_cases.py::test_field_type_display[type_1-Optional[int]] tests/test_edge_cases.py::test_field_type_display[type_2-Union[NoneType, tests/test_edge_cases.py::test_field_type_display[type_3-Union[int, tests/test_edge_cases.py::test_field_type_display[type_4-List[int]] tests/test_edge_cases.py::test_field_type_display[type_5-Tuple[int, tests/test_edge_cases.py::test_field_type_display[type_6-Union[List[int], tests/test_edge_cases.py::test_field_type_display[type_7-List[Tuple[int, tests/test_edge_cases.py::test_field_type_display[type_8-Mapping[int, tests/test_edge_cases.py::test_field_type_display[type_9-FrozenSet[int]] tests/test_edge_cases.py::test_field_type_display[type_10-Tuple[int, tests/test_edge_cases.py::test_field_type_display[type_11-Optional[List[int]]] tests/test_edge_cases.py::test_field_type_display[dict-dict] tests/test_edge_cases.py::test_field_type_display[type_13-DisplayGen[bool, tests/test_edge_cases.py::test_any_none tests/test_edge_cases.py::test_type_var_any tests/test_edge_cases.py::test_type_var_constraint tests/test_edge_cases.py::test_type_var_bound tests/test_edge_cases.py::test_dict_bare tests/test_edge_cases.py::test_list_bare tests/test_edge_cases.py::test_dict_any tests/test_edge_cases.py::test_modify_fields tests/test_edge_cases.py::test_exclude_none tests/test_edge_cases.py::test_exclude_none_recursive tests/test_edge_cases.py::test_exclude_none_with_extra tests/test_edge_cases.py::test_str_method_inheritance tests/test_edge_cases.py::test_repr_method_inheritance tests/test_edge_cases.py::test_optional_validator tests/test_edge_cases.py::test_required_optional tests/test_edge_cases.py::test_required_any tests/test_edge_cases.py::test_custom_generic_validators tests/test_edge_cases.py::test_custom_generic_arbitrary_allowed tests/test_edge_cases.py::test_custom_generic_disallowed tests/test_edge_cases.py::test_hashable_required tests/test_edge_cases.py::test_hashable_optional[1] tests/test_edge_cases.py::test_hashable_optional[None] tests/test_edge_cases.py::test_default_factory_side_effect tests/test_edge_cases.py::test_default_factory_validator_child