fcurella: Thank you! ✨ 
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index c4906eff..39fb692f 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -87,12 +87,20 @@ class Provider(BaseProvider):
         return res.hexdigest()
 
     def uuid4(self, cast_to=str):
-        """Generate a random UUID4 object and cast it to another type using a callable ``cast_to``.
+        """Generate a random UUID4 object and cast it to another type if specified using a callable ``cast_to``.
 
         By default, ``cast_to`` is set to ``str``.
+
+        May be called with ``cast_to=None`` to return a full-fledged ``UUID``.
+
+        :sample:
+        :sample: cast_to=None
         """
         # Based on http://stackoverflow.com/q/41186818
-        return cast_to(uuid.UUID(int=self.generator.random.getrandbits(128), version=4))
+        generated_uuid = uuid.UUID(int=self.generator.random.getrandbits(128), version=4)
+        if cast_to is not None:
+            generated_uuid = cast_to(generated_uuid)
+        return generated_uuid
 
     def password(
             self,

Why does faker.misc.uuid has `cast_to=str` by default? 
# I'm willing to open PR
should this issue be accepted

* Faker version: latest
* OS: N/A

`faker.misc.uuid` has a arg `cast_to` with `str` as default.  So the returned value is always string.
https://github.com/joke2k/faker/blob/9f48a5c6a251b2b8d9f84f65472f946b85b9a923/faker/providers/misc/__init__.py#L95

I want to have the `uuid.UUID` object returned. 

Calling with `cast_to=UUID` again raises a Error on UUID lib (of course it would). Since it's returned `UUID(UUID([...]))`from faker with this

![image](https://user-images.githubusercontent.com/3301060/80141445-f1113900-857f-11ea-85a2-2252c74acd00.png)

So I would have to cast it like this `UUID(str(UUID([...])))` to be funcional.

### Steps to reproduce

1. `faker.uuid(cast_to=str)`
1. `faker.uuid(cast_to=uuid.UUID)`

### Expected behavior
I should be able to call  `faker.uuid(cast_to=None)` and have the pure `UUID` object returned.

### Actual behavior
Faker forces object `UUID` to be cast.


diff --git a/tests/providers/test_misc.py b/tests/providers/test_misc.py
index 16194c2a..f616db65 100644
--- a/tests/providers/test_misc.py
+++ b/tests/providers/test_misc.py
@@ -17,7 +17,7 @@ class TestMisc(unittest.TestCase):
         self.fake = Faker()
         Faker.seed(0)
 
-    def test_uuid4(self):
+    def test_uuid4_str(self):
         uuid4 = self.fake.uuid4()
         assert uuid4
         assert isinstance(uuid4, str)
@@ -28,7 +28,7 @@ class TestMisc(unittest.TestCase):
         assert isinstance(uuid4, int)
 
     def test_uuid4_uuid_object(self):
-        uuid4 = self.fake.uuid4(cast_to=lambda x: x)
+        uuid4 = self.fake.uuid4(cast_to=None)
         assert uuid4
         assert isinstance(uuid4, uuid.UUID)
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.8.0
exceptiongroup==1.2.2
execnet==2.1.1
-e git+https://github.com/joke2k/faker.git@9f48a5c6a251b2b8d9f84f65472f946b85b9a923#egg=Faker
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
six==1.17.0
text-unidecode==1.3
tomli==2.2.1
typing_extensions==4.13.0

name: faker
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - six==1.17.0
      - text-unidecode==1.3
      - tomli==2.2.1
      - typing-extensions==4.13.0
prefix: /opt/conda/envs/faker

tests/providers/test_misc.py::TestMisc::test_uuid4_uuid_object
tests/providers/test_misc.py::TestMisc::test_csv_helper_method tests/providers/test_misc.py::TestMisc::test_dsv_csvwriter_kwargs tests/providers/test_misc.py::TestMisc::test_dsv_data_columns tests/providers/test_misc.py::TestMisc::test_dsv_no_header tests/providers/test_misc.py::TestMisc::test_dsv_with_invalid_values tests/providers/test_misc.py::TestMisc::test_dsv_with_row_ids tests/providers/test_misc.py::TestMisc::test_dsv_with_valid_header tests/providers/test_misc.py::TestMisc::test_psv_helper_method tests/providers/test_misc.py::TestMisc::test_tar_compression_py3 tests/providers/test_misc.py::TestMisc::test_tar_exact_minimum_size tests/providers/test_misc.py::TestMisc::test_tar_invalid_file tests/providers/test_misc.py::TestMisc::test_tar_one_byte_undersized tests/providers/test_misc.py::TestMisc::test_tar_over_minimum_size tests/providers/test_misc.py::TestMisc::test_tsv_helper_method tests/providers/test_misc.py::TestMisc::test_uuid4_int tests/providers/test_misc.py::TestMisc::test_uuid4_seedability tests/providers/test_misc.py::TestMisc::test_uuid4_str tests/providers/test_misc.py::TestMisc::test_zip_compression_py3 tests/providers/test_misc.py::TestMisc::test_zip_exact_minimum_size tests/providers/test_misc.py::TestMisc::test_zip_invalid_file tests/providers/test_misc.py::TestMisc::test_zip_one_byte_undersized tests/providers/test_misc.py::TestMisc::test_zip_over_minimum_size
faker/providers/misc/__init__.py
faker/providers/misc/__init__.py