copr-backend src 719fda9a70adb4a3ee9ec30c791a70f054507f8821be8d72aa08e51a72421b39 Backend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains backend. https://github.com/fedora-copr/copr copr-backend src d244c3d29ea8c042a87e0b2f6c706df2cf494c142c1253a036436071f721709f Backend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains backend. https://github.com/fedora-copr/copr copr-backend src 873fe9ec0d6a1bb7f6183bb574a2621ba0be984a3cb3cd28771e12f88fd0deaa Backend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains backend. https://github.com/fedora-copr/copr copr-backend src 5feeca9b7bd104ee42c2f5b0d4470054bc74b8e8e6804e1d43eb0e40b9c94b66 Backend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains backend. https://github.com/fedora-copr/copr copr-builder x86_64 ec69f39a973fc3d03095d821e25779beea938650ab2d7c2e95d5d64283cc9cc7 copr-rpmbuild with all weak dependencies Provides command capable of running COPR build-tasks. Example: copr-rpmbuild 12345-epel-7-x86_64 will locally build build-id 12345 for chroot epel-7-x86_64. This package contains all optional modules for building SRPM. https://github.com/fedora-copr/copr copr-cli src c95193cb7a04989a94e2e010a761dbbd4c886be16ac786cd4a75499a52c5e706 Command line interface for COPR COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains command line interface. https://github.com/fedora-copr/copr copr-cli noarch 0ead90059d6fe27fe0ec046d0a2f47a668e44babd9a318f4b5134abb29454989 Command line interface for COPR COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains command line interface. https://github.com/fedora-copr/copr copr-cli src d82579b9792dcd87e04815145a5ff8f011baa2dad73b1bdd477a4252b08e974e Command line interface for COPR COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains command line interface. https://github.com/fedora-copr/copr copr-cli src 2f28ff10bd3b57fab04d5329a8709971c72fe367e04ebde138e4dfc7376622b5 Command line interface for COPR COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains command line interface. https://github.com/fedora-copr/copr copr-cli src be8618f102acfb1ed628a68082f16561c7663bad9137cadaba2193e00eb3e528 Command line interface for COPR COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains command line interface. https://github.com/fedora-copr/copr copr-dist-git src b92c93fd342b4e027000161e5dd19ea493d562e4c61c7757851fb8c9649ee1bc Copr services for Dist Git server COPR is lightweight build system. It allows you to create new project in WebUI and submit new builds and COPR will create yum repository from latest builds. This package contains Copr services for Dist Git server. https://github.com/fedora-copr/copr copr-dist-git src b803c3d67740ee217bc5ac602cbd28780c0efe2d591338ffb69e2eb550bd7e20 Copr services for Dist Git server COPR is lightweight build system. It allows you to create new project in WebUI and submit new builds and COPR will create yum repository from latest builds. This package contains Copr services for Dist Git server. https://github.com/fedora-copr/copr copr-dist-git src 66944cc0db7e6927ce550b810ba360acbb4d0a03538132ed825318819303cd3f Copr services for Dist Git server COPR is lightweight build system. It allows you to create new project in WebUI and submit new builds and COPR will create yum repository from latest builds. This package contains Copr services for Dist Git server. https://github.com/fedora-copr/copr copr-distgit-client x86_64 005bb5834e9f94ac23909b3cec5776fb929a0add49ad84c6b0652f7f42c401c4 Utility to download sources from dist-git A simple, configurable python utility that is able to download sources from various dist-git instances, and generate source RPMs. The utility is able to automatically map the .git/config clone URL into the corresponding dist-git instance configuration. https://github.com/fedora-copr/copr copr-frontend src 3ca3d0ea611afba8e47f3f69c0f2b3e447a843002498bcfa5e95e66f5dfa4195 Frontend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains frontend. https://github.com/fedora-copr/copr copr-frontend src 80155d1bd622a25d0cbf25b53740308ea2d14b28eb7ed0af23b99923f0c9077b Frontend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains frontend. https://github.com/fedora-copr/copr copr-frontend src e825633116f1132a3319dfce222ef8a6fcd815c03aff9dfd6354b1a6dee06f03 Frontend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains frontend. https://github.com/fedora-copr/copr copr-frontend src fad68d1d563168a1818e0c3ab95b79dfb08626ce23e3cf74bcde158f0386b567 Frontend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains frontend. https://github.com/fedora-copr/copr copr-frontend src 79d8ed7e70b76f017ef567f5984f36537403f2cc14434a569c6ad0a4ab93d305 Frontend for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains frontend. https://github.com/fedora-copr/copr copr-keygen noarch e192719d752ead981b1f3bbe49b26553933cae78097cc9d5b010add15f01c8d2 Part of Copr build system. Aux service that generate keys for signd COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains aux service that generate keys for package signing. https://github.com/fedora-copr/copr copr-keygen src 2d0d2e3d183b21430859c1d3443ade7edf6ef51187525306c5599ef4fa344ca9 Part of Copr build system. Aux service that generate keys for signd COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains aux service that generate keys for package signing. https://github.com/fedora-copr/copr copr-rpmbuild src 5dc173917e9461f337965ddbd1abbe017a3aa8487e90a710c9e644b9db373984 Run COPR build tasks Provides command capable of running COPR build-tasks. Example: copr-rpmbuild 12345-epel-7-x86_64 will locally build build-id 12345 for chroot epel-7-x86_64. https://github.com/fedora-copr/copr copr-rpmbuild src 1a9dcf29903daff64937a9022f0b3f0614435406f28c356afc2045a13972644b Run COPR build tasks Provides command capable of running COPR build-tasks. Example: copr-rpmbuild 12345-epel-7-x86_64 will locally build build-id 12345 for chroot epel-7-x86_64. https://github.com/fedora-copr/copr copr-rpmbuild src fc6667e0517606ce6b6af0a8ab0d95f67d78a7edd70b31d9115156b1de5f701b Run COPR build tasks Provides command capable of running COPR build-tasks. Example: copr-rpmbuild 12345-epel-7-x86_64 will locally build build-id 12345 for chroot epel-7-x86_64. https://github.com/fedora-copr/copr copr-rpmbuild x86_64 029c50fe506a98a24bdc3795e868ae5a5686a1e0d10ba35c3dc542127a62914e Run COPR build tasks Provides command capable of running COPR build-tasks. Example: copr-rpmbuild 12345-epel-7-x86_64 will locally build build-id 12345 for chroot epel-7-x86_64. https://github.com/fedora-copr/copr dist-git noarch 9e76d7c14dff452bbe47eb774f201465469b9a280f28ddb3a7cbf9a01f1126ec Package source version control system DistGit is a Git repository specifically designed to hold RPM package sources. https://github.com/release-engineering/dist-git dist-git src 025bb567b71ddd0acc7f9a3794ba903f87459785c194d03b619f5afb83bb1ba9 Package source version control system DistGit is a Git repository specifically designed to hold RPM package sources. https://github.com/release-engineering/dist-git dist-git-selinux noarch 945d7ce88ee3949d2e7125db8e86c88a9396867bf909af9a81798a08f3067c13 SELinux support for dist-git Dist Git is a remote Git repository specifically designed to hold RPM package sources. This package includes SELinux support. https://github.com/release-engineering/dist-git distribution-gpg-keys noarch 8c74724c662085644795b6bd74a21fc141444b892f79f970c5e8d62671f6c6c3 GPG keys of various Linux distributions GPG keys used by various Linux distributions to sign packages. https://github.com/xsuchy/distribution-gpg-keys distribution-gpg-keys src ff1561602a81dcba4d56a5400839b58eac67461a7c3c473f865a3d81e557bd60 GPG keys of various Linux distributions GPG keys used by various Linux distributions to sign packages. https://github.com/xsuchy/distribution-gpg-keys distribution-gpg-keys-copr noarch e86fca384e9a94e0e6d3107c9dcc17e11a2b0557ba0b21de114c21c76bc8ff44 GPG keys for Copr projects GPG keys used by Copr projects. https://github.com/xsuchy/distribution-gpg-keys js-jquery-ui noarch 35ab56946fc67e0335d1a76dd6628747a311d60fdd10b36263c93aab0912da14 jQuery user interface A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. https://jqueryui.com/ js-jquery-ui src cd9b7aa593678ef45976d5e9ffcb1f7655a2aca4e34c511fafb4591f7f41621c jQuery user interface A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. https://jqueryui.com/ koji noarch 4e7d241189110e5598ba318ac6dc662a5057c4ab1c2b30e6583ee6cd496b002f Build system tools Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. https://pagure.io/koji/ koji noarch 33d4021d56daa87dd13d7b2ff1f546cbb47be08c4c54eebc7f1391389852ad9c Build system tools Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. https://pagure.io/koji/ koji src 26d920fe675e851057d1c7980658a311c15b99d4ea203ab4429d04d3f070d751 Build system tools Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. https://pagure.io/koji/ koji src 444237e9ff7848b16ffe07ef0c529382996cc4fbef7e63352748f6b46e5dc152 Build system tools Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. https://pagure.io/koji/ koji-builder-plugin-rpmautospec noarch 9dce672677674f08c5a1b032d256deae191f0067ab92919f063eebbb25866ea5 Koji plugin for generating RPM releases and changelogs A Koji plugin for generating RPM releases and changelogs. https://pagure.io/fedora-infra/rpmautospec koji-builder-plugin-rpmautospec noarch c697d354c2378c22b1187ce8bf4b5b1cc2158f15d261821476d29a52b9e2ab85 Koji plugin for generating RPM releases and changelogs A Koji plugin for generating RPM releases and changelogs. https://pagure.io/fedora-infra/rpmautospec mock noarch c7cf7cdc8de2f4b34284bad018ff3bbc5cb45746af6325966ce1f94d4e345e06 Builds packages inside chroots Mock takes an SRPM and builds it in a chroot. https://github.com/rpm-software-management/mock/ mock src e0428c82c6770fc8fcf9e2c0ae8ce08f4097f5c16060e918aba2f5a7e84edb6c Builds packages inside chroots Mock takes an SRPM and builds it in a chroot. https://github.com/rpm-software-management/mock/ mock-core-configs noarch 0e86b14647657a38dd3914d31a9b9e0f511981948900febc77c1ba7d5ffb1e09 Mock core config files basic chroots Config files which allow you to create chroots for: * Fedora * Epel * Mageia * Custom chroot * OpenSuse Tumbleweed and Leap * openEuler https://github.com/rpm-software-management/mock/ mock-core-configs src 193bef0489c5858269b63545289638044468a9be2616d6228cee4a5052ddd972 Mock core config files basic chroots Config files which allow you to create chroots for: * Fedora * Epel * Mageia * Custom chroot * OpenSuse Tumbleweed and Leap * openEuler https://github.com/rpm-software-management/mock/ mock-core-configs noarch 05abe0aa3068222592738344e3c857170211d3a5b38630d6597a7074318072d4 Mock core config files basic chroots Config files which allow you to create chroots for: * Fedora * Epel * Mageia * Custom chroot * OpenSuse Tumbleweed and Leap * openEuler https://github.com/rpm-software-management/mock/ mock-core-configs src 1d429fcfa55a66c3963889d55ad6e6197aa30dfa45a7054ce8fc50e9a2612dc7 Mock core config files basic chroots Config files which allow you to create chroots for: * Fedora * Epel * Mageia * Custom chroot * OpenSuse Tumbleweed and Leap * openEuler https://github.com/rpm-software-management/mock/ mock-filesystem noarch ec28735d969b2f24da9514b5729c41801deeabcca80d9af270c5e007479624c9 Mock filesystem layout Filesystem layout and group for Mock. https://github.com/rpm-software-management/mock/ mock-lvm noarch bc70ee259e7035780f6f5ce925e7d84c30da41cb60601fcb3b5d88e1b833a1a7 LVM plugin for mock Mock plugin that enables using LVM as a backend and support creating snapshots of the buildroot. https://github.com/rpm-software-management/mock/ mock-scm noarch e9dc913ea11a35ea00c65c4a9e16697efbbcb4b668b50a45bd9501fee1baaab5 Mock SCM integration module Mock SCM integration module. https://github.com/rpm-software-management/mock/ modulemd-tools noarch 6138bd6fe4a039ea14b92a5ca269c75d57e33b6adae74f25c1838e7db959ce7b Collection of tools for parsing and generating modulemd YAML files Tools provided by this package: repo2module - Takes a YUM repository on its input and creates modules.yaml containing YAML module definitions generated for each package. dir2module - Generates a module YAML definition based on essential module information provided via command-line parameters. The packages provided by the module are found in a specified directory or a text file containing their list. createrepo_mod - A small wrapper around createrepo_c and modifyrepo_c to provide an easy tool for generating module repositories. modulemd-add-platform - Add a new context configuration for a new platform into a modulemd-packager file. modulemd-merge - Merge several modules.yaml files into one. This is useful for example if you have several yum repositories and want to merge them into one. modulemd-generate-macros - Generate module-build-macros SRPM package, which is a central piece for building modules. It should be present in the buildroot before any other module packages are submitted to be built. bld2repo - Simple tool for dowloading build required RPMs of a modular build from koji. https://github.com/rpm-software-management/modulemd-tools modulemd-tools src ee86c4daee7fd12706e99fdda2fbe1ab0455a1b22ead98008e183f7d0b7f0817 Collection of tools for parsing and generating modulemd YAML files Tools provided by this package: repo2module - Takes a YUM repository on its input and creates modules.yaml containing YAML module definitions generated for each package. dir2module - Generates a module YAML definition based on essential module information provided via command-line parameters. The packages provided by the module are found in a specified directory or a text file containing their list. createrepo_mod - A small wrapper around createrepo_c and modifyrepo_c to provide an easy tool for generating module repositories. modulemd-add-platform - Add a new context configuration for a new platform into a modulemd-packager file. modulemd-merge - Merge several modules.yaml files into one. This is useful for example if you have several yum repositories and want to merge them into one. modulemd-generate-macros - Generate module-build-macros SRPM package, which is a central piece for building modules. It should be present in the buildroot before any other module packages are submitted to be built. bld2repo - Simple tool for dowloading build required RPMs of a modular build from koji. https://github.com/rpm-software-management/modulemd-tools mysql-connector-python src c7154b457a7fd5e7387d4e81f5e9ae4d70addd781ddb8fa9a779c456e1477e98 MySQL driver written in Python MySQL driver written in Python which does not depend on MySQL C client libraries and implements the DB API v2.0 specification (PEP-249). http://dev.mysql.com/doc/connector-python/en/index.html mysql-connector-python-debuginfo x86_64 8251c621c8c1ca36d5db0700ff83c85f110a056e9d7cfe3d202b8114cfe4ff3b Debug information for package mysql-connector-python This package provides debug information for package mysql-connector-python. Debug information is useful when developing applications that use this package or when debugging this package. http://dev.mysql.com/doc/connector-python/en/index.html mysql-connector-python-debugsource x86_64 c38e828ee6ea30738ca099318d7379a895e6b82cc4d76d1cbca1a7dda92473c2 Debug sources for package mysql-connector-python This package provides debug sources for package mysql-connector-python. Debug sources are useful when developing applications that use this package or when debugging this package. http://dev.mysql.com/doc/connector-python/en/index.html mysql-connector-python-help x86_64 4f11dd92456829f694ba7446abdaa91862c5a59d438e39e0680e3f2bf7389624 Development documents and examples for mysql-connector-python MySQL driver written in Python which does not depend on MySQL C client libraries and implements the DB API v2.0 specification (PEP-249). http://dev.mysql.com/doc/connector-python/en/index.html mysql-connector-python3 x86_64 1a8df786ccdaa948c232eaa60fb2d8a27f3655b1c459aa93dbe7bba1a36fb8c2 MySQL driver written in Python MySQL driver written in Python which does not depend on MySQL C client libraries and implements the DB API v2.0 specification (PEP-249). http://dev.mysql.com/doc/connector-python/en/index.html obs-signd src b1f57047518f06f166f9de07115206a1dcd95a037b908a46a524bbffbef47b2a The OBS sign daemon The OpenSUSE Build Service sign client and daemon. This daemon can be used to sign anything via gpg by communicating with a remote server to avoid the need to host the private key on the same server. https://github.com/openSUSE/obs-sign obs-signd x86_64 c9f0245895d6a39a5fee86adb00844970581288c597a2e5ad2e69ce08db8f16c The OBS sign daemon The OpenSUSE Build Service sign client and daemon. This daemon can be used to sign anything via gpg by communicating with a remote server to avoid the need to host the private key on the same server. https://github.com/openSUSE/obs-sign obs-signd-debuginfo x86_64 679fbde4454f8f6782b9b4b7c2fb0d6287c04b835f3917db6228f46f2c58ebef Debug information for package obs-signd This package provides debug information for package obs-signd. Debug information is useful when developing applications that use this package or when debugging this package. https://github.com/openSUSE/obs-sign obs-signd-debugsource x86_64 7384519a0c7d9761b0a6f1af8a261056d6ed2cf4ea6f12eea3da3bb7a5fe67fd Debug sources for package obs-signd This package provides debug sources for package obs-signd. Debug sources are useful when developing applications that use this package or when debugging this package. https://github.com/openSUSE/obs-sign preproc noarch b037151174f47497c8afaad306731cdd62110891ee645b74774ff77357d86bac Simple text preprocessor Simple text preprocessor implementing a very basic templating language. You can use bash code enclosed in triple braces in a text file and then pipe content of that file to preproc. preproc will replace each of the tags with stdout of the executed code and print the final renderred result to its own stdout. https://pagure.io/rpkg-util.git preproc noarch 1a33ab5b7d90dccf81a130b8a70d4a9564d2a1f86468946275f4fb90ff7ec00c Simple text preprocessor Simple text preprocessor implementing a very basic templating language. You can use bash code enclosed in triple braces in a text file and then pipe content of that file to preproc. preproc will replace each of the tags with stdout of the executed code and print the final renderred result to its own stdout. https://pagure.io/rpkg-util.git preproc src b79e6f3b25b3a6e4fd6fa6f57dff3a451963d46733eddc04e2b1e55ecd0dc877 Simple text preprocessor Simple text preprocessor implementing a very basic templating language. You can use bash code enclosed in triple braces in a text file and then pipe content of that file to preproc. preproc will replace each of the tags with stdout of the executed code and print the final renderred result to its own stdout. https://pagure.io/rpkg-util.git preproc src cfc9b74820ba735f0210cfa7492ab4088aadcaabed12dcdfa8d80998eb4ad148 Simple text preprocessor Simple text preprocessor implementing a very basic templating language. You can use bash code enclosed in triple braces in a text file and then pipe content of that file to preproc. preproc will replace each of the tags with stdout of the executed code and print the final renderred result to its own stdout. https://pagure.io/rpkg-util.git procenv src aee5c73cace3f0a8f765bd4a7db832f1df77bd0a7be802e9c6464ceea58b509f Utility to show process environment This package contains a command-line tool that displays as much detail about itself and its environment as possible. It can be used as a test tool, to understand the type of environment a process runs in, and for comparing system environments. https://github.com/jamesodhunt/procenv procenv src c119ab60b3a34056d12acd7fb09f9aa1c0113765089280bb903b5bea25bbcc8f Utility to show process environment This package contains a command-line tool that displays as much detail about itself and its environment as possible. It can be used as a test tool, to understand the type of environment a process runs in, and for comparing system environments. https://github.com/jamesodhunt/procenv procenv src cafe2af94858a10daed5e8582c2e4a7b6d829fe399db382698c8fd33ed7cb96d Utility to show process environment This package contains a command-line tool that displays as much detail about itself and its environment as possible. It can be used as a test tool, to understand the type of environment a process runs in, and for comparing system environments. https://github.com/jamesodhunt/procenv procenv x86_64 6fcc81d023e8450b9970c2c4c5d587fc7308abcfdbf3354dc971000d5f1e6c86 Utility to show process environment This package contains a command-line tool that displays as much detail about itself and its environment as possible. It can be used as a test tool, to understand the type of environment a process runs in, and for comparing system environments. https://github.com/jamesodhunt/procenv procenv x86_64 3fc7b84c9a6f057ef64fa13c2f3924111dcdfacd5b0b2d82bc896ee55a5feb1d Utility to show process environment This package contains a command-line tool that displays as much detail about itself and its environment as possible. It can be used as a test tool, to understand the type of environment a process runs in, and for comparing system environments. https://github.com/jamesodhunt/procenv procenv x86_64 a5cbde04d55f5009960ba1f5b4c4b0e2aa06df8d90761bf67c0c2fa72c8c1ff7 Utility to show process environment This package contains a command-line tool that displays as much detail about itself and its environment as possible. It can be used as a test tool, to understand the type of environment a process runs in, and for comparing system environments. https://github.com/jamesodhunt/procenv procenv-debuginfo x86_64 4c64c882219b37aea1052e74b618ca9193fe171d9d06b679fbb5ad99f695fddb Debug information for package procenv This package provides debug information for package procenv. Debug information is useful when developing applications that use this package or when debugging this package. https://github.com/jamesodhunt/procenv procenv-debuginfo x86_64 e4eb50df3e53d0254bb5f70e596c4d13f800b979a4c8db0c326b4f2469a31233 Debug information for package procenv This package provides debug information for package procenv. Debug information is useful when developing applications that use this package or when debugging this package. https://github.com/jamesodhunt/procenv procenv-debuginfo x86_64 6090087a49b1160823f78a24cac566925fd34c6fe9db56fcafe66c57be5c563b Debug information for package procenv This package provides debug information for package procenv. Debug information is useful when developing applications that use this package or when debugging this package. https://github.com/jamesodhunt/procenv procenv-debugsource x86_64 3525d11a14b55c959e369f89dfc33a95e2b8e89c7078c3e7736956006b3ae8cb Debug sources for package procenv This package provides debug sources for package procenv. Debug sources are useful when developing applications that use this package or when debugging this package. https://github.com/jamesodhunt/procenv procenv-debugsource x86_64 d2de1006a4d158d5470c5a24f70f14e29a4c84f4f2462ef00a55755b84249229 Debug sources for package procenv This package provides debug sources for package procenv. Debug sources are useful when developing applications that use this package or when debugging this package. https://github.com/jamesodhunt/procenv procenv-debugsource x86_64 eecfd58b68827f2c415e61bdf55812a1ef6b9ec3ca7ce9f3257b1e7a214958ff Debug sources for package procenv This package provides debug sources for package procenv. Debug sources are useful when developing applications that use this package or when debugging this package. https://github.com/jamesodhunt/procenv prunerepo noarch ac43ef35e89d28a19a74072a80e9417f4fc3ecdf42a91a4a69bc2785b32fb359 Remove old packages from rpm-md repository RPM packages that have newer version available in that same repository are deleted from filesystem and the rpm-md metadata are recreated afterwards. If there is a source rpm for a deleted rpm (and they both share the same directory path), then the source rpm will be deleted as well. Support for specific repository structure (e.g. COPR) is also available making it possible to additionally remove build logs and whole build directories associated with a package. After deletion of obsoleted packages, the command "createrepo_c --database --update" is called to recreate the repository metadata. https://pagure.io/prunerepo prunerepo src 83fce90cb098d2770cda69c4ca8690ee2eca36132df5ddd2752e3b794f706dcd Remove old packages from rpm-md repository RPM packages that have newer version available in that same repository are deleted from filesystem and the rpm-md metadata are recreated afterwards. If there is a source rpm for a deleted rpm (and they both share the same directory path), then the source rpm will be deleted as well. Support for specific repository structure (e.g. COPR) is also available making it possible to additionally remove build logs and whole build directories associated with a package. After deletion of obsoleted packages, the command "createrepo_c --database --update" is called to recreate the repository metadata. https://pagure.io/prunerepo pyproject-rpm-macros noarch 9ede6d345c984e41c878f822b99f45f83c6f8500d822df9f9ba2e8f5a8a67d31 RPM macros for PEP 517 Python packages These macros allow projects that follow the Python packaging specifications to be packaged as RPMs. They work for: * traditional Setuptools-based projects that use the setup.py file, * newer Setuptools-based projects that have a setup.cfg file, * general Python projects that use the PEP 517 pyproject.toml file (which allows using any build system, such as setuptools, flit or poetry). These macros replace %py3_build and %py3_install, which only work with setup.py. https://src.fedoraproject.org/rpms/pyproject-rpm-macros pyproject-rpm-macros src 8a57e4041f13a5cff057e9064a5869117c60960bb379515d7383d3f61fa61d40 RPM macros for PEP 517 Python packages These macros allow projects that follow the Python packaging specifications to be packaged as RPMs. They work for: * traditional Setuptools-based projects that use the setup.py file, * newer Setuptools-based projects that have a setup.cfg file, * general Python projects that use the PEP 517 pyproject.toml file (which allows using any build system, such as setuptools, flit or poetry). These macros replace %py3_build and %py3_install, which only work with setup.py. https://src.fedoraproject.org/rpms/pyproject-rpm-macros python-Authlib src cddc3e02364303cbb9b0a44de5f27d6ec6471f78380da37ce27e0e7146ee7a9e The ultimate Python library in building OAuth and OpenID Connect servers and clients. The ultimate Python library in building OAuth and OpenID Connect servers. JWS, JWK, JWA, JWT are included. https://authlib.org/ python-Authlib-help noarch bc3287238e7ee4975eb767fc8342c4c8a53d05a2101c641dddb445ae102d2700 Development documents and examples for Authlib The ultimate Python library in building OAuth and OpenID Connect servers. JWS, JWK, JWA, JWT are included. https://authlib.org/ python-CCColUtils src cf0811572178db092a0cc183689dead16e10756fbbb486f3f315ab8bef57d7a0 Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python-CCColUtils src 55f6a30b3b1335715845b96694af90c01ebc7740ea462805cf9b30a5461548f0 Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python-CCColUtils-debuginfo x86_64 7d1ec73ec95472ed670a58e0761d1bdf91e959590616b8e0b35d35e5ad2685f7 Debug information for package python-CCColUtils This package provides debug information for package python-CCColUtils. Debug information is useful when developing applications that use this package or when debugging this package. https://pagure.io/cccolutils python-CCColUtils-debuginfo x86_64 f58c9f1de2d5b7387a8d94540d9a501f026e92b6c3ae481a0913ced729a82d8c Debug information for package python-CCColUtils This package provides debug information for package python-CCColUtils. Debug information is useful when developing applications that use this package or when debugging this package. https://pagure.io/cccolutils python-CCColUtils-debugsource x86_64 69065773114d353cc5155c5c68175cc8ea57241ff3a93bf69a6ea06986018661 Debug sources for package python-CCColUtils This package provides debug sources for package python-CCColUtils. Debug sources are useful when developing applications that use this package or when debugging this package. https://pagure.io/cccolutils python-CCColUtils-debugsource x86_64 6b607a335b0844a0d28f8fc900d5f2977fbe67249d8217f32266228558b9800c Debug sources for package python-CCColUtils This package provides debug sources for package python-CCColUtils. Debug sources are useful when developing applications that use this package or when debugging this package. https://pagure.io/cccolutils python-Flask-Caching src 2da8c3a304805ea2ba3484e2815ff03a9e021ebfc6267d3ecee985e848f51fcf Adds caching support to Flask applications. A fork of the `Flask-cache`_ extension which adds easy cache support to Flask. https://github.com/pallets-eco/flask-caching python-Flask-Caching-help noarch 99b4b2baccee15d258d75477f38f4589deb96018f7530632d69482394e506a70 Development documents and examples for Flask-Caching A fork of the `Flask-cache`_ extension which adds easy cache support to Flask. https://github.com/pallets-eco/flask-caching python-Flask-OpenID src e7c3c45384f256e6bc2a6b8947bb55b505b6816748ef2a61f5ba1319f02f11e0 OpenID support for Flask Flask-OpenID adds openid support to flask applications http://github.com/mitsuhiko/flask-openid/ python-Flask-OpenID-help noarch 72b4f2fb54c8ee59575c0ab34740a592039301663ab28b1d9b496090acbb32e6 Development documents and examples for Flask-OpenID Flask-OpenID adds openid support to flask applications http://github.com/mitsuhiko/flask-openid/ python-Flask-WTF src dc99dcfa53f7b6f0ba2967d74873fdcb4ec765b79279d0317ec7f10e23334d61 Form rendering, validation, and CSRF protection for Flask with WTForms. Simple integration of Flask and WTForms, including CSRF, file upload, and reCAPTCHA. https://github.com/wtforms/flask-wtf/ python-Flask-WTF-help noarch a008d7d9549bacbc1429cb16a578f4d650235380b71324b6721f433ad083745a Development documents and examples for Flask-WTF Simple integration of Flask and WTForms, including CSRF, file upload, and reCAPTCHA. https://github.com/wtforms/flask-wtf/ python-WTForms src b4d46e0b1892a7ce0b5b4216ecbbbb762f8a102b6ad433dd8b788020fa1186e6 Form validation and rendering for Python web development. WTForms is a flexible forms validation and rendering library for Python web development. It can work with whatever web framework and template engine you choose. It supports data validation, CSRF protection, internationalization (I18N), and more. There are various community libraries that provide closer integration with popular frameworks. https://wtforms.readthedocs.io/ python-WTForms src d846f57b88f502a462e116a1137f4e948176ffefaf29aa08ab360d5718859b7b Form validation and rendering for Python web development. WTForms is a flexible forms validation and rendering library for Python web development. It can work with whatever web framework and template engine you choose. It supports data validation, CSRF protection, internationalization (I18N), and more. There are various community libraries that provide closer integration with popular frameworks. https://wtforms.readthedocs.io/ python-XStatic-Bootstrap-SCSS src 8fea46ad2647ecae8b60d606f3de8b02bfb172f4770e0cdbc893f7be25a413af Bootstrap-SCSS 3.4.1 (XStatic packaging standard) Bootstrap style library packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. https://github.com/twbs/bootstrap-sass python-XStatic-Bootstrap-SCSS-help noarch 9123bf6bd05249e587912943fcc9760c8820035228480d191a1062904ea70818 Development documents and examples for XStatic-Bootstrap-SCSS Bootstrap style library packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. https://github.com/twbs/bootstrap-sass python-XStatic-DataTables src 752def479e1d56edca2d3fe7099b13ea99198eba3bbeede5a2379fa7f6cc4d61 DataTables 1.10.15 (XStatic packaging standard) The DataTables plugin for jQuery packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. http://www.datatables.net python-XStatic-DataTables-help noarch 6881c25d355af12ae985f4bce3363d58fd237c6341b2052e3d51c48641c58bec Development documents and examples for XStatic-DataTables The DataTables plugin for jQuery packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. http://www.datatables.net python-XStatic-Patternfly src a021c3ff004e7eb7519a802ac9a983ad6f8ba94fea646937f7e7800d4849cdb5 Patternfly 3.21.0 (XStatic packaging standard) Patternfly style library packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. https://www.patternfly.org/ python-XStatic-Patternfly-help noarch 39f3bdb6af7bb5f23fdee7e761b29adae5764a72878cc890d84a1dd53de4d03a Development documents and examples for XStatic-Patternfly Patternfly style library packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. https://www.patternfly.org/ python-argparse-manpage src f43d5334fb38199c798b5ce0a6ed95ba0438f685038bd6504c2de8dff1fe314f Build manual page from python's ArgumentParser object. Automatically build manpage from argparse https://github.com/praiskup/argparse-manpage python-argparse-manpage-help noarch 5a606e4dd5124caacd6af3e746287f128180c3775e0ce6462775a0959b5a5b3f Development documents and examples for argparse-manpage Automatically build manpage from argparse https://github.com/praiskup/argparse-manpage python-asttokens src d6734bec404b7cd3216f8766122644cbedf0e3a2637953710de9386a7ded17bf Module to annotate Python abstract syntax trees with source code positions The asttokens module annotates Python abstract syntax trees (ASTs) with the positions of tokens and text in the source code that generated them. This makes it possible for tools that work with logical AST nodes to find the particular text that resulted in those nodes, for example for automated refactoring or highlighting. https://github.com/gristlabs/asttokens python-backoff src b2cf18b7d01aca35a812e1c80a91500d03946a3c827d43a485fcc582425128ae Function decoration for backoff and retry This module provides function decorators which can be used to wrap a\ function such that it will be retried until some condition is met. It\ is meant to be of use when accessing unreliable resources with the\ potential for intermittent failures i.e. network resources and external\ APIs. Somewhat more generally, it may also be of use for dynamically\ polling resources for externally generated content. https://github.com/litl/backoff python-backoff-help noarch 5f686bd052bb4d5156956dd294ed74a248b74d5fa36fd3096e876384313b0f28 Development documents and examples for backoff This module provides function decorators which can be used to wrap a\ function such that it will be retried until some condition is met. It\ is meant to be of use when accessing unreliable resources with the\ potential for intermittent failures i.e. network resources and external\ APIs. Somewhat more generally, it may also be of use for dynamically\ polling resources for externally generated content. https://github.com/litl/backoff python-blessed src a451894bb09a1c099c07a438003ab8a95430d5d1e8bf823da19670041044755d Easy, practical library for making terminal apps, by providing an elegant, well-documented interface to Colors, Keyboard input, and screen Positioning capabilities. Blessed is an easy, practical library for making python terminal apps https://github.com/jquast/blessed python-blessed-help noarch 0fb996b26074b551e7d9a5e7fa042bdcd9a24da36838676709244d10ab7343f2 Development documents and examples for blessed Blessed is an easy, practical library for making python terminal apps https://github.com/jquast/blessed python-cachelib src 29b71abe8ddede3ce1e72519f67966d23051a305e3ab2c769ae2ea81f9714f59 A collection of cache libraries in the same API interface. A collection of cache libraries in the same API interface. Extracted from werkzeug. https://github.com/pallets-eco/cachelib python-cachelib-help noarch 463680f476649a4322a036b3c399c9f8a64e79d6be7214f7a8eb02ae9f3203e9 Development documents and examples for cachelib Development documents and examples for cachelib https://github.com/pallets-eco/cachelib python-copr src 4085ef9324a526013b344e466cfe9087f865d7520abae96f9b98542b0b182b79 Python interface for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python interface to access Copr service. Mostly useful for developers only. https://github.com/fedora-copr/copr python-copr src e8799fcb0a95d568c035ecac26387fe49ddbb7e238e54bc1ec3fedf312684f55 Python interface for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python interface to access Copr service. Mostly useful for developers only. https://github.com/fedora-copr/copr python-copr src 5643b33aa635c813e39d47947f87cc0739bef4c7f3235b28bcb75b2124215ec2 Python interface for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python interface to access Copr service. Mostly useful for developers only. https://github.com/fedora-copr/copr python-copr src aaf160f0cd3987f47142758ef91106ea710756015773da53e14c56ded610b6b6 Python interface for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python interface to access Copr service. Mostly useful for developers only. https://github.com/fedora-copr/copr python-copr src c2a87c0d332c6a801411e999cb55203dcce38d23666c10464e1b8ce07966d0e1 Python interface for Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python interface to access Copr service. Mostly useful for developers only. https://github.com/fedora-copr/copr python-copr-common src 5bf43514b37a399a72f5eeaef12324b5cf3a77230ce61a4c53361ab8f460f6e9 Python code used by Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python code used by other Copr packages. Mostly useful for developers only. https://github.com/fedora-copr/copr python-copr-common src 7ed0a032727d6ed36545069a511c8c55aeeecfc15a886fc86ff7d34c01226ad8 Python code used by Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python code used by other Copr packages. Mostly useful for developers only. https://github.com/fedora-copr/copr python-crudini src 0786f6bfefeb7aaa3d04704078e5a9422bb2b5563ffde197a7093f19722d102c A utility for manipulating ini files crudini A utility for manipulating ini files http://github.com/pixelb/crudini python-crudini-help noarch 467fdb9c11585cde05162e7f2da3f9df8643f8f3fd2d19b36dbadace9fdb9787 A utility for manipulating ini files Usage: crudini --set [OPTION]... config_file section [param] [value] or: crudini --get [OPTION]... config_file [section] [param] or: crudini --del [OPTION]... config_file section [param] [list value] or: crudini --merge [OPTION]... config_file [section] http://github.com/pixelb/crudini python-debtcollector src 7b6048c8b5d4b911d91d72938239a7c8ee9daa77487ea0f3bccb249c5aa42dfc A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. https://docs.openstack.org/debtcollector/latest python-debtcollector-help noarch e328512b226baa0be479d0c90601f639cccc9d7b55e71ab07bc129e910473cd8 A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. https://docs.openstack.org/debtcollector/latest python-email-validator src 91f680f972e4c95c642b207d41ec28b4b0f2d282e2d032ba23ba8b5c68667f91 A robust email address syntax and deliverability validation library. A robust email address syntax and deliverability validation library for Python by [Joshua Tauberer](https://joshdata.me). This library validates that a string is of the form `name@example.com`. This is the sort of validation you would want for an email-based login form on a website. Key features: * Checks that an email address has the correct syntax --- good for login forms or other uses related to identifying users. * Gives friendly error messages when validation fails (appropriate to show to end users). * (optionally) Checks deliverability: Does the domain name resolve? And you can override the default DNS resolver. * Supports internationalized domain names and (optionally) internationalized local parts, but blocks unsafe characters. * Normalizes email addresses (super important for internationalized addresses! see below). The library is NOT for validation of the To: line in an email message (e.g. `My Name <my@address.com>`), which [flanker](https://github.com/mailgun/flanker) is more appropriate for. And this library does NOT permit obsolete forms of email addresses, so if you need strict validation against the email specs exactly, use [pyIsEmail](https://github.com/michaelherold/pyIsEmail). This library is tested with Python 3.6+ but should work in earlier versions: [![Build Status](https://app.travis-ci.com/JoshData/python-email-validator.svg?branch=main)](https://app.travis-ci.com/JoshData/python-email-validator) https://github.com/JoshData/python-email-validator python-email-validator-help noarch 4710d32009164f08dfafafc694e68666be7d7beb88b3440274e64c428a5b677a Development documents and examples for email-validator A robust email address syntax and deliverability validation library for Python by [Joshua Tauberer](https://joshdata.me). This library validates that a string is of the form `name@example.com`. This is the sort of validation you would want for an email-based login form on a website. Key features: * Checks that an email address has the correct syntax --- good for login forms or other uses related to identifying users. * Gives friendly error messages when validation fails (appropriate to show to end users). * (optionally) Checks deliverability: Does the domain name resolve? And you can override the default DNS resolver. * Supports internationalized domain names and (optionally) internationalized local parts, but blocks unsafe characters. * Normalizes email addresses (super important for internationalized addresses! see below). The library is NOT for validation of the To: line in an email message (e.g. `My Name <my@address.com>`), which [flanker](https://github.com/mailgun/flanker) is more appropriate for. And this library does NOT permit obsolete forms of email addresses, so if you need strict validation against the email specs exactly, use [pyIsEmail](https://github.com/michaelherold/pyIsEmail). This library is tested with Python 3.6+ but should work in earlier versions: [![Build Status](https://app.travis-ci.com/JoshData/python-email-validator.svg?branch=main)](https://app.travis-ci.com/JoshData/python-email-validator) https://github.com/JoshData/python-email-validator python-executing src d3965460f236755ec7292782e73dbe3c8751c8e80d24542bab7c32705a4255ee Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-executing src 6ce1353110cd9ca899de5302080e30bb0182937cad9ea5e08e9df1fef2e20862 Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-executing src 0ef5b6b619b056850ee49fcd22ee23c8f8ef3e0418ae278d42d3615491dd84ad Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-executing src 22f1201d5055bee53d57e97f22cc24ea7cbddc7520862ede50d8bbea913fbbba Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-executing src c15026040cd10fa80becb6019cbdd1c6a058716113b87627aa4f85c9e5b9c49f Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-executing src 8a31da73890ce7dba6c2bd0476556617402014b2fd2621cb817d95dd6e4620ae Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-executing-help noarch ab7baa49dbf14e109ad4d6903a97cae541413bbe0d6ab25847194ffb191c9276 Development documents and examples for executing [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-executing-help noarch 4c20b633b8c48fec3d9e634d5edffb6fa7393da819c289c02643a0b4150c17cb Development documents and examples for executing [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python-flask-whooshee src 58d4d9c5dccaf9b3d6e0832bfd1da7d48c64829f1fba1333906a98715b673523 Flask-SQLAlchemy - Whoosh Integration Customizable Flask - SQLAlchemy - Whoosh integration https://github.com/bkabrda/flask-whooshee python-flask-whooshee-help noarch 58ac6e3ccb17fb7969663bf1a7bf1503e96d362525a320ac7f127352e6cdd7e3 Development documents and examples for flask-whooshee Customizable Flask - SQLAlchemy - Whoosh integration https://github.com/bkabrda/flask-whooshee python-html2text src 5e9eedb48993592ee18ecaa51844b55b354864029bea63388b9527bb79b7850d Turn HTML into equivalent Markdown-structured text. Convert HTML to Markdown-formatted text. https://github.com/Alir3z4/html2text/ python-html2text-help noarch 013d49a29cc7db258010863ea5323057272ad0deb216b24eea08fcdda437b69c Development documents and examples for html2text Convert HTML to Markdown-formatted text. https://github.com/Alir3z4/html2text/ python-html5-parser src 61f8753c81b3d0636b90050e7ce664bdfac60a4408e58bafa7a37e62286cf7fa A fast, standards compliant, C based, HTML 5 parser for python A fast, standards compliant, C based, HTML 5 parser for python https://pypi.python.org/pypi/html5-parser python-html5-parser src 791821227959ea935dd114ff63e41b40a1e4963cf4afc1fcf0b7fb7e5f46c015 A fast, standards compliant, C based, HTML 5 parser for python A fast, standards compliant, C based, HTML 5 parser for python https://pypi.python.org/pypi/html5-parser python-html5-parser src 3892b2b6dbd7514591ff09c52a6db3e0e8d49c021684199466e35376807b1c69 Fast C based HTML 5 parsing for python https://html5-parser.readthedocs.io python-html5-parser-debuginfo x86_64 537a582b095537a78ebd5cb6c91ed2b0da0535293e0e1b1551f669a1fe034558 Debug information for package python-html5-parser This package provides debug information for package python-html5-parser. Debug information is useful when developing applications that use this package or when debugging this package. https://pypi.python.org/pypi/html5-parser python-html5-parser-debuginfo x86_64 c5382794f0e0ad7e9265fd40fe0c58d52a919c2e34994ee931d5c7366781b4f6 Debug information for package python-html5-parser This package provides debug information for package python-html5-parser. Debug information is useful when developing applications that use this package or when debugging this package. https://pypi.python.org/pypi/html5-parser python-html5-parser-debugsource x86_64 b44008a3edb39a57dbd6c741721382906c89da0bec1edc472b80eaa4f429cc9d Debug sources for package python-html5-parser This package provides debug sources for package python-html5-parser. Debug sources are useful when developing applications that use this package or when debugging this package. https://pypi.python.org/pypi/html5-parser python-html5-parser-debugsource x86_64 00d473ee301b4858e12bcb3ffa506c86943142f8092e418cb4f41a3fc9f4c5ec Debug sources for package python-html5-parser This package provides debug sources for package python-html5-parser. Debug sources are useful when developing applications that use this package or when debugging this package. https://pypi.python.org/pypi/html5-parser python-ipdb src a158eb83a8615598c0874dd6077917c4feca0083c335494b2ff5dcd0de5a263e IPython-enabled pdb https://github.com/gotcha/ipdb python-ipdb-help noarch 03ecea276098b31f39e47c698421937617a420b93f722c6804e773d5d415e7b7 Development documents and examples for ipdb https://github.com/gotcha/ipdb python-ipython src 2c5fd6edf386c64c5883a8156b03b1cfacb3b9e0480d1f197e3f9d033d43dd30 IPython: Productive Interactive Computing IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are: * A powerful interactive Python shell * A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter notebooks and other interactive frontends. The enhanced interactive Python shells have the following main features: * Comprehensive object introspection. * Input history, persistent across sessions. * Caching of output results during a session with automatically generated references. * Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords. * Extensible system of 'magic' commands for controlling the environment and performing many tasks related either to IPython or the operating system. * A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time). * Session logging and reloading. * Extensible syntax processing for special purpose situations. * Access to the system shell with user-extensible alias system. * Easily embeddable in other Python programs and GUIs. * Integrated access to the pdb debugger and the Python profiler. The latest development version is always available from IPython's `GitHub site <http://github.com/ipython>`_. https://ipython.org python-ipython src a8a662b04e8c4ee103cc4ccf6422b0d759451168dff761ea60cb1ab1c962939a IPython: Productive Interactive Computing IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are: * A powerful interactive Python shell * A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter notebooks and other interactive frontends. The enhanced interactive Python shells have the following main features: * Comprehensive object introspection. * Input history, persistent across sessions. * Caching of output results during a session with automatically generated references. * Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords. * Extensible system of 'magic' commands for controlling the environment and performing many tasks related either to IPython or the operating system. * A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time). * Session logging and reloading. * Extensible syntax processing for special purpose situations. * Access to the system shell with user-extensible alias system. * Easily embeddable in other Python programs and GUIs. * Integrated access to the pdb debugger and the Python profiler. The latest development version is always available from IPython's `GitHub site <http://github.com/ipython>`_. https://ipython.org python-ipython-help noarch dcf625d9f009095002ed5768831f71e169c6adf36815d77a1d5a692325b4e8b1 Development documents and examples for ipython IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are: * A powerful interactive Python shell * A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter notebooks and other interactive frontends. The enhanced interactive Python shells have the following main features: * Comprehensive object introspection. * Input history, persistent across sessions. * Caching of output results during a session with automatically generated references. * Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords. * Extensible system of 'magic' commands for controlling the environment and performing many tasks related either to IPython or the operating system. * A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time). * Session logging and reloading. * Extensible syntax processing for special purpose situations. * Access to the system shell with user-extensible alias system. * Easily embeddable in other Python programs and GUIs. * Integrated access to the pdb debugger and the Python profiler. The latest development version is always available from IPython's `GitHub site <http://github.com/ipython>`_. https://ipython.org python-ipython-help noarch e7024e7697fee7c65a3a5642b8fdd7611ab4a5062069d52515190fb4d5487e36 Development documents and examples for ipython IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are: * A powerful interactive Python shell * A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter notebooks and other interactive frontends. The enhanced interactive Python shells have the following main features: * Comprehensive object introspection. * Input history, persistent across sessions. * Caching of output results during a session with automatically generated references. * Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords. * Extensible system of 'magic' commands for controlling the environment and performing many tasks related either to IPython or the operating system. * A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time). * Session logging and reloading. * Extensible syntax processing for special purpose situations. * Access to the system shell with user-extensible alias system. * Easily embeddable in other Python programs and GUIs. * Integrated access to the pdb debugger and the Python profiler. The latest development version is always available from IPython's `GitHub site <http://github.com/ipython>`_. https://ipython.org python-jedi src 2f6897421fffb4038418c016dc69d367adb82060679604d9f9122f79026de87f A static analysis tool for Python that is typically used in IDEs/editors plugins Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins. It has a focus on autocompletion and goto functionality. Other features include refactoring, code search and finding references. https://github.com/davidhalter/jedi python-jedi src cd4b8b484fd195b7c093b65973626654ac15ee44da98b4b82138d0418b120485 A static analysis tool for Python that is typically used in IDEs/editors plugins Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins. It has a focus on autocompletion and goto functionality. Other features include refactoring, code search and finding references. https://github.com/davidhalter/jedi python-jedi-help noarch 38c2c071ad41eccd6d2f032ce492f8745b8a8a11d32f8418a2b4bffb38885bdb Development documents and examples for jedi Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins. It has a focus on autocompletion and goto functionality. Other features include refactoring, code search and finding references. https://github.com/davidhalter/jedi python-jedi-help noarch d7bf0b469dd6f3c6a0240eb6f02c2828c2d5a871f3f2977d03e9d85e64449d5b Development documents and examples for jedi Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins. It has a focus on autocompletion and goto functionality. Other features include refactoring, code search and finding references. https://github.com/davidhalter/jedi python-keystoneauth1 src 9a822c1d225fb83b513b4c4c76847ae3c46433a2aa47fb942ab51875b916dc82 Authentication Library for OpenStack Identity Keystoneauth provides a standard way to do authentication and service requests \ within the OpenStack ecosystem. It is designed for use in conjunction with \ the existing OpenStack clients and for simplifying the process of writing \ new clients. https://docs.openstack.org/keystoneauth/latest/ python-littleutils src 3ab5911fb362f04c3587f674f9dd3c30de82d95ebe41ff6979ccafb1a204caf8 Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python-littleutils src 81e833a886279ff585f749834a0716bf9a5db1c5e7cb7a85ec51b18c456ce503 Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python-matplotlib-inline src 2088149f1c70d24f72019b0fbc99b59199fbf3a1c81f81a308522339195ff86b Inline Matplotlib backend for Jupyter This package provides support for matplotlib to display figures directly inline in the Jupyter notebook and related clients, as shown below. With conda: ```bash conda install -c conda-forge matplotlib-inline ``` With pip: ```bash pip install matplotlib-inline ``` Note that in current versions of JupyterLab and Jupyter Notebook, the explicit use of the `%matplotlib inline` directive is not needed anymore, though other third-party clients may still require it. This will produce a figure immediately below: ```python %matplotlib inline import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 3*np.pi, 500) plt.plot(x, np.sin(x**2)) plt.title('A simple chirp'); ``` Licensed under the terms of the BSD 3-Clause License, by the IPython Development Team (see `LICENSE` file). BSD 3-Clause License Copyright (c) 2019-2022, IPython Development Team. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. https://github.com/ipython/matplotlib-inline python-matplotlib-inline-help noarch f22c6f49d3e1c4709c4f5d543fdb8adae0e02b4ea55885a63117de52f92e961a Development documents and examples for matplotlib-inline This package provides support for matplotlib to display figures directly inline in the Jupyter notebook and related clients, as shown below. With conda: ```bash conda install -c conda-forge matplotlib-inline ``` With pip: ```bash pip install matplotlib-inline ``` Note that in current versions of JupyterLab and Jupyter Notebook, the explicit use of the `%matplotlib inline` directive is not needed anymore, though other third-party clients may still require it. This will produce a figure immediately below: ```python %matplotlib inline import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 3*np.pi, 500) plt.plot(x, np.sin(x**2)) plt.title('A simple chirp'); ``` Licensed under the terms of the BSD 3-Clause License, by the IPython Development Team (see `LICENSE` file). BSD 3-Clause License Copyright (c) 2019-2022, IPython Development Team. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. https://github.com/ipython/matplotlib-inline python-novaclient src 327a4c89df986edf2c20f4c673878d4e8b2e274dc928b9f5017bceb340ff455f Client library for OpenStack Compute API This is a client for the OpenStack Nova API. There's a Python API (the novaclient module), and a command-line script (nova). Each implements 100% of the OpenStack Nova API. https://docs.openstack.org/python-novaclient/latest python-openid-teams src 690f4bb004a718167621e7508add9049b3e6da4784f134acad2e791d095c5532 This is an implementation of the OpenID teams extension for python-openid UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python-openid-teams src 23f9b5bffb0e0119b244b5573f591723a1bfc4b8cec158411ef9619954ce68df This is an implementation of the OpenID teams extension for python-openid UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python-openid-teams-help noarch 6a0debf3260f26bd58a80e65bb7e985bb600553e8bcc812de58200998d3a25ba Development documents and examples for python-openid-teams UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python-openid-teams-help noarch b2c809314de11ba4df17daf49f15ae13bcea7816923868e94e4fae78bd614aa1 Development documents and examples for python-openid-teams UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python-openidc-client src f5349f9300f044afb805c831fdbebda259547a282b08eabd9b9e72f3f6f5a07e Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python-openidc-client src 485d9fb4099b9a2c21caafbb042b1612f9b0e3117cb702be14db6cebb99cd7b8 Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python-os-service-types src f22bb6ff109d9622bcb33c4478a00397afed3f19ee9d325ca468d8b296baea8b Python library for consuming OpenStack sevice-types-authority data Python library for consuming OpenStack sevice-types-authority data https://pypi.org/project/os-service-types/ python-os-service-types-help noarch 637114f5c2189d55a0e5b540e88a5670fa4316daf5b357d077d87b47e3d27537 Development documents and examples for os-service-types https://pypi.org/project/os-service-types/ python-oslo-concurrency src 958c2b3503eabbbf7d0d59c5663dc9edeaa43c398e9244a1ee92a234cc630cad Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python-oslo-concurrency src c9bbed874c75d108ad5dead002789ea48e1a604690d137b33741b96354c75763 Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python-oslo-concurrency-help noarch 743ea3e13f7d314ed157f5f6f490339f17348e1e6ed516a8ac9324ddb8f42560 Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python-oslo-config src a48f01d6bbcce9c9c7e285a132fe34ce109915ba79ea1888ef98c409c0d97b44 Oslo Configuration API The Oslo configuration API supports parsing command line arguments and .ini style configuration files. https://docs.openstack.org/oslo.config/latest/ python-oslo-config src 8037fcb48a2f2ec1637ad8174f7836da96df627ffaa7c880491989fd4bdcef81 Oslo Configuration API The Oslo configuration API supports parsing command line arguments and .ini style configuration files. https://docs.openstack.org/oslo.config/latest/ python-oslo-config-help noarch 57e2c096a0805c7e5a4a93a1174fb731794a275f085eba32d39b325695751564 Oslo Configuration API The Oslo configuration API supports parsing command line arguments and .ini style configuration files. https://docs.openstack.org/oslo.config/latest/ python-oslo-config-help noarch 26c227379bcbab84c061f03f1a5a9293c27a5a91e898505c50101f1aa22d8568 Oslo Configuration API The Oslo configuration API supports parsing command line arguments and .ini style configuration files. https://docs.openstack.org/oslo.config/latest/ python-oslo-i18n src a540b4e71f9baf0fcb292df16bf33b4ccb469df634c5c96b10734ce640b3cab4 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-i18n src 9966e48cef6543d9c5696f3df629e01475b4c2c29e98a43d9e23f83aea0f20d1 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-i18n-help noarch 88aa387405085cc9d063fe788cfa9bfb621c86e165f26ecd218f42f1ce1c15e2 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-i18n-help noarch cc37e2f36e96d54dfe6dcf79c39d0cacad086e4e20d4324b85150549f6bd365d Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-serialization src ac44f2cf79ccf0d5daf0334964d2df071c0441fb4fb4aad4bd559463c31ba3dd Oslo Serialization library The oslo.serialization library provides support for representing objects in transmittable and storable formats, such as Base64, JSON and MessagePack. https://docs.openstack.org/oslo.serialization/latest/ python-oslo-serialization src 44dc7fdb185b376bcc8ed78514afa88e24242d9bb7cc9780350cfa3e54f60e0e Oslo Serialization library The oslo.serialization library provides support for representing objects in transmittable and storable formats, such as Base64, JSON and MessagePack. https://docs.openstack.org/oslo.serialization/latest/ python-oslo-serialization-help noarch e566852910c9e60fe719449e2bf2935c3bf9ee052eca1f68adc7fc6f9049f9fa Oslo Serialization library The oslo.serialization library provides support for representing objects in transmittable and storable formats, such as Base64, JSON and MessagePack. https://docs.openstack.org/oslo.serialization/latest/ python-oslo-utils src 44e4a05b8082da84ddf3eb65e01d0b5a91db957b3474b7925b170190ed07b52d Oslo Utility library The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling. https://docs.openstack.org/oslo.utils/latest/ python-oslo-utils src 2bca6e1942a321aef8d7903232f23652eaab93a10aac7fd7a8f87d8d9a4b638a Oslo Utility library The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling. https://docs.openstack.org/oslo.utils/latest/ python-oslo-utils-help noarch 81dc00dee93d66e2669da1c69818c27559e3d2361baa1232d1eb3ba1fb755fc7 Oslo Utility library The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling. https://docs.openstack.org/oslo.utils/latest/ python-parso src 60c8b3061658b53c6f23ef4fb2f9e5a11733b2068154163e020f7c324b99007c A Python Parser Parso is a Python parser that supports error recovery and round-trip parsing for different Python versions. Parso consists of a small API to parse Python and analyse the syntax tree. https://github.com/davidhalter/parso python-parso src daf2e92dc803509a3462035d465831a365af32b76f3118942b0dfc0fdebe68a1 A Python Parser Parso is a Python parser that supports error recovery and round-trip parsing for different Python versions. Parso consists of a small API to parse Python and analyse the syntax tree. https://github.com/davidhalter/parso python-parso-help noarch 4ea9f27e89c16111f47659a03bbf43f755082aeb2d3ea3f79f1032b55e5c7595 Development documents and examples for parso Parso is a Python parser that supports error recovery and round-trip parsing for different Python versions. Parso consists of a small API to parse Python and analyse the syntax tree. https://github.com/davidhalter/parso python-parso-help noarch f199aca1910d0ef29592ec2abc5a8cac9d7395bdd1535f5464b9ec52abfecc4b Development documents and examples for parso Parso is a Python parser that supports error recovery and round-trip parsing for different Python versions. Parso consists of a small API to parse Python and analyse the syntax tree. https://github.com/davidhalter/parso python-pickleshare src e7ccaa15a3b92fddf0f55ff4040b6d52794be5a117400fd830bf394fa87fa6c8 Tiny 'shelve'-like database with concurrency support PickleShare - a small 'shelve' like datastore with concurrency support Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, many processes can access the database simultaneously. Changing a value in database is immediately visible to other processes accessing the same database. Concurrency is possible because the values are stored in separate files. Hence the "database" is a directory where *all* files are governed by PickleShare. Example usage:: from pickleshare import * db = PickleShareDB('~/testpickleshare') db.clear() print("Should be empty:",db.items()) db['hello'] = 15 db['aku ankka'] = [1,2,313] db['paths/are/ok/key'] = [1,(5,46)] print(db.keys()) This module is certainly not ZODB, but can be used for low-load (non-mission-critical) situations where tiny code size trumps the advanced features of a "real" object database. Installation guide: pip install pickleshare https://github.com/pickleshare/pickleshare python-pickleshare-help noarch 0d4c3218dbc552e5bf5192d7204a11baddfdd75abbd0a13a462a958e39800a67 Development documents and examples for pickleshare PickleShare - a small 'shelve' like datastore with concurrency support Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, many processes can access the database simultaneously. Changing a value in database is immediately visible to other processes accessing the same database. Concurrency is possible because the values are stored in separate files. Hence the "database" is a directory where *all* files are governed by PickleShare. Example usage:: from pickleshare import * db = PickleShareDB('~/testpickleshare') db.clear() print("Should be empty:",db.items()) db['hello'] = 15 db['aku ankka'] = [1,2,313] db['paths/are/ok/key'] = [1,(5,46)] print(db.keys()) This module is certainly not ZODB, but can be used for low-load (non-mission-critical) situations where tiny code size trumps the advanced features of a "real" object database. Installation guide: pip install pickleshare https://github.com/pickleshare/pickleshare python-prompt-toolkit src 18a40eaf56d8df2b3de7b0de8f5a375fafedeaaeb2427cd5cd9668cf0848aeb7 Library for building powerful interactive command lines in Python prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python. https://github.com/prompt-toolkit/python-prompt-toolkit python-prompt-toolkit src 53bdc2bb410b4e39e9049ac0245ae34baf48d0ec206a3eefa3dadb546a1f6645 Library for building powerful interactive command lines in Python prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python. https://github.com/prompt-toolkit/python-prompt-toolkit python-prompt-toolkit-help noarch df99750ad1ee1bd4e79db64d030bea93fbe8931c0acebffbe82352b8c9c0e5ed Development documents and examples for prompt-toolkit prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python. https://github.com/prompt-toolkit/python-prompt-toolkit python-prompt-toolkit-help noarch 77378523ba43009ecd509490794d57c4b5ba6713012d0eebb0f1c2e0c3e2bbf3 Development documents and examples for prompt-toolkit prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python. https://github.com/prompt-toolkit/python-prompt-toolkit python-pure-eval src 9ac965337746b36433b31ca910de51330d3d74892c519ab9dd17eec0014ce344 Safely evaluate AST nodes without side effects [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python-pure-eval src 5dd3f8236684d65a883381a739af9fb4d7a3eaaa07d3dac27d4ae0a01eb7846f Safely evaluate AST nodes without side effects [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python-pure-eval src eddc84fd3db173b8065bfb462d8d148d7894f8d1a38db9732eefedcf9b3640c9 Safely evaluate AST nodes without side effects [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python-pure-eval src a52f41afd716d5b2fb562bb7bc5daa155284e57c83a8b9f959734716fba7e2d8 Safely evaluate AST nodes without side effects [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python-pure-eval-help noarch 394d5f925247996bd2d3159e5eb5eef99fa63e80d877ffd9055ff9f65121a1bc Development documents and examples for pure-eval [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python-pure-eval-help noarch 667f290c18d9598d98f57286d004bf72148ba9af6110dd0438e39ee788aa6fc4 Development documents and examples for pure-eval [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python-pure-eval-help noarch 0403fc48ff9c4496b8aa96a094d6ee60afc24998b63610cdff296fb316cf7534 Development documents and examples for pure-eval [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python-py3dns src 4902ad7585598ea9a06798858a31e2688b9b43b227f80f9600e36d21d80e5a82 Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python-py3dns src 71af8898b859284b6c45d395930a602a956b7737130370bf34355db6b4540bf6 Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python-py3dns-help noarch 0d7f5154ccb7ca15033767a8c765f1e56c21f1900474bd7d53a47382ff1e5b7d Development documents and examples for py3dns Python 3 DNS library: https://launchpad.net/py3dns python-py3dns-help noarch faa924f5cb6e3ddbc2e0344277011ed3acef11cfdaec4420046e79e39c74faaf Development documents and examples for py3dns Python 3 DNS library: https://launchpad.net/py3dns python-pyLibravatar src ea3c0add9b5b525ba01464a94b51b686d925d2b7265d927c609015fb2f7dab6c Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python-pyLibravatar src e072c7b6d39cc1fa82831b9b56476455ebff8016750c41e48f97ecc03c880bef Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python-pyLibravatar src d1ab3d779b112e661b841259c6ddcdcf355012855d1f999f4bc634e60ceee713 Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python-pyLibravatar src c81c04d2265affd3192e3494a5427bc63253337b8bfa843556f1295aeef34f6a Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python-pygal src 52f4972c1c60cc65a97599bb2f3a09633a95eb7d817e811dee39c30523f9f54e A Python svg graph plotting library A Python svg graph plotting library. https://www.pygal.org/ python-pygal src 82aec150548b5183816645dbcf2d2a9ae7794acf1bd5f26df73e077c426da59d A Python svg graph plotting library A Python svg graph plotting library. https://www.pygal.org/ python-pygal-help noarch e5a591182dc25c083d58db8116fcb43fbbfe33ce06d6bce44ee1d30328b33552 Development documents and examples for pygal https://www.pygal.org/ python-pygal-help noarch 9d78b67bb8d2b4562900240984e93436d11240a2477ba28a2c578bbd2ca680d4 Development documents and examples for pygal https://www.pygal.org/ python-pygit2 src 43d6ffc8753f7ae0bc0276ab7c7325548d1d18c067f805a50906743975325d51 Python bindings for libgit2. - Documentation - http://www.pygit2.org/ - Install - http://www.pygit2.org/install.html - Download - https://pypi.python.org/pypi/pygit2 - Source code and issue tracker - https://github.com/libgit2/pygit2 - Changelog - https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst - Authors - https://github.com/libgit2/pygit2/blob/master/AUTHORS.rst https://github.com/libgit2/pygit2 python-pygit2 src 845a55ddf4ca7420d322a5fb288a776b10a737036a951b40d23dfdafb51841ed Python bindings for libgit2. - Documentation - http://www.pygit2.org/ - Install - http://www.pygit2.org/install.html - Download - https://pypi.python.org/pypi/pygit2 - Source code and issue tracker - https://github.com/libgit2/pygit2 - Changelog - https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst - Authors - https://github.com/libgit2/pygit2/blob/master/AUTHORS.rst https://github.com/libgit2/pygit2 python-pygit2-debuginfo x86_64 ef7ae37756fc44a15ef711303d37a66f7554ede4d4818e43e19fc5954e7f996f Debug information for package python-pygit2 This package provides debug information for package python-pygit2. Debug information is useful when developing applications that use this package or when debugging this package. https://github.com/libgit2/pygit2 python-pygit2-debuginfo x86_64 bd9afef4f763ea1a906676aa8dcd86d862ca7e32ddfb4d18742e704f95436eed Debug information for package python-pygit2 This package provides debug information for package python-pygit2. Debug information is useful when developing applications that use this package or when debugging this package. https://github.com/libgit2/pygit2 python-pygit2-debugsource x86_64 a66c8cd04ac0247708127ecb4bc31f552ab750a283489cdbb231541b6ec82b06 Debug sources for package python-pygit2 This package provides debug sources for package python-pygit2. Debug sources are useful when developing applications that use this package or when debugging this package. https://github.com/libgit2/pygit2 python-pygit2-debugsource x86_64 327efb9e62e424f7cc8f8b06b3e56c36d60cf6958638abfae52e6795d0a00b03 Debug sources for package python-pygit2 This package provides debug sources for package python-pygit2. Debug sources are useful when developing applications that use this package or when debugging this package. https://github.com/libgit2/pygit2 python-pygit2-help x86_64 e06681f0d7f5e869bc4c8075e737092a110049d887be4553679a9b8df530d020 Development documents and examples for pygit2 - Documentation - http://www.pygit2.org/ - Install - http://www.pygit2.org/install.html - Download - https://pypi.python.org/pypi/pygit2 - Source code and issue tracker - https://github.com/libgit2/pygit2 - Changelog - https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst - Authors - https://github.com/libgit2/pygit2/blob/master/AUTHORS.rst https://github.com/libgit2/pygit2 python-pygit2-help x86_64 067be5b075a163ac9686a5635b83b590e7cabdf15f7dbbc98b0868488c937baa Development documents and examples for pygit2 - Documentation - http://www.pygit2.org/ - Install - http://www.pygit2.org/install.html - Download - https://pypi.python.org/pypi/pygit2 - Source code and issue tracker - https://github.com/libgit2/pygit2 - Changelog - https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst - Authors - https://github.com/libgit2/pygit2/blob/master/AUTHORS.rst https://github.com/libgit2/pygit2 python-pytest-xdist src d73c771b3d5521bb7cd3d6701aad6d8e75fe6f80d2ab7b6e03dda77b67ef7083 pytest xdist plugin for distributed testing and loop-on-failing modes pytest xdist plugin for distributed testing and loop-on-failing modes. https://github.com/pytest-dev/pytest-xdist python-responses src 20baba39db8764e319506f7aa3c9db1dcfbbe8b115cc8cbd21112ba01be4e098 A utility library for mocking out the `requests` Python library. A utility library for mocking out the requests Python library. https://github.com/getsentry/responses python-responses-help noarch 31a689f3969594e9427d8e6e22683fcecba3468faabeb78bb585f7bb75c2498e A utility library for mocking out the `requests` Python library. A utility library for mocking out the requests Python library. https://github.com/getsentry/responses python-retask src 49797aa44fdfe178cf1465d903eef167d80e50a2522cc4e02bd16bc81aa5a5f1 Python module to create and manage distributed task queues Python module to create and manage distributed task queues using redis. http://retask.readthedocs.org/en/latest/index.html python-rich src b0769a541c3e705ce5e66509e451850b54d87e938f74da26de06fd41b5c32c21 Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal Rich is a Python library for rich text and beautiful formatting in the terminal https://github.com/willmcgugan/rich python-rich src da0b09109fa6544a9342eb4cac62fd655cf61d538e2f646e61af118989c17b59 Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal Rich is a Python library for rich text and beautiful formatting in the terminal https://github.com/willmcgugan/rich python-rich-help noarch a66d7521849e8da41a2bddad5755566c5bc77104146ffc34a745d99a107e693d Development documents and examples for rich Rich is a Python library for rich text and beautiful formatting in the terminal https://github.com/willmcgugan/rich python-rich-help noarch 93f3690853ea2f8592dbde6d06ab313902570a33b9f7397d470863ffb035e815 Development documents and examples for rich Rich is a Python library for rich text and beautiful formatting in the terminal https://github.com/willmcgugan/rich python-rpmautospec src b0c76f96f842dc8ca02eb90cb88136b7ee90337115480d7d46241070a98dd3cf Package and CLI tool to generate release fields and changelogs A package and CLI tool to generate RPM release fields and changelogs. https://pagure.io/fedora-infra/rpmautospec python-rpmautospec src 46fca90500a2369ddb35bc550fdee57945d21a096c79336891d54ec269ae11d1 Package and CLI tool to generate release fields and changelogs A package and CLI tool to generate RPM release fields and changelogs. https://pagure.io/fedora-infra/rpmautospec python-stack-data src 04607f2855bbcae1dd9b5a99f240e4901f54be273d2f39e1f86dce955da27969 Extract data from python stack frames and tracebacks for informative displays 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python-stack-data src 7ad4f1763dab8127c33c592a286586f1bad8bf889e7669726fdd28ae61e31cd7 Extract data from python stack frames and tracebacks for informative displays 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python-stack-data src de4e8e7aff9567d32ca7fdfdb6d0e90a6a1f1d026ad06ab3e8e4260cb1c5d26e Extract data from python stack frames and tracebacks for informative displays 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python-stack-data src 85c9fc23ce1ada10b4c2c86be69fad645d47ce21f4af1535e4408c9903f3d29f Extract data from python stack frames and tracebacks for informative displays 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python-stack-data-help noarch 3e973005b6fa0eb69e1aae02f67ced4073c45757fad1273566f4adfa5273ac07 Development documents and examples for stack-data 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python-stack-data-help noarch ce2798e3878eb2a751474d60511f8243b1c33d6d8add24100812ee4d2a23a1d3 Development documents and examples for stack-data 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python-stack-data-help noarch 789ef3d755935fa11db5a1a91d599159951b4f658c86df8e5c521e8ebdb72be3 Development documents and examples for stack-data 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python-templated-dictionary src 3ee9534061a0a4c8eb042134c91bc73997847ff717dc310ae42d04f04ed0e99d Dictionary with Jinja2 expansion Dictionary where __getitem__() is run through Jinja2 template. https://github.com/xsuchy/templated-dictionary python-templated-dictionary-help noarch e836e98d54d1267f3c9d9927ae1b852c00cc5bb093d44ceb20323567a8c81b5d Development documents and examples for templated-dictionary Dictionary where __getitem__() is run through Jinja2 template. https://github.com/xsuchy/templated-dictionary python3-Authlib noarch 0a341b3eee01cc369ed7b9e5e92db25beb6e5312cea75bddd1a790ad04f7c126 The ultimate Python library in building OAuth and OpenID Connect servers and clients. The ultimate Python library in building OAuth and OpenID Connect servers. JWS, JWK, JWA, JWT are included. https://authlib.org/ python3-CCColUtils x86_64 1897d04fff079f515045a2ef1977746cf287e72b25316b4718074e8edaf194a8 Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python3-CCColUtils x86_64 d564851f8498b38d9da551f0c2e6869eb2254e1fa40b8acb223e10194ca2cfae Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python3-Flask-Caching noarch 8d962cbaa6ca9d91955ddbe28be70da9b147b4db9b529020ad49d22a9f3d8324 Adds caching support to Flask applications. A fork of the `Flask-cache`_ extension which adds easy cache support to Flask. https://github.com/pallets-eco/flask-caching python3-Flask-OpenID noarch 2e3ec9eb9814c37626dc2592de4bf44727cf86bdef0891096dc8ba37361f66b3 OpenID support for Flask Flask-OpenID adds openid support to flask applications http://github.com/mitsuhiko/flask-openid/ python3-Flask-WTF noarch 2e3245db1cef9e61675de50fabcf1a4b480aedf6ee09aa66e96fa1079723ed1b Form rendering, validation, and CSRF protection for Flask with WTForms. Simple integration of Flask and WTForms, including CSRF, file upload, and reCAPTCHA. https://github.com/wtforms/flask-wtf/ python3-XStatic-Bootstrap-SCSS noarch d664fa5d53b54d92e8fa4e8fb4848b32cc341c2dc89ec707224df89c53c53c73 Bootstrap-SCSS 3.4.1 (XStatic packaging standard) Bootstrap style library packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. https://github.com/twbs/bootstrap-sass python3-XStatic-DataTables noarch 88691749428f1e8a6619ca9493a4dd3ab8712631e9201398c44468f3f49abf08 DataTables 1.10.15 (XStatic packaging standard) The DataTables plugin for jQuery packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. http://www.datatables.net python3-XStatic-Patternfly noarch de75199f71ee4abe3b31db038c7843865c863b900729c4505acf47a74bcf917f Patternfly 3.21.0 (XStatic packaging standard) Patternfly style library packaged for setuptools (easy_install) / pip. This package is intended to be used by **any** project that needs these files. It intentionally does **not** provide any extra code except some metadata **nor** has any extra requirements. You MAY use some minimal support code from the XStatic base package, if you like. You can find more info about the xstatic packaging way in the package `XStatic`. https://www.patternfly.org/ python3-argparse-manpage noarch a856a4ea862bf12daee85b1f6a2e55e500eb68ed1ce4bdbc66535ed8a534fe7d Build manual page from python's ArgumentParser object. Automatically build manpage from argparse https://github.com/praiskup/argparse-manpage python3-asttokens noarch fc6908cd6149fca28fde69f00a9b10138a7efcb0b93d8eec9c3598d7e57a9a21 Module to annotate Python abstract syntax trees with source code positions The asttokens module annotates Python abstract syntax trees (ASTs) with the positions of tokens and text in the source code that generated them. This makes it possible for tools that work with logical AST nodes to find the particular text that resulted in those nodes, for example for automated refactoring or highlighting. https://github.com/gristlabs/asttokens python3-backoff noarch 44debf53144710915e33411f5cd475a6c596dd24a22e3f55348f4f772a4b5a1c Function decoration for backoff and retry This module provides function decorators which can be used to wrap a\ function such that it will be retried until some condition is met. It\ is meant to be of use when accessing unreliable resources with the\ potential for intermittent failures i.e. network resources and external\ APIs. Somewhat more generally, it may also be of use for dynamically\ polling resources for externally generated content. https://github.com/litl/backoff python3-blessed noarch 1c60050f5d907e644ac8fd4ee72eddb992bec76f68356df40a93eab08b29268c Easy, practical library for making terminal apps, by providing an elegant, well-documented interface to Colors, Keyboard input, and screen Positioning capabilities. Blessed is an easy, practical library for making python terminal apps https://github.com/jquast/blessed python3-cachelib noarch 6faba08c24b953d78d6efabd37c3fec2595e10752cadc9c18e528b1d8c8b369b A collection of cache libraries in the same API interface. A collection of cache libraries in the same API interface. Extracted from werkzeug. https://github.com/pallets-eco/cachelib python3-copr-common noarch 438aa8804fd276c1e332049386ccbc929249b0f133d35e62635b95d364b08b42 Python code used by Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python code used by other Copr packages. Mostly useful for developers only. https://github.com/fedora-copr/copr python3-copr-common noarch a14a98180989f5985ed0dd7913f5cf122957a7b09ccbe391135b54478a7d7e40 Python code used by Copr COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latest builds. This package contains python code used by other Copr packages. Mostly useful for developers only. https://github.com/fedora-copr/copr python3-crudini noarch 45d0afbc4ff0f1b7df5dd7ad77e239f0398293ffb56294f295a56c12fed173bb A utility for manipulating ini files crudini A utility for manipulating ini files http://github.com/pixelb/crudini python3-debtcollector noarch 2212a08871de21364e9a7adff3ba5805e6721e0c9507cbe21a5e3c217905fec2 A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. https://docs.openstack.org/debtcollector/latest python3-email-validator noarch 9a5a6413d570d446aadb7b3acda755d4268beb474f506756a2e23ceb5df08f17 A robust email address syntax and deliverability validation library. A robust email address syntax and deliverability validation library for Python by [Joshua Tauberer](https://joshdata.me). This library validates that a string is of the form `name@example.com`. This is the sort of validation you would want for an email-based login form on a website. Key features: * Checks that an email address has the correct syntax --- good for login forms or other uses related to identifying users. * Gives friendly error messages when validation fails (appropriate to show to end users). * (optionally) Checks deliverability: Does the domain name resolve? And you can override the default DNS resolver. * Supports internationalized domain names and (optionally) internationalized local parts, but blocks unsafe characters. * Normalizes email addresses (super important for internationalized addresses! see below). The library is NOT for validation of the To: line in an email message (e.g. `My Name <my@address.com>`), which [flanker](https://github.com/mailgun/flanker) is more appropriate for. And this library does NOT permit obsolete forms of email addresses, so if you need strict validation against the email specs exactly, use [pyIsEmail](https://github.com/michaelherold/pyIsEmail). This library is tested with Python 3.6+ but should work in earlier versions: [![Build Status](https://app.travis-ci.com/JoshData/python-email-validator.svg?branch=main)](https://app.travis-ci.com/JoshData/python-email-validator) https://github.com/JoshData/python-email-validator python3-executing noarch f805ed08e59a9c5d8cbfb575195adf19995d43139c401197736987f68365cef3 Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python3-executing noarch 943fd2a66b77307c908a3108b173c578754f332d319a8c0bf12e4f1120ba91c9 Get the currently executing AST node of a frame, and other information [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 2.7 and 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Libraries that use this](#libraries-that-use-this) ```python import executing node = executing.Source.executing(frame).node ``` Then `node` will be an AST node (from the `ast` standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). `node` will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to `Source.executing()` rather than the `tb_frame` attribute to get the correct node. For this you will need to separately install the [`asttokens`](https://github.com/gristlabs/asttokens) library, then obtain an `ASTTokens` object: ```python executing.Source.executing(frame).source.asttokens() ``` or: ```python executing.Source.for_frame(frame).asttokens() ``` or use one of the convenience methods: ```python executing.Source.executing(frame).text() executing.Source.executing(frame).text_range() ``` ```python executing.Source.executing(frame).code_qualname() ``` or: ```python executing.Source.for_frame(frame).code_qualname(frame.f_code) ``` Everything goes through the `Source` class. Only one instance of the class is created for each filename. Subclassing it to add more attributes on creation or methods is recommended. The classmethods such as `executing` will respect this. See the source code and docstrings for more detail. pip install executing If you don't like that you can just copy the file `executing.py`, there are no dependencies (but of course you won't get updates). Suppose the frame is executing this line: ```python self.foo(bar.x) ``` and in particular it's currently obtaining the attribute `self.foo`. Looking at the bytecode, specifically `frame.f_code.co_code[frame.f_lasti]`, we can tell that it's loading an attribute, but it's not obvious which one. We can narrow down the statement being executed using `frame.f_lineno` and find the two `ast.Attribute` nodes representing `self.foo` and `bar.x`. How do we find out which one it is, without recreating the entire compiler in Python? The trick is to modify the AST slightly for each candidate expression and observe the changes in the bytecode instructions. We change the AST to this: ```python (self.foo ** 'longuniqueconstant')(bar.x) ``` and compile it, and the bytecode will be almost the same but there will be two new instructions: LOAD_CONST 'longuniqueconstant' BINARY_POWER and just before that will be a `LOAD_ATTR` instruction corresponding to `self.foo`. Seeing that it's in the same position as the original instruction lets us know we've found our match. Yes - if it identifies a node, you can trust that it's identified the correct one. The tests are very thorough - in addition to unit tests which check various situations directly, there are property tests against a large number of files (see the filenames printed in [this build](https://travis-ci.org/alexmojaki/executing/jobs/557970457)) with real code. Specifically, for each file, the tests: 1. Identify as many nodes as possible from all the bytecode instructions in the file, and assert that they are all distinct 2. Find all the nodes that should be identifiable, and assert that they were indeed identified somewhere In other words, it shows that there is a one-to-one mapping between the nodes and the instructions that can be handled. This leaves very little room for a bug to creep in. Furthermore, `executing` checks that the instructions compiled from the modified AST exactly match the original code save for a few small known exceptions. This accounts for all the quirks and optimisations in the interpreter. Currently it works in almost all cases for the following `ast` nodes: - `Call`, e.g. `self.foo(bar)` - `Attribute`, e.g. `point.x` - `Subscript`, e.g. `lst[1]` - `BinOp`, e.g. `x + y` (doesn't include `and` and `or`) - `UnaryOp`, e.g. `-n` (includes `not` but only works sometimes) - `Compare` e.g. `a < b` (not for chains such as `0 < p < 1`) The plan is to extend to more operations in the future. - **[`stack_data`](https://github.com/alexmojaki/stack_data)**: Extracts data from stack frames and tracebacks, particularly to display more useful tracebacks than the default. Also uses another related library of mine: **[`pure_eval`](https://github.com/alexmojaki/pure_eval)**. - **[`futurecoder`](https://futurecoder.io/)**: Highlights the executing node in tracebacks using `executing` via `stack_data`, and provides debugging with `snoop`. - **[`snoop`](https://github.com/alexmojaki/snoop)**: A feature-rich and convenient debugging library. Uses `executing` to show the operation which caused an exception and to allow the `pp` function to display the source of its arguments. - **[`heartrate`](https://github.com/alexmojaki/heartrate)**: A simple real time visualisation of the execution of a Python program. Uses `executing` to highlight currently executing operations, particularly in each frame of the stack trace. - **[`sorcery`](https://github.com/alexmojaki/sorcery)**: Dark magic delights in Python. Uses `executing` to let special callables called spells know where they're being called from. - **[`IPython`](https://github.com/ipython/ipython/pull/12150)**: Highlights the executing node in tracebacks using `executing` via [`stack_data`](https://github.com/alexmojaki/stack_data). - **[`icecream`](https://github.com/gruns/icecream)**: 🍦 Sweet and creamy print debugging. Uses `executing` to identify where `ic` is called and print its arguments. - **[`friendly_traceback`](https://github.com/friendly-traceback/friendly-traceback)**: Uses `stack_data` and `executing` to pinpoint the cause of errors and provide helpful explanations. - **[`python-devtools`](https://github.com/samuelcolvin/python-devtools)**: Uses `executing` for print debugging similar to `icecream`. - **[`sentry_sdk`](https://github.com/getsentry/sentry-python)**: Add the integration `sentry_sdk.integrations.executingExecutingIntegration()` to show the function `__qualname__` in each frame in sentry events. - **[`varname`](https://github.com/pwwang/python-varname)**: Dark magics about variable names in python. Uses `executing` to find where its various magical functions like `varname` and `nameof` are called from. https://github.com/alexmojaki/executing python3-flask-whooshee noarch 26f8c8161f9278f28562a6a0872c845178842aac6a924c94aa2713d85a0d48e5 Flask-SQLAlchemy - Whoosh Integration Customizable Flask - SQLAlchemy - Whoosh integration https://github.com/bkabrda/flask-whooshee python3-html2text noarch 6838046f81089504d1ce44768c1df86483f02bcc6f789f3d6760b28655548106 Turn HTML into equivalent Markdown-structured text. Convert HTML to Markdown-formatted text. https://github.com/Alir3z4/html2text/ python3-html5-parser x86_64 ae5a95d66553f55077ff7c84be349fca44bc51dcf626660f5daa01593511b999 A fast, standards compliant, C based, HTML 5 parser for python A fast, standards compliant, C based, HTML 5 parser for python https://pypi.python.org/pypi/html5-parser python3-html5-parser x86_64 2eb0d8430202abd710e710ee5aa9c987b5ad6d007f9fdab61a35b9fd9539cb61 A fast, standards compliant, C based, HTML 5 parser for python A fast, standards compliant, C based, HTML 5 parser for python https://pypi.python.org/pypi/html5-parser python3-ipdb noarch 8b878644e8af3d81f83f83daf89eb4d47e048b09cb98d0bb0befaf8a8f5ea20d IPython-enabled pdb https://github.com/gotcha/ipdb python3-ipython noarch aa7656ddc6f6c7e8846423fd98b96ce4e22eabdfc2c46313283f9d194fccf028 IPython: Productive Interactive Computing IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are: * A powerful interactive Python shell * A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter notebooks and other interactive frontends. The enhanced interactive Python shells have the following main features: * Comprehensive object introspection. * Input history, persistent across sessions. * Caching of output results during a session with automatically generated references. * Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords. * Extensible system of 'magic' commands for controlling the environment and performing many tasks related either to IPython or the operating system. * A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time). * Session logging and reloading. * Extensible syntax processing for special purpose situations. * Access to the system shell with user-extensible alias system. * Easily embeddable in other Python programs and GUIs. * Integrated access to the pdb debugger and the Python profiler. The latest development version is always available from IPython's `GitHub site <http://github.com/ipython>`_. https://ipython.org python3-ipython noarch 0f18012848fcc0f612be8ac132373f23cb52b8161ec80a52222d351c25cd24f6 IPython: Productive Interactive Computing IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are: * A powerful interactive Python shell * A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter notebooks and other interactive frontends. The enhanced interactive Python shells have the following main features: * Comprehensive object introspection. * Input history, persistent across sessions. * Caching of output results during a session with automatically generated references. * Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords. * Extensible system of 'magic' commands for controlling the environment and performing many tasks related either to IPython or the operating system. * A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time). * Session logging and reloading. * Extensible syntax processing for special purpose situations. * Access to the system shell with user-extensible alias system. * Easily embeddable in other Python programs and GUIs. * Integrated access to the pdb debugger and the Python profiler. The latest development version is always available from IPython's `GitHub site <http://github.com/ipython>`_. https://ipython.org python3-jedi noarch f71a3ee55132b9412110a72212411a7dfbb917dd4b2152456e09eb493502469a A static analysis tool for Python that is typically used in IDEs/editors plugins Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins. It has a focus on autocompletion and goto functionality. Other features include refactoring, code search and finding references. https://github.com/davidhalter/jedi python3-jedi noarch 4b1cd9e2bcafd9d1b82787f07caededdc0237878fa510f9f7edf010af8cbe5a3 A static analysis tool for Python that is typically used in IDEs/editors plugins Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins. It has a focus on autocompletion and goto functionality. Other features include refactoring, code search and finding references. https://github.com/davidhalter/jedi python3-koji noarch cacf94cf383833960acc71c955ab5ad944e0b474620fafd3bbc22bdea2ba36f7 Build system tools python library Koji is a system for building and tracking RPMS. This subpackage provides python functions and libraries. https://pagure.io/koji/ python3-koji noarch 8a177d2b6b82509521bf508964e81f03966abb06e118a0da20b5e3adbac76a68 Build system tools python library Koji is a system for building and tracking RPMS. This subpackage provides python functions and libraries. https://pagure.io/koji/ python3-littleutils noarch 8b667a5a780afc66a5dc25c896b1c731e107a1d0c41f54ecc91bdca3b75b8b46 Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python3-littleutils noarch 7f79a32b6e33ec6c05709ccfda375ae8e7a1eaae9a879ab698761eb7aade57dd Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python3-matplotlib-inline noarch 9ad1b6b29e73f506664886c7fe38499fbe16228954357dadf5383f367dc3b7b5 Inline Matplotlib backend for Jupyter This package provides support for matplotlib to display figures directly inline in the Jupyter notebook and related clients, as shown below. With conda: ```bash conda install -c conda-forge matplotlib-inline ``` With pip: ```bash pip install matplotlib-inline ``` Note that in current versions of JupyterLab and Jupyter Notebook, the explicit use of the `%matplotlib inline` directive is not needed anymore, though other third-party clients may still require it. This will produce a figure immediately below: ```python %matplotlib inline import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 3*np.pi, 500) plt.plot(x, np.sin(x**2)) plt.title('A simple chirp'); ``` Licensed under the terms of the BSD 3-Clause License, by the IPython Development Team (see `LICENSE` file). BSD 3-Clause License Copyright (c) 2019-2022, IPython Development Team. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. https://github.com/ipython/matplotlib-inline python3-openid noarch 099cd03ab5faf19edbfce68ddfe3fd7d2c752426ae95971ca9045747a2b3e62d OpenID support for modern servers and consumers. This is a set of Python packages to support use of the OpenID decentralized identity system in your application, update to Python 3. Want to enable single sign-on for your web site? Use the openid.consumer package. Want to run your own OpenID server? Check out openid.server. Includes example code and support for a variety of storage back-ends. http://github.com/necaris/python3-openid python3-openid noarch e63a22729ddb39911523cc9b60969045f498f1b7d89c14dd242d0bdae265facb OpenID support for modern servers and consumers. This is a set of Python packages to support use of the OpenID decentralized identity system in your application, update to Python 3. Want to enable single sign-on for your web site? Use the openid.consumer package. Want to run your own OpenID server? Check out openid.server. Includes example code and support for a variety of storage back-ends. http://github.com/necaris/python3-openid python3-openid src c3fdb50258d10fb72c96992d6731e7a1de9e13c93c5e927ba08198324eacd1da OpenID support for modern servers and consumers. This is a set of Python packages to support use of the OpenID decentralized identity system in your application, update to Python 3. Want to enable single sign-on for your web site? Use the openid.consumer package. Want to run your own OpenID server? Check out openid.server. Includes example code and support for a variety of storage back-ends. http://github.com/necaris/python3-openid python3-openid src 74f1e658c83a64534aa7f74ead78669725c0d928d260fbe557d8f3af054e4368 OpenID support for modern servers and consumers. This is a set of Python packages to support use of the OpenID decentralized identity system in your application, update to Python 3. Want to enable single sign-on for your web site? Use the openid.consumer package. Want to run your own OpenID server? Check out openid.server. Includes example code and support for a variety of storage back-ends. http://github.com/necaris/python3-openid python3-openid-help noarch 451011ef5f2c02ea3afa0d6476f173250be08fe355ceaeec99a0c7519f11d7b8 Development documents and examples for python3-openid This is a set of Python packages to support use of the OpenID decentralized identity system in your application, update to Python 3. Want to enable single sign-on for your web site? Use the openid.consumer package. Want to run your own OpenID server? Check out openid.server. Includes example code and support for a variety of storage back-ends. http://github.com/necaris/python3-openid python3-openid-help noarch 82957f547a4697a402a6913331bce1611afe434782be86cf47bbf856615a5fe1 Development documents and examples for python3-openid This is a set of Python packages to support use of the OpenID decentralized identity system in your application, update to Python 3. Want to enable single sign-on for your web site? Use the openid.consumer package. Want to run your own OpenID server? Check out openid.server. Includes example code and support for a variety of storage back-ends. http://github.com/necaris/python3-openid python3-openid-teams noarch afe3db79d6d4d253a03b0d0f2aabad61d14a08b1fcdf63cbfac9f5b04f19e53a This is an implementation of the OpenID teams extension for python-openid UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python3-openid-teams noarch 8b031c08dbe60e217071fff70bc4225f1fd9d3d5da2e7a9a2f1a681c817ff4d7 This is an implementation of the OpenID teams extension for python-openid UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python3-openidc-client noarch 8d7dcbd77bbe3705dec1df4388e7f4979e4f4cce7c825e11f593f7a78f108dbf Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python3-openidc-client noarch 31160f70f79d880acb04542689590a39dad317dd9dbc1b03d6d4855f2a170259 Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python3-os-service-types noarch 3d66bfb42f654dc7358a0c55d3c6d6555f84e1d59224a0f2d4a609f05e162b3e Python library for consuming OpenStack sevice-types-authority data https://pypi.org/project/os-service-types/ python3-oslo-concurrency noarch cddaf6e010eff181a329512a0f6053e9ce27db1a3514dd6f0468a7d7e653335c Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python3-oslo-config noarch 2262fc3097ca390421ff6ea9ae47e4a7eb9c8078ab9b64a127589efe8730d55a Oslo Configuration API The Oslo configuration API supports parsing command line arguments and .ini style configuration files. https://docs.openstack.org/oslo.config/latest/ python3-oslo-config noarch 53c1b53eba5918bf1d6e4313081ff01b75b74ff29e72e30eb8ebb6ade1e6dafb Oslo Configuration API The Oslo configuration API supports parsing command line arguments and .ini style configuration files. https://docs.openstack.org/oslo.config/latest/ python3-oslo-i18n noarch 96f869e7d7b78d295e5c3e98aa9f52bff05bdbc037009d760f9f4119c0036e30 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python3-oslo-i18n noarch 71fef49b756ea86acaefaacb6460f10e56288f25a814481d1d1672f77976c0e2 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python3-oslo-serialization noarch c16cadaf3c9e8ca38bf38e5433220ff3c89df158c53899dc611e91bf46d67a52 Oslo Serialization library The oslo.serialization library provides support for representing objects in transmittable and storable formats, such as Base64, JSON and MessagePack. https://docs.openstack.org/oslo.serialization/latest/ python3-oslo-utils noarch 05c83a649a9621ae96849f8971ca7ae7dba8402e8d175588c0102a26e597b216 Oslo Utility library The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling. https://docs.openstack.org/oslo.utils/latest/ python3-parso noarch 7a2ef8d7232c7f0d920b8a6810f0aad3d9153c0f09c90ce4671d747d49c559a3 A Python Parser Parso is a Python parser that supports error recovery and round-trip parsing for different Python versions. Parso consists of a small API to parse Python and analyse the syntax tree. https://github.com/davidhalter/parso python3-parso noarch 9e45ff78ff166f7efad8b095667d335737e61b87a217e4ea9763f82c1198b3f3 A Python Parser Parso is a Python parser that supports error recovery and round-trip parsing for different Python versions. Parso consists of a small API to parse Python and analyse the syntax tree. https://github.com/davidhalter/parso python3-pickleshare noarch 44c0c65bee304915329d47afe41a8474d7d79d12dd69687e6e1f4ee78c0a3e88 Tiny 'shelve'-like database with concurrency support PickleShare - a small 'shelve' like datastore with concurrency support Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, many processes can access the database simultaneously. Changing a value in database is immediately visible to other processes accessing the same database. Concurrency is possible because the values are stored in separate files. Hence the "database" is a directory where *all* files are governed by PickleShare. Example usage:: from pickleshare import * db = PickleShareDB('~/testpickleshare') db.clear() print("Should be empty:",db.items()) db['hello'] = 15 db['aku ankka'] = [1,2,313] db['paths/are/ok/key'] = [1,(5,46)] print(db.keys()) This module is certainly not ZODB, but can be used for low-load (non-mission-critical) situations where tiny code size trumps the advanced features of a "real" object database. Installation guide: pip install pickleshare https://github.com/pickleshare/pickleshare python3-prompt-toolkit noarch 9d48fb3509fe2c3a456e4db654bb2b6a7a16312970c1971e30ab913023994b62 Library for building powerful interactive command lines in Python prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python. https://github.com/prompt-toolkit/python-prompt-toolkit python3-prompt-toolkit noarch a5445478637de73230183ca32436aa35c5bc2f1b28770fdcd3b88dcd1d94cf55 Library for building powerful interactive command lines in Python prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python. https://github.com/prompt-toolkit/python-prompt-toolkit python3-pure-eval noarch e795b997b46a2b47a1cf459fcce67ed7e05655f37b44e36d8908e5e8e827bc48 Safely evaluate AST nodes without side effects [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python3-pure-eval noarch 29e4c786410bca6ea2e06be1552860cd260fe352751045f49fa8ddfd04cb94e6 Safely evaluate AST nodes without side effects [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python3-pure-eval noarch c5604b3e74afca381f84056c2c62ef89739de639b9c006f24b29601291da473e Safely evaluate AST nodes without side effects [![Build Status](https://travis-ci.org/alexmojaki/pure_eval.svg?branch=master)](https://travis-ci.org/alexmojaki/pure_eval) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/pure_eval/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/pure_eval?branch=master) [![Supports Python versions 3.5+](https://img.shields.io/pypi/pyversions/pure_eval.svg)](https://pypi.python.org/pypi/pure_eval) This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects. It can be installed from PyPI: pip install pure_eval To demonstrate usage, suppose we have an object defined as follows: ```python class Rectangle: def __init__(self, width, height): self.width = width self.height = height @property def area(self): print("Calculating area...") return self.width * self.height rect = Rectangle(3, 5) ``` Given the `rect` object, we want to evaluate whatever expressions we can in this source code: ```python source = "(rect.width, rect.height, rect.area)" ``` This library works with the AST, so let's parse the source code and peek inside: ```python import ast tree = ast.parse(source) the_tuple = tree.body[0].value for node in the_tuple.elts: print(ast.dump(node)) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) Attribute(value=Name(id='rect', ctx=Load()), attr='area', ctx=Load()) ``` Now to actually use the library. First construct an Evaluator: ```python from pure_eval import Evaluator evaluator = Evaluator({"rect": rect}) ``` The argument to `Evaluator` should be a mapping from variable names to their values. Or if you have access to the stack frame where `rect` is defined, you can instead use: ```python evaluator = Evaluator.from_frame(frame) ``` Now to evaluate some nodes, using `evaluator[node]`: ```python print("rect.width:", evaluator[the_tuple.elts[0]]) print("rect:", evaluator[the_tuple.elts[0].value]) ``` Output: ``` rect.width: 3 rect: <__main__.Rectangle object at 0x105b0dd30> ``` OK, but you could have done the same thing with `eval`. The useful part is that it will refuse to evaluate the property `rect.area` because that would trigger unknown code. If we try, it'll raise a `CannotEval` exception. ```python from pure_eval import CannotEval try: print("rect.area:", evaluator[the_tuple.elts[2]]) # fails except CannotEval as e: print(e) # prints CannotEval ``` To find all the expressions that can be evaluated in a tree: ```python for node, value in evaluator.find_expressions(tree): print(ast.dump(node), value) ``` Output: ```python Attribute(value=Name(id='rect', ctx=Load()), attr='width', ctx=Load()) 3 Attribute(value=Name(id='rect', ctx=Load()), attr='height', ctx=Load()) 5 Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> Name(id='rect', ctx=Load()) <__main__.Rectangle object at 0x105568d30> ``` Note that this includes `rect` three times, once for each appearance in the source code. Since all these nodes are equivalent, we can group them together: ```python from pure_eval import group_expressions for nodes, values in group_expressions(evaluator.find_expressions(tree)): print(len(nodes), "nodes with value:", values) ``` Output: ``` 1 nodes with value: 3 1 nodes with value: 5 3 nodes with value: <__main__.Rectangle object at 0x10d374d30> ``` If we want to list all the expressions in a tree, we may want to filter out certain expressions whose values are obvious. For example, suppose we have a function `foo`: ```python def foo(): pass ``` If we refer to `foo` by its name as usual, then that's not interesting: ```python from pure_eval import is_expression_interesting node = ast.parse('foo').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='foo', ctx=Load()) False ``` But if we refer to it by a different name, then it's interesting: ```python node = ast.parse('bar').body[0].value print(ast.dump(node)) print(is_expression_interesting(node, foo)) ``` Output: ```python Name(id='bar', ctx=Load()) True ``` In general `is_expression_interesting` returns False for the following values: - Literals (e.g. `123`, `'abc'`, `[1, 2, 3]`, `{'a': (), 'b': ([1, 2], [3])}`) - Variables or attributes whose name is equal to the value's `__name__`, such as `foo` above or `self.foo` if it was a method. - Builtins (e.g. `len`) referred to by their usual name. To make things easier, you can combine finding expressions, grouping them, and filtering out the obvious ones with: ```python evaluator.interesting_expressions_grouped(root) ``` To get the source code of an AST node, I recommend [asttokens](https://github.com/gristlabs/asttokens). Here's a complete example that brings it all together: ```python from asttokens import ASTTokens from pure_eval import Evaluator source = """ x = 1 d = {x: 2} y = d[x] """ names = {} exec(source, names) atok = ASTTokens(source, parse=True) for nodes, value in Evaluator(names).interesting_expressions_grouped(atok.tree): print(atok.get_text(nodes[0]), "=", value) ``` Output: ```python x = 1 d = {1: 2} y = 2 d[x] = 2 ``` http://github.com/alexmojaki/pure_eval python3-py3dns noarch 4d6e9efcb049ab460121e1ccc37ea3919cc6076372570b1dae8600f4ac3b1411 Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python3-py3dns noarch 8c43ab733b68cbb7f777fc2d2093f2dc0e33a8ae189d3f4d74c7b9d4aab0d97c Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python3-pyLibravatar noarch 47923cb1f8530ef742ddfa01719bc092a9bf2d775730648194c0b88067d6d24c Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python3-pyLibravatar noarch 2281629529ef7529e674f4a3603b1269ad324ecdc41df0cdde41670613b3659a Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python3-pyLibravatar noarch 5cfa5b62fd0169a399c7c36ce19e0d29ba41704406b336dd2908fefb6ff2a25e Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python3-pyLibravatar noarch cbd50214ccffca4bf99ddbc35cdbbe67d701740d9f2678b8dafc28747667777a Python module for Libravatar PyLibravatar is an easy way to make use of the federated Libravatar_ avatar hosting service from within your Python applications. https://launchpad.net/pylibravatar python3-pygal noarch a934effd1adad4d36a9523ddb8e5e8817e49ec9f6eaa709274007bdbac21940e A Python svg graph plotting library https://www.pygal.org/ python3-pygal noarch 57addf34560a77abceaf38918050542a6bd078e5e4c1ee46abc6480bbcd4750c A Python svg graph plotting library https://www.pygal.org/ python3-pygit2 x86_64 fd86f09abda44ab37752686fff3f4736797bbd43c5b855cbd4aff0983291fd97 Python bindings for libgit2. - Documentation - http://www.pygit2.org/ - Install - http://www.pygit2.org/install.html - Download - https://pypi.python.org/pypi/pygit2 - Source code and issue tracker - https://github.com/libgit2/pygit2 - Changelog - https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst - Authors - https://github.com/libgit2/pygit2/blob/master/AUTHORS.rst https://github.com/libgit2/pygit2 python3-pygit2 x86_64 c661cb69206e7608da6ce6d25df467a2b286cf3b7803d31368c2c42826ec8a42 Python bindings for libgit2. - Documentation - http://www.pygit2.org/ - Install - http://www.pygit2.org/install.html - Download - https://pypi.python.org/pypi/pygit2 - Source code and issue tracker - https://github.com/libgit2/pygit2 - Changelog - https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst - Authors - https://github.com/libgit2/pygit2/blob/master/AUTHORS.rst https://github.com/libgit2/pygit2 python3-resalloc noarch 39e7a9adc1953763a04e3106ce2fc4c5154c9893b05f833b9506047363bf02a8 Resource allocator for expensive resources - Python 3 client library The resalloc project aims to help with taking care of dynamically allocated resources, for example ephemeral virtual machines used for the purposes of CI/CD tasks. The python3-resalloc package provides Python 3 client library for talking to the resalloc server. https://github.com/praiskup/resalloc python3-responses noarch a31b8cd4d709963fa4d0a2636a1d738301440c96d68994315fbeb26313da766d A utility library for mocking out the `requests` Python library. A utility library for mocking out the requests Python library. https://github.com/getsentry/responses python3-retask noarch 719e6f58169d091df8af230bd5cff7dc60efda8a7d6ff342494f60a576d31a99 Python module to create and manage distributed task queues Python module to create and manage distributed task queues using redis. http://retask.readthedocs.org/en/latest/index.html python3-rich noarch 405a93b81b997f84b23ca7f971b7a8d1affda75177e0ae473080824a6db22005 Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal Rich is a Python library for rich text and beautiful formatting in the terminal https://github.com/willmcgugan/rich python3-rich noarch b27a08dea8278fab47b2157d9ee83e1cb8da2bd07b1dd3d6c5b6eb25573a3cc3 Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal Rich is a Python library for rich text and beautiful formatting in the terminal https://github.com/willmcgugan/rich python3-rpkg noarch 7e00a72c7d1c8e1949cd94e840c68c91b9305d7402688b0887e4c7da5721e767 Python library for interacting with rpm+git A python library for managing RPM package sources in a git repository. https://pagure.io/rpkg python3-rpkg noarch b57a9a4d173515e8fb583006388f1fb5d9dd406bdf12a158d6dc8da9cca72406 Python library for interacting with rpm+git A python library for managing RPM package sources in a git repository. https://pagure.io/rpkg python3-rpkg noarch dd79f40aaa8b7b56424b46783dff7d01a67a95b9a87c5e49be32b4d4c66dfd09 Python library for interacting with rpm+git A python library for managing RPM package sources in a git repository. https://pagure.io/rpkg python3-rpmautospec noarch 2997e2199d59d3ac759c57caf2d5b869ef2ede192bd7ab5f1dcb3622aa5c99fe Package and CLI tool to generate release fields and changelogs A package and CLI tool to generate RPM release fields and changelogs. https://pagure.io/fedora-infra/rpmautospec python3-rpmautospec noarch c0ac3dde91b39949648bd27a15c2242e3c57d1ec812b18c1fa2f36b6a654ffd5 Package and CLI tool to generate release fields and changelogs A package and CLI tool to generate RPM release fields and changelogs. https://pagure.io/fedora-infra/rpmautospec python3-stack-data noarch 11d03e22d5d9a1fd76c95ae289120dc5134dfbf3c8380e856ab887e5261aca78 Extract data from python stack frames and tracebacks for informative displays 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python3-stack-data noarch 64e4ea34deb958141788afb531455f58e0a1a5e04d300f200e82d0571c4aa3fa Extract data from python stack frames and tracebacks for informative displays 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python3-stack-data noarch 125b49c675153ccf76a75acb555695dc3801201c2bcd75ab683d056fa632d059 Extract data from python stack frames and tracebacks for informative displays 6 | for i in range(5): 7 | row = [] 8 | result.append(row) --> 9 | print_stack() 10 | for j in range(5): ``` The code for `print_stack()` is fairly self-explanatory. If you want to learn more details about a particular class or method I suggest looking through some docstrings. `FrameInfo` is a class that accepts either a frame or a traceback object and provides a bunch of nice attributes and properties (which are cached so you don't need to worry about performance). In particular `frame_info.lines` is a list of `Line` objects. `line.render()` returns the source code of that line suitable for display. Without any arguments it simply strips any common leading indentation. Later on we'll see a more powerful use for it. You can see that `frame_info.lines` includes some lines of surrounding context. By default it includes 3 pieces of context before the main line and 1 piece after. We can configure the amount of context by passing options: ```python options = stack_data.Options(before=1, after=0) frame_info = stack_data.FrameInfo(frame, options) ``` Then the output looks like: ``` http://github.com/alexmojaki/stack_data python3-templated-dictionary noarch d8b02f4104494005a8d57726938175f7a745e7fd71473310ca6e5378d7cd3b8a Dictionary with Jinja2 expansion Dictionary where __getitem__() is run through Jinja2 template. https://github.com/xsuchy/templated-dictionary resalloc noarch 42b503ec889f9ad79e01a87114796bcf89abeac5d9db0e2e171fd3a98cafc40f Resource allocator for expensive resources - client tooling The resalloc project aims to help with taking care of dynamically allocated resources, for example ephemeral virtual machines used for the purposes of CI/CD tasks. The resalloc package provides the client-side tooling. https://github.com/praiskup/resalloc resalloc src 2a3cbe504e377d89e4bbc3130a2d6eb528a29931ebdfdfc6e853a4bc4fb446e5 Resource allocator for expensive resources - client tooling The resalloc project aims to help with taking care of dynamically allocated resources, for example ephemeral virtual machines used for the purposes of CI/CD tasks. The resalloc package provides the client-side tooling. https://github.com/praiskup/resalloc resalloc-selinux noarch b29d919166938ad4531c24c04e57ed57f426b4f45761d8cd3a251159edef6b1d SELinux module for resalloc The resalloc project aims to help with taking care of dynamically allocated resources, for example ephemeral virtual machines used for the purposes of CI/CD tasks. https://github.com/praiskup/resalloc resalloc-server noarch 28e8d1cf0558b5ae30faef38e43195e3fadf02684504c5c76a3c1f623057feb9 Resource allocator for expensive resources - server part The resalloc project aims to help with taking care of dynamically allocated resources, for example ephemeral virtual machines used for the purposes of CI/CD tasks. The resalloc-server package provides the resalloc server, and some tooling for resalloc administrators. https://github.com/praiskup/resalloc resalloc-webui noarch 2b19ec54eda5e8f5834d8312cf92ee5da422e9e388812aaf39f0c90985e988ce Resource allocator for expensive resources - webui part The resalloc project aims to help with taking care of dynamically allocated resources, for example ephemeral virtual machines used for the purposes of CI/CD tasks. The resalloc-webui package provides the resalloc webui, it shows page with information about resalloc resources. https://github.com/praiskup/resalloc rpkg src 8d25d02db71ed087b7634d1a827283417bd154648848027f019ae65f13e4ad84 Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 25d9776a660fb8d6f28bff6f46a555a76d8a84b5e2fdb753faf04f85b082341f Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 9a49f9caa9223f9980250fb5090dc988644b4a9d0f8dcca61f1cdd75f28680ad Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src bcd54cbe6e026d467ae09fce3c48a3de0a00b239979300f14b6f575f2523d3e0 Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 6f8871d221b7f6fd2819e251554e38d4d1401d834101386f6dc8d100c01863a6 Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src ea43e85781c366a0a4649a26ae3138a77a8f64b0449ecb61a6992698f492ee1f Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 71aeb42806c703e6f253188a9946bcd3ba1e6e81c9d3ad67d334b703333123f1 Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg noarch 500f1826bd0e2733240fd86828b196182075c037b5ee8a3cb02a2754645a1e13 RPM packaging utility This is an RPM packaging utility that can work with both DistGit and standard Git repositories and handles packed directory content as well as unpacked one. https://pagure.io/rpkg-util.git rpkg noarch 9a4788aa03cafa17d9919d7a5b1628a1ee2ecab69ad23c9d03adb35065d3da8d RPM packaging utility This is an RPM packaging utility that can work with both DistGit and standard Git repositories and handles packed directory content as well as unpacked one. https://pagure.io/rpkg-util.git rpkg noarch 0cfff664d651817fb2996dc17bc89753f1b1407dcbf580f24b137bb2e36d4510 RPM packaging utility This is an RPM packaging utility that can work with both DistGit and standard Git repositories and handles packed directory content as well as unpacked one. https://pagure.io/rpkg-util.git rpkg-common noarch 0a622837f4fdde55be91b26b25360a3287d3e0de6a5e09def30ae8077537bd13 Common files for rpkg Common files for python2-rpkg and python3-rpkg. https://pagure.io/rpkg rpkg-common noarch 2d2077c20edc7ae0af0d11b5745c15599077f0183aa402d7cde0b43522b87bcd Common files for rpkg Common files for python2-rpkg and python3-rpkg. https://pagure.io/rpkg rpkg-common noarch dd59a72491d51fbf3b6dfe7f592e5f786ecc63fdea863389738a7a7acdd08bed Common files for rpkg Common files for python2-rpkg and python3-rpkg. https://pagure.io/rpkg rpkg-macros noarch 2e23f6894f658e796330e9e628dbcad907cf171c8f901394528d166cb8463f92 Set of preproc macros for rpkg utility Set of preproc macros to be used by rpkg utility. They are designed to dynamically generate certain parts of rpm spec files. You can use those macros also without rpkg by: $ cat <file_with_the_macros> | preproc -s /usr/lib/rpkg.macros.d/all.bash -e INPUT_PATH=<file_with_the_macros> INPUT_PATH env variable is passed to preproc to inform macros about the input file location. The variable is used to derive INPUT_DIR_PATH variable which rpkg macros use. If neither INPUT_PATH nor INPUT_DIR_PATH are specified, INPUT_PATH will stay empty and INPUT_DIR_PATH will default to '.' (the current working directory). Another option to experiment with the macros is to source /usr/lib/rpkg.macros.d/all.bash into your bash environment Then you can directly invoke the macros on your command-line as bash functions. See content in /usr/lib/rpkg.macros.d to discover available macros. Please, see man rpkg-macros for more information. https://pagure.io/rpkg-util.git rpkg-macros noarch 3d7a64dd036036589ab0ee63d683167def38f4e1a334847345e40e63ede576d6 Set of preproc macros for rpkg utility Set of preproc macros to be used by rpkg utility. They are designed to dynamically generate certain parts of rpm spec files. You can use those macros also without rpkg by: $ cat <file_with_the_macros> | preproc -s /usr/lib/rpkg.macros.d/all.bash -e INPUT_PATH=<file_with_the_macros> INPUT_PATH env variable is passed to preproc to inform macros about the input file location. The variable is used to derive INPUT_DIR_PATH variable which rpkg macros use. If neither INPUT_PATH nor INPUT_DIR_PATH are specified, INPUT_PATH will stay empty and INPUT_DIR_PATH will default to '.' (the current working directory). Another option to experiment with the macros is to source /usr/lib/rpkg.macros.d/all.bash into your bash environment Then you can directly invoke the macros on your command-line as bash functions. See content in /usr/lib/rpkg.macros.d to discover available macros. Please, see man rpkg-macros for more information. https://pagure.io/rpkg-util.git rpkg-macros src 04251f31c3847b72281e012bc4e5e6d4ab12a85ec16ce8c7e3896114322f58c2 Set of preproc macros for rpkg utility Set of preproc macros to be used by rpkg utility. They are designed to dynamically generate certain parts of rpm spec files. You can use those macros also without rpkg by: $ cat <file_with_the_macros> | preproc -s /usr/lib/rpkg.macros.d/all.bash -e INPUT_PATH=<file_with_the_macros> INPUT_PATH env variable is passed to preproc to inform macros about the input file location. The variable is used to derive INPUT_DIR_PATH variable which rpkg macros use. If neither INPUT_PATH nor INPUT_DIR_PATH are specified, INPUT_PATH will stay empty and INPUT_DIR_PATH will default to '.' (the current working directory). Another option to experiment with the macros is to source /usr/lib/rpkg.macros.d/all.bash into your bash environment Then you can directly invoke the macros on your command-line as bash functions. See content in /usr/lib/rpkg.macros.d to discover available macros. Please, see man rpkg-macros for more information. https://pagure.io/rpkg-util.git rpkg-macros src 89d5f371957ab760a8594b29722ac81f1cf47455ab5de2f7647cb9a5c7dcd0c9 Set of preproc macros for rpkg utility Set of preproc macros to be used by rpkg utility. They are designed to dynamically generate certain parts of rpm spec files. You can use those macros also without rpkg by: $ cat <file_with_the_macros> | preproc -s /usr/lib/rpkg.macros.d/all.bash -e INPUT_PATH=<file_with_the_macros> INPUT_PATH env variable is passed to preproc to inform macros about the input file location. The variable is used to derive INPUT_DIR_PATH variable which rpkg macros use. If neither INPUT_PATH nor INPUT_DIR_PATH are specified, INPUT_PATH will stay empty and INPUT_DIR_PATH will default to '.' (the current working directory). Another option to experiment with the macros is to source /usr/lib/rpkg.macros.d/all.bash into your bash environment Then you can directly invoke the macros on your command-line as bash functions. See content in /usr/lib/rpkg.macros.d to discover available macros. Please, see man rpkg-macros for more information. https://pagure.io/rpkg-util.git rpkg-util src 97d710078ad00d6d6dbdc6d5fe10aae6c69b2f70c2f7c8431f248100d6ea07cf RPM packaging utility This package contains the rpkg utility. We are putting the actual 'rpkg' package into a subpackage because there already exists package https://src.fedoraproject.org/rpms/rpkg. That package, however, does not actually produce rpkg rpm whereas rpkg-util does. https://pagure.io/rpkg-util.git rpkg-util src 724851447a3a103d1b54ee04e9460ba9b132856b994061a64348adcc362f14ec RPM packaging utility This package contains the rpkg utility. We are putting the actual 'rpkg' package into a subpackage because there already exists package https://src.fedoraproject.org/rpms/rpkg. That package, however, does not actually produce rpkg rpm whereas rpkg-util does. https://pagure.io/rpkg-util.git rpkg-util src 2c2034fda5baec56d55a5bffe862a8410eff87c4f0d44ba99b4d5ad23d5eaa22 RPM packaging utility This package contains the rpkg utility. We are putting the actual 'rpkg' package into a subpackage because there already exists package https://src.fedoraproject.org/rpms/rpkg. That package, however, does not actually produce rpkg rpm whereas rpkg-util does. https://pagure.io/rpkg-util.git rpkg-util src 9a2040668b4ab51a876b4bc3faba93c8684daf87d2b0d79e273214306913b5e1 RPM packaging utility This package contains the rpkg utility. We are putting the actual 'rpkg' package into a subpackage because there already exists package https://src.fedoraproject.org/rpms/rpkg. That package, however, does not actually produce rpkg rpm whereas rpkg-util does. https://pagure.io/rpkg-util.git rpkg-util src 8ebd92111a451e33a8e734ba853f436ac59e382fdef3faf0d982228dff222bf9 RPM packaging utility This package contains the rpkg utility. We are putting the actual 'rpkg' package into a subpackage because there already exists package https://src.fedoraproject.org/rpms/rpkg. That package, however, does not actually produce rpkg rpm whereas rpkg-util does. https://pagure.io/rpkg-util.git rpm-git-tag-sort src 51c13db462118700850d6476ee9b78119a0d9d17c467ba61ab4d6320819fce9c Sorts merged git annotated tags according to topology and rpm version sorting. Sorts git annotated tags of Name-Version-Release form according to topology (primary criterion) and rpm version sorting (secondary criterion). Outputs only merged tags (i.e. those that reachable from the current HEAD). https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort src f0b5f2b76576f47038549d5ed636be25380e2351a3f549e5200834ef7026ff22 Sorts merged git annotated tags according to topology and rpm version sorting. Sorts git annotated tags of Name-Version-Release form according to topology (primary criterion) and rpm version sorting (secondary criterion). Outputs only merged tags (i.e. those that reachable from the current HEAD). https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort src ed55a5f82ebbeefc72fe1c0be5969412ed6cac5bd16ffedda180bd07766e9e87 Sorts merged git annotated tags according to topology and rpm version sorting. Sorts git annotated tags of Name-Version-Release form according to topology (primary criterion) and rpm version sorting (secondary criterion). Outputs only merged tags (i.e. those that reachable from the current HEAD). https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort x86_64 254fda54d67017135adc4d22b642f0b1374a6543b1dabee49fff970414550904 Sorts merged git annotated tags according to topology and rpm version sorting. Sorts git annotated tags of Name-Version-Release form according to topology (primary criterion) and rpm version sorting (secondary criterion). Outputs only merged tags (i.e. those that reachable from the current HEAD). https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort x86_64 eb957dded0a1cba9e5b152cec858d76ad7778c7cca98fbcaf87061fc81530bba Sorts merged git annotated tags according to topology and rpm version sorting. Sorts git annotated tags of Name-Version-Release form according to topology (primary criterion) and rpm version sorting (secondary criterion). Outputs only merged tags (i.e. those that reachable from the current HEAD). https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort-debuginfo x86_64 a5cd9c019f2725df163953ac400a02ef198204241269ff93851168b3bfbf0b6d Debug information for package rpm-git-tag-sort This package provides debug information for package rpm-git-tag-sort. Debug information is useful when developing applications that use this package or when debugging this package. https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort-debuginfo x86_64 61b8f2b79830e657c0739e8199d35641a9161ce112c915be8adbf676b26bb7f3 Debug information for package rpm-git-tag-sort This package provides debug information for package rpm-git-tag-sort. Debug information is useful when developing applications that use this package or when debugging this package. https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort-debugsource x86_64 a9f457920f6218de3ad39d4c27101224ec3d9bdc82230678300c190a7871f0b3 Debug sources for package rpm-git-tag-sort This package provides debug sources for package rpm-git-tag-sort. Debug sources are useful when developing applications that use this package or when debugging this package. https://pagure.io/rpm-git-tag-sort rpm-git-tag-sort-debugsource x86_64 af9729aab6b9d66940bdbe4cc5e7cd1d7c8f60fbb053c042aae46a3910b43c1e Debug sources for package rpm-git-tag-sort This package provides debug sources for package rpm-git-tag-sort. Debug sources are useful when developing applications that use this package or when debugging this package. https://pagure.io/rpm-git-tag-sort rpmautospec noarch c7a6b95e2030489bcf1d7f4d2bbbbb3f5a91730e7d40b43e094b55a3e67608e9 CLI tool for generating RPM releases and changelogs CLI tool for generating RPM releases and changelogs https://pagure.io/fedora-infra/rpmautospec rpmautospec noarch 46d29d04fd927cd5bb866519a6b95df7a0ce7ba8e8ce85b31aff391291064339 CLI tool for generating RPM releases and changelogs CLI tool for generating RPM releases and changelogs https://pagure.io/fedora-infra/rpmautospec rpmautospec-rpm-macros noarch f4c9b3c2a471015ec25493079c6d282a89993ec23066e06ce246e2e70b6c822d Rpmautospec RPM macros for local rpmbuild RPM macros with placeholders for building rpmautospec enabled packages localy https://pagure.io/fedora-infra/rpmautospec rpmautospec-rpm-macros noarch 11ada918724a507e427f21e781470f65c89500a6065baf576cadd2ae3c9ba4d7 Rpmautospec RPM macros for local rpmbuild RPM macros with placeholders for building rpmautospec enabled packages localy https://pagure.io/fedora-infra/rpmautospec tini src f062812369d44427b781842334df5187cba3249c3cc2ede4f6dffeb831ca927e A tiny but valid init for containers Tini is the simplest init you could think of. All Tini does is spawn a single child (Tini is meant to be run in a container), and wait for it to exit all the while reaping zombies and performing signal forwarding. https://github.com/krallin/tini tini x86_64 d3f4f64a9a66acb55c9c32aa4c9a489e173d509a7f8c38a1025deb9f592f9c08 A tiny but valid init for containers Tini is the simplest init you could think of. All Tini does is spawn a single child (Tini is meant to be run in a container), and wait for it to exit all the while reaping zombies and performing signal forwarding. https://github.com/krallin/tini tini-debuginfo x86_64 39d38618b090805e6f045f4b5e48741f612abeedbf9aa6b8159c556741dc4830 Debug information for package tini This package provides debug information for package tini. Debug information is useful when developing applications that use this package or when debugging this package. https://github.com/krallin/tini tini-debugsource x86_64 921ce8194e9727ef43fd0f621004017719a27901ee56a6248b183da4bf22ab4f Debug sources for package tini This package provides debug sources for package tini. Debug sources are useful when developing applications that use this package or when debugging this package. https://github.com/krallin/tini tini-static x86_64 2ccf0b4b5c408775ef669ecd850f83d3e61746c3004c48c3496a48baa986f957 Standalone static build of tini This package contains a standalone static build of tini, meant to be used inside a container. https://github.com/krallin/tini tito noarch b4e40eb4dbad42290cf74a67a7802ea5e6c29ca7a90a7c18aec62806793f591f A tool for managing rpm based git projects Tito is a tool for managing tarballs, rpms, and builds for projects using git. https://github.com/rpm-software-management/tito tito src 1b896a9873185fdf00f30dce1df58e79d0875f6bd3512cef85d5a9c19ff45bed A tool for managing rpm based git projects Tito is a tool for managing tarballs, rpms, and builds for projects using git. https://github.com/rpm-software-management/tito