def __init__(
        self,
        sources: list[RepositoryConfig],
        environment: BaseEnvironment,
        ignore_compatibility: bool | NotSetType = NotSet,
        env_spec: EnvSpec | None = None,
    ) -> None:
        """
        :param sources: a list of sources to download packages from.
        :param environment: the bound environment instance.
        :param ignore_compatibility: (DEPRECATED)if True, don't evaluate candidate against
            the current environment.
        :param env_spec: the environment specifier to filter the candidates.
        """
        from pdm.resolver.reporters import LockReporter

        self.sources = sources
        self.environment = environment
        self._candidate_info_cache = environment.project.make_candidate_info_cache()
        self._hash_cache = environment.project.make_hash_cache()
        self.has_warnings = False
        if ignore_compatibility is not NotSet:  # pragma: no cover
            deprecation_warning(
                "The ignore_compatibility argument is deprecated and will be removed in the future. "
                "Pass in env_set instead. This repository doesn't support lock targets.",
                stacklevel=2,
            )
        else:
            ignore_compatibility = True
        if env_spec is None:  # pragma: no cover
            if ignore_compatibility:
                env_spec = environment.allow_all_spec
            else:
                env_spec = environment.spec
        self.env_spec = env_spec
        self.reporter = LockReporter()

        :param sources: a list of sources to download packages from.
        :param environment: the bound environment instance.
        :param ignore_compatibility: (DEPRECATED)if True, don't evaluate candidate against
            the current environment.
        :param env_spec: the environment specifier to filter the candidates.
        
src/pdm/models/repositories/base.py