   (when (and (buffer-file-name)
              (derived-mode-p 'python-mode))
     (let* ((buf-file (buffer-file-name))
-           (root (and (featurep 'projectile)
-                      (projectile-project-root (file-name-directory buf-file)))))
+           (root (and (functionp 'projectile-acquire-root)
+                      (projectile-acquire-root (file-name-directory buf-file)))))
 
       (when (and root
                  (not (seq-some (lambda (buf)

  (defun projectile-project-find-function (dir)
    (let* ((root (projectile-project-root dir)))
      (and root (cons 'transient root))))

  :bind-keymap ("C-c p" . projectile-command-map)
  :config
  (projectile-mode 1)
  (with-eval-after-load 'project
    (add-to-list 'project-find-functions 'projectile-project-find-function))

;; Linting
(defun find-file-from-project-root (file-name)
  (when-let ((dir (locate-dominating-file
                   (or (and (functionp 'projectile-acquire-root)
                            (projectile-acquire-root))
                       default-directory)
                   file-name)))
    (expand-file-name (concat dir file-name))))
