;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307DD\310\311\312\313\314&\210\303\315\305\306\316DD\317\311\312\320\321\313\322& \210\303\323\305\306\324DD\325\311\312\320\321\313\326& \207" [require cl-lib dap-mode custom-declare-variable dap-python-default-debug-port funcall function #[0 "\300\207" [32000] 1] "The debug port which will be used for ptvsd process.\nIf the port is taken, DAP will try the next port." :group dap-python :type number dap-python-executable #[0 "\300\207" [#1="python"] 1 #1#] "The python executable to use." :risky t file dap-python-terminal #[0 "\300\207" [nil] 1] "The terminal to use when running the debug process.\nFor example you may set it to `xterm -e' which will pop xterm console when\nyou are debugging." (choice (string) (const :tag "None" nil))] 10) #@242 Find executable COMMAND, taking pyenv shims into account. If the executable is a system executable and not in the same path as the pyenv version then also return nil. This works around https://github.com/pyenv/pyenv-which-ext. (fn COMMAND) (defalias 'dap-python--pyenv-executable-find #[257 "\300\301!\203R\302\303P!\304\305\302\306!!\307\"\310\311\312\313\"\204P\204P\211GW\203P\312\234\305!\"\2038\305!\262\312\234\314\"\203I\305\300!!\262\211T\262\202\207\300!\207" [executable-find "pyenv" shell-command-to-string "pyenv which " split-string string-trim "pyenv version-name" ":" nil 0 string-match "not found" "system"] 9 (#$ . 892)]) #@76 compiler-macro for inlining `dap-python--point-p'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--point-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--point-p (and (memq (type-of cl-x) cl-struct-dap-python--point-tags) t)) nil] 9 (#$ . 1564)]) (put 'dap-python--point-p 'compiler-macro 'dap-python--point-p--cmacro) #@13 (fn CL-X) (defalias 'dap-python--point-p #[257 "\301!>\205 \302\207" [cl-struct-dap-python--point-tags type-of t] 3 (#$ . 1940)]) (byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put dap-python--point-p side-effect-free error-free put dap-python--point cl-deftype-satisfies] 5) #@79 compiler-macro for inlining `dap-python--point-line'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--point-line--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--point-line (progn (aref cl-x 1))) nil] 9 (#$ . 2242)]) (put 'dap-python--point-line 'compiler-macro 'dap-python--point-line--cmacro) #@67 Access slot "line" of `dap-python--point' struct CL-X. (fn CL-X) (defalias 'dap-python--point-line #[257 "\211\300H\207" [1] 3 (#$ . 2592)]) (byte-code "\300\301\302\303#\300\207" [function-put dap-python--point-line side-effect-free t] 4) #@84 compiler-macro for inlining `dap-python--point-character'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--point-character--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--point-character (progn (aref cl-x 2))) nil] 9 (#$ . 2839)]) (put 'dap-python--point-character 'compiler-macro 'dap-python--point-character--cmacro) #@72 Access slot "character" of `dap-python--point' struct CL-X. (fn CL-X) (defalias 'dap-python--point-character #[257 "\211\300H\207" [2] 3 (#$ . 3214)]) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put dap-python--point-character side-effect-free t defalias copy-dap-python--point copy-sequence] 4) #@100 compiler-macro for inlining `make-dap-python--point'. (fn CL-WHOLE &cl-quote &key LINE CHARACTER) (defalias 'make-dap-python--point--cmacro #[385 "\300\301\"A@\300\302\"A@\303\304\305\306\306&\207" [plist-member :line :character cl--defsubst-expand (line character) (cl-block make-dap-python--point (record 'dap-python--point line character)) nil] 12 (#$ . 3533)]) (put 'make-dap-python--point 'compiler-macro 'make-dap-python--point--cmacro) #@80 Constructor for objects of type `dap-python--point'. (fn &key LINE CHARACTER) (defalias 'make-dap-python--point #[128 "\300\301\"A@\300\302\"A@\303\304#\207" [plist-member :line :character record dap-python--point] 7 (#$ . 3992)]) (byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303& \207" [function-put make-dap-python--point side-effect-free t cl-struct-define dap-python--point nil cl-structure-object record ((cl-tag-slot) (line nil :type integer) (character nil :type integer)) cl-struct-dap-python--point-tags] 11) #@79 compiler-macro for inlining `dap-python--location-p'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--location-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--location-p (and (memq (type-of cl-x) cl-struct-dap-python--location-tags) t)) nil] 9 (#$ . 4542)]) (put 'dap-python--location-p 'compiler-macro 'dap-python--location-p--cmacro) #@13 (fn CL-X) (defalias 'dap-python--location-p #[257 "\301!>\205 \302\207" [cl-struct-dap-python--location-tags type-of t] 3 (#$ . 4936)]) (byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put dap-python--location-p side-effect-free error-free put dap-python--location cl-deftype-satisfies] 5) #@83 compiler-macro for inlining `dap-python--location-start'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--location-start--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--location-start (progn (aref cl-x 1))) nil] 9 (#$ . 5250)]) (put 'dap-python--location-start 'compiler-macro 'dap-python--location-start--cmacro) #@71 Access slot "start" of `dap-python--location' struct CL-X. (fn CL-X) (defalias 'dap-python--location-start #[257 "\211\300H\207" [1] 3 (#$ . 5620)]) (byte-code "\300\301\302\303#\300\207" [function-put dap-python--location-start side-effect-free t] 4) #@81 compiler-macro for inlining `dap-python--location-end'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--location-end--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--location-end (progn (aref cl-x 2))) nil] 9 (#$ . 5879)]) (put 'dap-python--location-end 'compiler-macro 'dap-python--location-end--cmacro) #@69 Access slot "end" of `dap-python--location' struct CL-X. (fn CL-X) (defalias 'dap-python--location-end #[257 "\211\300H\207" [2] 3 (#$ . 6239)]) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put dap-python--location-end side-effect-free t defalias copy-dap-python--location copy-sequence] 4) #@98 compiler-macro for inlining `make-dap-python--location'. (fn CL-WHOLE &cl-quote &key START END) (defalias 'make-dap-python--location--cmacro #[385 "\300\301\"A@\300\302\"A@\303\304\305\306\306&\207" [plist-member :start :end cl--defsubst-expand (start end) (cl-block make-dap-python--location (record 'dap-python--location start end)) nil] 12 (#$ . 6551)]) (put 'make-dap-python--location 'compiler-macro 'make-dap-python--location--cmacro) #@78 Constructor for objects of type `dap-python--location'. (fn &key START END) (defalias 'make-dap-python--location #[128 "\300\301\"A@\300\302\"A@\303\304#\207" [plist-member :start :end record dap-python--location] 7 (#$ . 7008)]) (byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303& \207" [function-put make-dap-python--location side-effect-free t cl-struct-define dap-python--location nil cl-structure-object record ((cl-tag-slot) (start nil :type dap-python--point) (end nil :type dap-python--point)) cl-struct-dap-python--location-tags] 11) #@77 compiler-macro for inlining `dap-python--symbol-p'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--symbol-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--symbol-p (and (memq (type-of cl-x) cl-struct-dap-python--symbol-tags) t)) nil] 9 (#$ . 7581)]) (put 'dap-python--symbol-p 'compiler-macro 'dap-python--symbol-p--cmacro) #@13 (fn CL-X) (defalias 'dap-python--symbol-p #[257 "\301!>\205 \302\207" [cl-struct-dap-python--symbol-tags type-of t] 3 (#$ . 7963)]) (byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put dap-python--symbol-p side-effect-free error-free put dap-python--symbol cl-deftype-satisfies] 5) #@80 compiler-macro for inlining `dap-python--symbol-name'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--symbol-name--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--symbol-name (progn (aref cl-x 1))) nil] 9 (#$ . 8269)]) (put 'dap-python--symbol-name 'compiler-macro 'dap-python--symbol-name--cmacro) #@68 Access slot "name" of `dap-python--symbol' struct CL-X. (fn CL-X) (defalias 'dap-python--symbol-name #[257 "\211\300H\207" [1] 3 (#$ . 8624)]) (byte-code "\300\301\302\303#\300\207" [function-put dap-python--symbol-name side-effect-free t] 4) #@80 compiler-macro for inlining `dap-python--symbol-type'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--symbol-type--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--symbol-type (progn (aref cl-x 2))) nil] 9 (#$ . 8874)]) (put 'dap-python--symbol-type 'compiler-macro 'dap-python--symbol-type--cmacro) #@68 Access slot "type" of `dap-python--symbol' struct CL-X. (fn CL-X) (defalias 'dap-python--symbol-type #[257 "\211\300H\207" [2] 3 (#$ . 9229)]) (byte-code "\300\301\302\303#\300\207" [function-put dap-python--symbol-type side-effect-free t] 4) #@84 compiler-macro for inlining `dap-python--symbol-location'. (fn CL-WHOLE-ARG CL-X) (defalias 'dap-python--symbol-location--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block dap-python--symbol-location (progn (aref cl-x 3))) nil] 9 (#$ . 9479)]) (put 'dap-python--symbol-location 'compiler-macro 'dap-python--symbol-location--cmacro) #@72 Access slot "location" of `dap-python--symbol' struct CL-X. (fn CL-X) (defalias 'dap-python--symbol-location #[257 "\211\300H\207" [3] 3 (#$ . 9854)]) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put dap-python--symbol-location side-effect-free t defalias copy-dap-python--symbol copy-sequence] 4) #@105 compiler-macro for inlining `make-dap-python--symbol'. (fn CL-WHOLE &cl-quote &key NAME TYPE LOCATION) (defalias 'make-dap-python--symbol--cmacro #[385 "\300\301\"A@\300\302\"A@\300\303\"A@\304\305\306\307\307&\207" [plist-member :name :type :location cl--defsubst-expand (name type location) (cl-block make-dap-python--symbol (record 'dap-python--symbol name type location)) nil] 14 (#$ . 10174)]) (put 'make-dap-python--symbol 'compiler-macro 'make-dap-python--symbol--cmacro) #@85 Constructor for objects of type `dap-python--symbol'. (fn &key NAME TYPE LOCATION) (defalias 'make-dap-python--symbol #[128 "\300\301\"A@\300\302\"A@\300\303\"A@\304\305$\207" [plist-member :name :type :location record dap-python--symbol] 9 (#$ . 10672)]) (byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303& \207" [function-put make-dap-python--symbol side-effect-free t cl-struct-define dap-python--symbol nil cl-structure-object record ((cl-tag-slot) (name nil :type string) (type nil :type string) (location nil :type dap-python--location)) cl-struct-dap-python--symbol-tags] 11) #@15 (fn INPUT0) (defalias 'dap-python--parse-lsp-symbol #[257 "\301\302\"\301\303\"\301\304\"\301\305\"\301\306\"\301\307\"\301\310\"\301\306\"\301\307\"\311\312\n\313\314\f\"\315\316\317\316\320#\316\320\f\f##&\207" [lsp-symbol-kinds gethash "name" "kind" "selectionRange" "start" "line" "character" "end" make-dap-python--symbol :name :type alist-get :location record dap-python--location dap-python--point] 23 (#$ . 11287)]) #@25 (fn POINT LSP-SYMBOL) (defalias 'dap-python--symbol-before-point #[514 "\211\300H\211\301H\262\211\301H\262\301HW\207" [3 1] 5 (#$ . 11738)]) #@26 (fn POINT LSP-SYMBOLS) (defalias 'dap-python--symbols-before-point #[514 "\300\301\302\"\"\207" [-filter -partial dap-python--symbol-before-point] 6 (#$ . 11891)]) #@19 (fn LSP-SYMBOL) (defalias 'dap-python--test-p #[257 "\211\300H\301H\302\230\205\303\304\"\207" [1 2 "Function" s-starts-with\? "test_"] 5 (#$ . 12065)]) #@31 (fn TEST-SYMBOL LSP-SYMBOL) (defalias 'dap-python--test-class-p #[514 "\211\300H\301\230\2053\211\302H\211\303H\211\303H\262\300H\211\303H\262\302H\211\303H\262\211\303H\262\211V\2051\211W\266\204\207" [2 "Class" 3 1] 8 (#$ . 12230)]) #@20 (fn LSP-SYMBOLS) (defalias 'dap-python--nearest-test #[257 "\300!\262\301\302\"\211\205+\301\303\304\"\"\211\203$\305\306H\305\306HR\202)\305\306HP\262\207" [reverse -first dap-python--test-p -partial dap-python--test-class-p "::" 1] 8 (#$ . 12483)]) (defalias 'dap-python--cursor-position #[0 "\300\301\302 \303i$\207" [make-dap-python--point :line line-number-at-pos :character] 5]) (defalias 'dap-python--test-at-point #[0 "\300\301\302 \303\304\305 \"\"!\207" [dap-python--nearest-test dap-python--symbols-before-point dap-python--cursor-position mapcar dap-python--parse-lsp-symbol lsp--get-document-symbols] 6]) #@154 Return the debug template whose name is TEMPLATE-NAME. For the name, only the template's `car' is checked, not its `:name' property. (fn TEMPLATE-NAME) (defalias 'dap-python--template #[257 "\301\302\301\211\211\2037\211A\262\242\262\262\211\262\2037\230\203*\301\262\2037\262\262T\262\202\266\207" [dap-debug-template-configurations nil 0] 9 (#$ . 13122)]) (defalias 'dap-python--debug-test-at-point 'dap-python-debug-test-at-point) #@41 Debug the pytest test under the cursor. (defalias 'dap-python-debug-test-at-point #[0 "\300\301\302!!\207" [dap-debug dap-python--template "Python :: Run pytest (at point)"] 3 (#$ . 13590) nil]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable dap-python-debugger funcall function #[0 "\300\207" [ptvsd] 1] "Specify which debugger to use for `dap-python'.\nCan be either `ptvsd' or `debugpy.' Note that this setting can be\noverridden in individual `dap-python' launch configuration. The\nvalues of this variable or the :debugger field may also be\nstrings, for the sake of launch.json feature parity." :type (choice (const ptvsd) (const debugpy)) :group dap-python] 8) #@55 Populate CONF with the required arguments. (fn CONF) (defalias 'dap-python--populate-start-file-args #[257 "\304!\305\306\"\305\307\"\206\305\310\"\206\311 \305\312\"\305\313\"@\313=\203/AA\262\2024\314\313\"\210@\307=\203CAA\262\202H\314\307\"\210@\310=\203WAA\262\202\\\314\310\"\210 \206a\n\211\315\267\202\371\316 \317!\203w\320\321\322#\262@\312=\203\210AA\262\202\216\314\312\"\210@\306=\203\237AA\262\202\245\314\306\"\210\323\324\325\326 \206\260\327\321\f!\330 \203\305\331\321 !P\202\306\327 \203\322\321!\202\323\327\211\327\230\262\204\344\322P\202\345\327&#\210\323\332#\210\323\333#\210\323\334\330#\210\323\335\330#\266\202\377;\203\336!\262\202*\337!\203*\203*\203*\340\341\"\262\203A\203:B\262\202A\323\310#\210@\306=\203PAA\262\202V\314\306\"\210\323\306\206`\342#\210\204{@\312=\203uAA\262\202{\314\312\"\210\305\343\"\204\230@\343=\203\222AA\262\202\230\314\343\"\210\305\344\"\211\345\267\266\202\377\323\346\347\350E#\266\202\377\305\351\"\305\335\"\206\301\330\305\333\"\206\311\352\323\n\335#\210\323\n\332#\210 @\351=\203\352 AA\262\n\266\202\377\314\n\351\"\266\202\377\266\202\377\353\354 \"\266)\207" [dap-python-executable debugger dap-python-debugger dap-python-terminal dap-python--pyenv-executable-find plist-get :args :target-module :program buffer-file-name :module :debugger cl--do-remf #s(hash-table size 4 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("ptvsd" 103 ptvsd 103 "debugpy" 265 debugpy 265)) dap--find-available-port sequencep mapconcat shell-quote-argument " " plist-put :program-to-start format "%s%s -m ptvsd --wait --host %s --port %s%s %s%s" "" "localhost" " -m " :debugServer :port :hostName :host split-string-and-unquote vectorp cl-coerce list [] :cwd :request #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("launch" 421 "attach" 436)) :dap-server-path "-m" "debugpy.adapter" :connect 5678 error "`dap-python': unknown :debugger type %S"] 21 (#$ . 14304)]) #@55 Populate CONF with the required arguments. (fn CONF) (defalias 'dap-python--populate-test-at-point #[257 "\300 \211\203\301\302\303 P#\266\202\304\305!\266\301\306\307 #\210\310!\207" [dap-python--test-at-point plist-put :program buffer-file-name user-error "`dap-python': no test at point" :cwd lsp-workspace-root dap-python--populate-start-file-args] 7 (#$ . 16464)]) (byte-code "\300\301\302\"\210\303\304\305\301\306\307\310\311\312\311\313\311\314\315\316\304\257\"\210\303\317\305\301\306\307\310\311\313\311\312\320\314\315\316\317\257\"\210\300\321\322\"\210\303\323\305\321\306\307\313\311\312\320\314\315\316\323\257\f\"\210\324\325\311\326\311\327%\210\324\325\311\330\311\331%\210\332\333!\207" [dap-register-debug-provider "python" dap-python--populate-start-file-args dap-register-debug-template "Python :: Run file (buffer)" :type :args "" :cwd nil :module :program :request "launch" :name "Python :: Run pytest (buffer)" "pytest" "python-test-at-point" dap-python--populate-test-at-point "Python :: Run pytest (at point)" cl-generic-define-method dap-handle-event ((_event-type (eql debugpyWaitingForServer)) _session _params) #[771 "\300\207" [nil] 4 "\n\n(fn EVENT-TYPE SESSION PARAMS)"] ((_event-type (eql debugpyAttach)) _session _params) #[771 "\300\207" [nil] 4 "\n\n(fn EVENT-TYPE SESSION PARAMS)"] provide dap-python] 16)