copr-backend src 1a0b7d30fa384a2908886d423187dcb79aeae1c70565b669310522c2c1be5f49 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 f143c6081f1c63bdfef033a88f42fa81b2c3f64fa0f00477345b3c2822dcae98 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 e866065287602ab1913b9fd0105099bc33e6961fbf254500945bea5e61d56616 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 a7556c137147cf078c0161c1eb9fe5edbf91c26a7f2eedc19710282c8a8b92c2 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 036c6358c5b1f436496097212265996c88b084439a0cc41f56896dbaa58ecbce 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 825fc389b3b08e638573193deb2d03dbfc38e0c49175ef2544a2b7756af45dec 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 a72dc87c929ef7dab68b7d8203a679eec3ef16376cbc29b74c7045aae8e90d0f 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 36d703d5d7a808229b7673f8c9fdd43ceb7b20c3c652b70b0938fd220499dbd7 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 a9b1e5271a84f8f17b9cde0bb665af9afe8a9704b256585dc2279e23845bfbe9 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 a4277be693dbeb8cddae38ec9c26a400fcfb1231f839041f6d0c6e5adccafce0 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 f90214ef9405d2381de52fbd29a5cbe2cb86f4a35370d87064da9da993db9261 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 6777a3bb0659f6325e0a756f8397692daec8b9099ae96af4ccf189109c2a4bbc 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 e9041768b23b402f439b513f381b553fbfa6bc8254dcee281c58e1182ae5a7e5 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 137d303214649fa09a50c7bb446b278de46bf43cd4b025d85c85ec441e125ac5 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 81ad9dd4d7036c5e02a04a53cfb510145ddc022f60be5753ce6d91b20f72dbcc 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 7da331dbf8d90fc08cf099585d81cb08f0550841032d17e75086e84a153de798 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 27b51886552dc86f89dcf6be061a578df45b0f9f32d3491ee6aa837737154e55 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 5a597b15e1a9b7f7aeb844f27dda0f55ac9c13b9f6a30208eb6c1b0045b55ef8 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 ad1d1b35a304e0de9861f6d147a2bcf86ea798d8840db23906ce89570d176919 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 865b59d4865bb89898604849e225a8462a57dcf6d5394c9c0c1358e1d3566a00 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 530dbaffd50cf3ab9a3529a74c746bd7de51009cfe95e9b2797c8967876ca0bd 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 da0a667ee8972fd3e6efb7da0f0a173e02bd123f13a335fb19fc5cc19dcf8c40 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 9c828c6b2d91c1206c774189c23fae983bf21812c5e0673b2c53c3865710241b 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 283090067309af98e72fa4631862dd243864de026532a0dcec50092751b69945 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 e96c47091bed94f5c8470de8644e4e2a19bcc6a9113e04b61c193fab674040bb 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 90c8ba0625556142f23c9031b13022ccbef84ba4d6d8d44412c0eb8b6bd90850 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 79fea52f2b0e71c7f71cc137e4edf0b207a5fcc188660e48f5482209e34f8f83 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 f7548f90df2962456b7117b76d8fed287240018669d3440dd9783800b6e47ecd 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 ce97633c6e3d213814ff09302e01d9f4a2a67749bba380d3f10db285e289532b 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 6e7dc8df3b5026fcf15366d813b355ee4b3ceb1512fec1ebff27c7f3b7780d10 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 8e4eaee34d463de09298777f549b696871e123c14d50bdb1607b53966e0a5b24 GPG keys for Copr projects GPG keys used by Copr projects. https://github.com/xsuchy/distribution-gpg-keys js-jquery-ui noarch 3b90b0b8b02ed0d73c96a164c8bda50b64945ee1704ee8e5ea19479c02125b42 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 de4fca06d27c44e6bb6d39c86673263de5348f4ed2f2b948d106ea4a6cdf99e4 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 cbab276e0c46398b04712fc2b613b18462ee327b8034c6e343292acfcb3ad039 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 3d1aba8c5a4481617b1f4b2bb5c457eea4840bde37d8a946385d6751fcda9d47 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 e03f19bbde3c9be00ee120a58482be2dd5bfd819eb10b5202580152b4c566634 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 3880c3f0aaf706f2ad40ef6176baa56387433ba76407cf055d25a241c4f721b1 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 6c838cbf364c265748a6d266d26690725d601343eea64b3eb2115426545e5d2c 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 499830deb1e15156aa1c6d31fb967fcca28240c58de01cc75799cced8c22b242 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 1a96619f212159cb4402a28cb6a295d6f35f4d28e0e4de6cfe4e10436d468de8 Builds packages inside chroots Mock takes an SRPM and builds it in a chroot. https://github.com/rpm-software-management/mock/ mock src eb459a7b5faf47078f9bdab1171c91d1b7b42bb5c865651442b109a61b577f5a 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 06f655668554ce3b43c37400015ed2220ded09a745f6f9c0e1d6cd501dd9739b 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 bec50624a44c20c8d78a39db48e3b62d081e7bed0e22de0f61fdcca25028b337 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 01eacccb87993373d2c6c1192a8b99fef10f87489ee780aec63122cbea037f0b 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 a861d98e6eab44361c0de3f61a06309af7271a9716c9fbd07b3569615c6e8248 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 6c056ee21e5dd05a6b140ba89c724dbf40fd9d12f1394837decca0c51c6b54c9 Mock filesystem layout Filesystem layout and group for Mock. https://github.com/rpm-software-management/mock/ mock-lvm noarch 84bdaa156e84bb10da126a51818b9d1e6ed1953f1fc4c1b7c295f53dd7e10c16 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 69fb6b56d2b932e4e8bf1aead5a0b794d2647dd0e19bf14c3d20b3073b3f5c65 Mock SCM integration module Mock SCM integration module. https://github.com/rpm-software-management/mock/ modulemd-tools noarch 9de5db4f67a145858edb7bd411450cee3309dcade0b7909cc6bd7edca2f654f4 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 abcfacc99e248790ee06a52e445158e923b5d46ced795eb346179472fa67577a 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 d63f2cddf9ae3a870e696c535ae066b159dcb2aedc42cfe6f4dd2d5598feef18 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 da1e1fe7f17ca1f5f32700e3d8587f04d1b234f396b23652ff1bf1afd8f3829e 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 c2bcdba1a0ee831f18bc4b7398d6b9ec2bd8d0dadac8b3262793666a7af53b11 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 29bf977419dbb5846777737f853a6875ed458ed2b400dfc93b0561d422433855 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 ffb1dc5a8abc6f6e311461425e9229f1d316d70fa36d97209e22fee6a9a65afa 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 a400258102e5f434dbe4116994c44a67680e91ba6fb066aa50896caf6fa113b0 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 ab35640f3c5abd69b1a15fa69bbc560c18fb2af7b03854a1bd4e8a7a6c11a39e 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 9e0736b5be03883ef70d89d4aee5c367698de520a8b1434e8f28265162c2fce8 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 ead7ec30671b95108a731d28c6e6faee3cc293623c53eeae76ac050c26141e81 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 879e8a842dbe883d58a32c58a71a7a92fbe63b7ab45717d3440419ce1c98e047 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 9245785bede273cd362478c0c3443574ca21ea4388f17c804c649513468db600 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 f7bc67d3797d1dcc50ac0c1832527f153c79a9f25af58e2284b4bfb09567ecc7 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 823f5d5a1e3b5a16f8e1f29a80eee2e8ac63b99c0603a58e57682620c12264a1 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 4e64d70f11724e4b2354860f9ef73e9bd16f7c3fee0f7ff7e91c7c12144bde0a 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 ff5d074e39730c9f912d17b4c6cfb72abc71e71eaf71607611353a8b70cb9de2 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 904ef003c2feb0b9ac03d2da71b8779b08198a7c5a9ea8e3aa165d203a05730f 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 596c0d0f7326c8ab3fbdc18e53f16e36249602f6080299a1b9399f9bb0d8dce4 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 47ae23a3ae496d4d3c0b2ee5046cc3f8ebc9702a30024446d71e232e056733ba 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 09988d5acee6a2e8156c0ca6546626507caab290922ad22c4dabbed4dd41e5df 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 1f8572e6991ccdedfe02511d942cd33c1cedb87284361627acb3e973e163afdb 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 38702c4c85e2c999fed3e22c844a1aec0a226db0894ad8c1f8d023469f461f55 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 f4262148de957f6b3d00db8eb183e67f87bd9dc1a0921de667e4ea3c256b6f27 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 16b8e4174d757829552a2ff9b30acce3373e2020e77f7bc2fbd20136067665d3 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 30c868603f0076131cc33d82236e1167098ca434fe5ea509426f2fc2ad62d0ca 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 f326e8beb2b02ac4fc21eb72986ff80b18d9c6a9ad9d678b82576e8d81789d46 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 76d30349043391c73bd3a2ef35ec92eaef3463a54efd89203ee5db7818db43c9 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 bb4654e83638650e0be1341c243850abdd5d0d375cf5726b4d824f0149068db9 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 27e3c0ba79369af574de205f466b5913953c0af665b2a29890dbeb30942fc607 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 53b057dbfd14c967a746c8b877f1035e45bfe9c87f3cc575c848132a165292c6 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 a2fb3d9da6d67f98e0fa0e7ded285f6f5e096a58aded46d3feaec37def0d9d26 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 904b5694ebbc818848fd0a6b5c2c7b9ed2583f68166780c7df14a883128dadbc 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 bf6b35fdeec8496bb18033f9b88577e91174cec7f0d546eb2fd4dacd6235b187 Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python-CCColUtils src 1170874516ee8249534d59788f20b33c6cc0c705aab4c471bf0b9a2bb057d3d3 Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python-CCColUtils-debuginfo x86_64 62fe96c6d94c84912eba9f25103292664e3e6ac66af0da668e14c5a5b2047f8c 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 4bf814a37dc2c0f110041813187b6cf8d905e3f46642b7667e99397409838f2f 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 bea0011caf91af1e0bb59bc840e5e82e2be805044ca832ec808963508c0190ed 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 f84f6ef0a9989c147350f364b1022619bf14e2f3df8b5f28d2e78eae23cf9eb3 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 48d6ee2088e1b8dd5b81122406a9be95025cbbb3bd98b0040e042bb7a7f98dd2 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 64e8814cf2efc2e91927144c1c6f38a0989f311dfd28ad5f80cb3e6a9d4f2765 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 22bd717abd5bb79970eabb42015b00017384d8e4f8f4b6c973029abca2916dd7 OpenID support for Flask Flask-OpenID adds openid support to flask applications http://github.com/mitsuhiko/flask-openid/ python-Flask-OpenID-help noarch 04b4f5d7877b049c3c03371552945d00c5a9a826ee9c94c88c908fa9b060f8d7 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 5db0389a695a226f594ccc914b6c48e621baf6f0b27709b4deb5af4d4e3d212c 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 aed2a59ecc1670097169af5cf71529a965727ebd5fd1e445817fd095101fd605 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 05a9a6964d6b0e4a1012f9feccebcd8f707b7b064d25bae2ca7bf5b3c113742e 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 7173a70de2f2fa1ef6993f17ee3f56190d69ed8c080751ca34697a5769f46bdc 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 9f7c34aebfd9b30e1b17e3939ba68ed574a11d0985dcf9e533a6f2196482c463 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 73baf2f1baf19387e78fc126359cd8818ea127528e5593c4f9e6980d33d26875 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 ea55b32208fb6d4171d89b59f00d1766d6c2ff107f446e27b19763e6fd4021b0 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 505daabc2d8630f8b39adba594963b28624986d9109a003e907f3ab181e4810e 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 95aaf6b657e6d06911c6b3414ee23323df521a5e42e139ac32ee536d1c609d20 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 3eed94e0b0b467ec2e95012a4a04cdde45f6cea67211d22ddf58aa131a030472 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 f0151361b64c0d856544edd413e264884a5dc5b8626a9ecd2a88dda4bfc710bf Build manual page from python's ArgumentParser object. Automatically build manpage from argparse https://github.com/praiskup/argparse-manpage python-argparse-manpage-help noarch f7e09f5b3872529682dd2cdb84b3139d8278de7effc00db6ca359ebdbd5e06a6 Development documents and examples for argparse-manpage Automatically build manpage from argparse https://github.com/praiskup/argparse-manpage python-asttokens src 6642833973fe1f0e72783fddbce2588661e3847676ca09041b2ed5dceedd3223 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 45a53c31fd38d1b1f590dfe2c53d9bdc7bc995c6a27795d4b0347be24f964155 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 a687459d9d0816136c3c3893377af52407faa90194e91d71b824c2c069c66f01 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 6fc08affad4a84b09ab4530b836288f255f4315e6d19260506ccfa23452cf8c1 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 636790095268e081feb0e2d026e5c47069ed9a4521ab5b61f6ef179122d63424 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 53316c1179967f4810296d6ab7da5c1d6b10260c789783c72fb087e75dabba8c 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 dfe235ee500fcc285a946ffb1a4111e9ad19a874b728a29009cb638ba00f4567 Development documents and examples for cachelib Development documents and examples for cachelib https://github.com/pallets-eco/cachelib python-copr src 9b402d04f00ad16b6fdbc7d7a834701fd4d3f68ccbddd3f6d63f5c1d7862c545 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 433c4a2aa8f022284d782c6520d1cdd5d9bdc261e1abe3ac30f7dd48b854533d 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 34d2aab7d9a18330efed8454e9313b8593b4801cc431345d60dc31390286853e 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 4bd756fa769d0bdcc8b8bb6df108d04961f7f1f593be275eb94ed8284df0fd6c 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 35e286e375408aae4f1478d47c989350d17a4c61c817d49c7f73e3c2d4f9b7a3 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 93b1dae6756c5bff8f660b962ac6657f75caf23c4fe0de41bdc7fe2c307a56d7 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 8f3eb65bb472d11c71cb49df9b463fb7fe79f2e6d758c307b6f42f5f50cddea9 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 bf4b2cc0dddf014738bf516b67735e41baa9717873c4c4cf7e6627bef175af6d A utility for manipulating ini files crudini A utility for manipulating ini files http://github.com/pixelb/crudini python-crudini-help noarch 4911fdde72160d899699395ee0378c282a6867cf3220b6f3cdff0ed9ac6f22a9 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 cf6ef3106a9bbad20e689b4df97dcbc05764104d21953757d705ffdba383aa2c 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 40873ede0cb390fa32df508b054958d5d4a8794d73cc0f666cb7267fabf7c7c0 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 fb5536f0be4b16e7dfe30fe9d78b690d5951c29cc2d9dba08f8f3b290b23b59b 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 c3366939e200e4669b180c19d0033706d3267a0c6679b059bd384e95accd8e2e 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 c25e44e3a243cc46fadc59487331608005f3bcfa5b936dd2140c7a3adbdb01d6 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 6602dac4d73ce8e511cc094ea53e535d41c01438253d764814238831b2288ec7 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 96b92c427eac7b21193b0fe150b9ce916e12424793d2ecad655f76717434e54e 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 87fad3f42a75a03de3600b3734c9d61a5668149b31d3c5e8574fa811fb43e76f 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 8f8885e867eeeeff3b6afdbaf205221766df303c9e2629b22f21bebbb91a54d8 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 9d9cbd6e910091ad3ac0ef9cff34ed2d52387826528e2c82e5164f224a61ca58 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 f5ae545c5558a8a1d541b0eeafdf97346fdad52756683d85ecacb2128c5d1740 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 91cff970ed7ca1e4a348de1e61811dc7c928fbcddf4ff01a84e272e4b468da0e 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 e86209a5ccc25a8d7a7bdcafdadf381c4f983dd53b0cbbff315de81daca96fa1 Flask-SQLAlchemy - Whoosh Integration Customizable Flask - SQLAlchemy - Whoosh integration https://github.com/bkabrda/flask-whooshee python-flask-whooshee-help noarch 076844fd7a18acfabae6f5f4ec60fb7740b9ef1044ce25f201983f3abce4f69b Development documents and examples for flask-whooshee Customizable Flask - SQLAlchemy - Whoosh integration https://github.com/bkabrda/flask-whooshee python-html2text src e6a44e48d879c7c31920e942f24f7d0b2d1faf07ae66b397d54fcfd4f03cc408 Turn HTML into equivalent Markdown-structured text. Convert HTML to Markdown-formatted text. https://github.com/Alir3z4/html2text/ python-html2text-help noarch bfd050161ecb431321f4219ddd6460466976ae9600691787f7f32994cd292fe5 Development documents and examples for html2text Convert HTML to Markdown-formatted text. https://github.com/Alir3z4/html2text/ python-html5-parser src f4a9674801fc626495187c99d0b91b3682210877b8d974c141e1130df66479d6 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 0ab15da5ce6a282af9bddf56331f7da7fc5d1213d1cc1f32ee177adf26c4c510 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 ca93a552912f4e1fbed6aea7f628e303d3ee5f41c75bb47c9d5ad6e0f6b09500 Fast C based HTML 5 parsing for python https://html5-parser.readthedocs.io python-html5-parser-debuginfo x86_64 1f9730322999f444f75cb5c07a31cc7fc2445cd3b177f5e49e212222ddf42f98 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 dc02a56859ab5b42531ee82ccd2121fa0baa8c2aaad722e66d3ba54a827c1ce4 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 fb561496d70c56e4e1d7b5e7b63851c65bc58fb0e94d36ed4babd91338888de9 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 dbbda36463588d3437c6a2b5381a0fdc2962a6e978762e1d0bf4c1ad5f485f06 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 27765026b490edd6440f0e06b5af9389d70c2035b5c971fe7344f57bd6be920f IPython-enabled pdb https://github.com/gotcha/ipdb python-ipdb-help noarch 2ed88bfb8c431ecd14afd9ad710ab2d222324568817ed49f96071bc26f7e9a13 Development documents and examples for ipdb https://github.com/gotcha/ipdb python-ipython src 678ac39b780a539981d7d6d014fcbedaa14d2575bb91f25c7415f4c251cd293d 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 e3e8ec02286cf02a201ce1c129f3c7e495336079d9d3ca9e7c98257c970a7f0d 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 91e456fb1a17ee81e69462f02b0f8bb43d8bbf0624dde192b3f35522ceda5b48 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 dfbb8ec18a8bf62485aca5675bceadd8985ade0b08f8c74ba9c29a6766c51077 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 c19fdc1aadb98819d9a9e873e68e6f8fafe4be5ed7fecfe28426867c9ce17394 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 296bde953e4e8584c620c68c00ef9b7202398cf4422465d251be3a6d0141e5c5 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 2f2dfa75fb729cf474369fd77a6cfec19dcc2035c5cc007320958f307849dc3b 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 555564a9aa74d581374319567b9f8ded3626fd244cb9024981e90dfc0a867b71 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 3ab3ccddcb354704af0b96c30083790c9629ea7f88f0743d8ae2288146733e83 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 5070acb0fc148c0aa0b7b2e1fbc1bd1d0af6a61f19bcc9f163107b51b2163367 Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python-littleutils src cf358a305524952cd8c3f7e5de1b217a7712e46154103932d62edb2231b6270a Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python-matplotlib-inline src de219083e83635a2c146ce8ce8bbf6f5fc823505acdbc26b10bc0461705aea90 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 9782d0a39b3f67ebcae75079811cdcf59cc09c13cfe91ba3d8598ec36eafd1df 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 647dac12712a05d4cde15fe6b5b4dd3df857834cbb7d10e5fa77ff830a7e410b 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 5dc25009c8ee3cf4bc0079b46a32db96f6a7f83e450314f3475edf474da240e2 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 7a172af9202aad9e99de9422f40b68f2cb292cd52aee8f562a756c32e1e91b1f 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 206e5a4e53b5f9dee6f17aef2f304c3185355de48842f59dc34de53764620f67 Development documents and examples for python-openid-teams UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python-openid-teams-help noarch dd4655d766811326ab27cf63cdffdf242b043ddd5077cbefebc28009b0d6fb86 Development documents and examples for python-openid-teams UNKNOWN http://www.github.com/puiterwijk/python-openid-teams/ python-openidc-client src 9adbf8219118041b86a454525c5658a80b5387a1f43678a09a3fbdab0d4a962b Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python-openidc-client src 9e56a31937fd75f683f20e93a36bd88869e99c050e20221faf0a4a999a32987a Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python-os-service-types src d6f6054dd3edeb15081995caa50fd6c2d2859d88b63b5c2cdcc222581c7ffefe 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 cda3b7ed19eff3837c3205c2542e19ae169345b5feb96d24a858ec681dd84b72 Development documents and examples for os-service-types https://pypi.org/project/os-service-types/ python-oslo-concurrency src 1e2d0b6afd847755f25c95516e07d49f9974378535f1e0cfe0089988c574cd5a Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python-oslo-concurrency src 84a56746f4f83e5797e5b7bc9c02fbe9c9e209f87e3ef7c1b3de1b78d140109b Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python-oslo-concurrency-help noarch 60e545cd2e4da99a91149bc4a37ebebfafad15dc363641dc38422927563e66eb Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python-oslo-config src 35ca5e1ef7520384842c1dd81627ac6894e94d8f9fec1ba3e864433e5de283db 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 ba76be774e32ba6bbe56bb6db888b2273937c6c9dcac02bc61bdda5ab92f56c7 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 a3156715ac44a1859e39d58030d821946e1d2bf605f9585f24e9478fa3e396f1 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 7c023c3520fe52736dcdd397606e574ac8ad07fc6635fa9e5298375c4806dfac 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 dc625b5693447ef49429d213552690d06e61ba25c7b513dd7145e6c502518a56 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-i18n src 150ba34f27a229b4e04a7a6a6117b7817cc48de236ef775cc2e776e84751162e Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-i18n-help noarch 3bd1c5e59b329e760932869a32d71bbf825fc88d1bb0021149b5629b98c439b6 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-i18n-help noarch 4d5a6bee6f1d14aebf2065e87340ad36cbc6503fdd8137122e805ed4ab6bdc4c Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python-oslo-serialization src 35d45373afe1c1718ce9741b070cc6c8b9c231d4f6bf2730567fc8962e5438b5 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 38eec19d94c43a23b503cb803b5a7c471032a43b0a612911cb3815cc3be87625 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 5d88cdd6d06adc22eecf9c01e1f6e689b19e624d9c24bf65cf126f4d666966f9 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 e9bcf23f0654912a474afe7a6fcc0f45c94edbb4524c01d9205c1f9b01fe3682 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 9de3c5837b097b2a31d53a0ee18a6a514edc2ccc3c87dddc38c0594f2b455705 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 89fb73c543be88baf74b20858290a788b1a4d9a4299d4f0836953a621834b10f 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 670e827053b3a30ec16cb045f1d8afae15aa14a4b1c5ef229179356bc430803e 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 d6405d60af01d6ac59c6f8d8812f20aa26b118968f30f5113ea1948f54424f9a 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 83450a656588407b2875dce6ba6384010017cb34ef39680c5739304f4435b421 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 eeeaa9902381ff2a01974c5ebfded6286b44378eeaa04325e15d5182d1410e8c 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 57ad3239004e751954ef82de14650d369aa4ada33d418e94d6071a533ef43930 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 e8edcf2c0d6c669954b895e7fffd61a2c020c25dacbc3458fa0f55b804d25ef0 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 7c4c025ae902f8ac1ebcb2284eefc8a2275777b60f0a4e7e26015c878986b2ec 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 e8df6f5328ba94b6cb35fc30bce4942040fe27f4b5ab6093031af8434a7e4f4c 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 26c315aa261857be1e1a8c4a5216f2daa6aab75f96885c9d822dfe0e4a83747c 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 9cb384777acaafa9897a00488f1866a8a451f236a8699a447001cf3849e5481f 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 b5ce1fd2bdb318eb5967d07edd20920557903f08ce7b8dce5f7738cf36f0b196 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 a6ffe3a436edc591da7aee303d31d84fcc6bbdd5805f30818326e14c9e94f589 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 4433436469cc826a82c2be5d9388e35043125fb526769a55fc93a657bceafc0b 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 e6723529ca2d04269682894b9ec250f1641473e90f4f887a7c77f0f17a6c2cb7 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 f02e8e8e77552c0d0623204b9df4078d40903a3b5886c9f26365bdda7f3e39b6 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 07cc56ddc1203d462a6394563770e7e2c18c6aae44ad30d5b5fe39d7e0276569 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 2800bdfab5d5b720dbe33b302451403c08977d6871e9da2b481db66557739661 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 abde532aae49c831461260caa4dfb8bb758b814ea61a548c5ae5a3ceb5ef6739 Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python-py3dns src b97026c49115232118e8a56ccaa54e38585be7d20ace55bffcf68a7a1a4b2f9e Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python-py3dns-help noarch aba16eafabdb28a71afba663d0e106e62ba6a39ce670de4387136e42c69126eb Development documents and examples for py3dns Python 3 DNS library: https://launchpad.net/py3dns python-py3dns-help noarch 73ef5728590da9cf5547a42f8a49b9b835332816fea7ac52d0cfc513d170d725 Development documents and examples for py3dns Python 3 DNS library: https://launchpad.net/py3dns python-pyLibravatar src 9f17934eb4e3612831f65134b83b77613812f6139ec12bf3eb33eca80a4ca77f 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 78c9bfdf4e1116cb5e4604ad8e94439ad5787542296246d59b493d55a710d58e 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 d0ec7c784366bc571d0b4f4bd6535bf45b54e63d76172dcd232a0e6bdffa5e76 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 c0c3a767dc749be5bd103d79060c52817627ddadc8d1e7e3f8f145a39a6b782f 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 3e8ff12cb253bf3464999d53511b91a509501a3349467bae52af0c96df384199 A Python svg graph plotting library A Python svg graph plotting library. https://www.pygal.org/ python-pygal src b37cd580c9ca8bcd537123aca433859e40b11324e44445d0eca9b189dc268ccb A Python svg graph plotting library A Python svg graph plotting library. https://www.pygal.org/ python-pygal-help noarch a61f39a723f5856bb70bf6405c4235bb5d43538179e2f93b373611484f4ee9be Development documents and examples for pygal https://www.pygal.org/ python-pygal-help noarch 01acf4adab253a079182c7917a5ba0c5b6c560631675adcb13767cbcf6a5a352 Development documents and examples for pygal https://www.pygal.org/ python-pygit2 src c82489a96a6ba7854139d666ceb31ba0c100839160a5ef66dc432c0177dbe4d1 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 bccd3087f7f49d56843d3f9ece1f124ffe711c04add34609601d5ddcb36ffbdc 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 9d042cd3ded6a75375b3bea004bdd60eea31ac96ab07d64762ad65df50e7bf2b 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 e4a7feeeb844328029ef6aa5b664bed47d5de69ef679bbc7904449d82cd19516 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 1f136772e91776cd3fac232b05a778b09dea56cf6a7c959e9f5a55ef95c642a9 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 eed291ab62021df20f116dc23fdc98b24fcaa3b6a011ad5c7dbf3db86424fad9 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 e77bf6b3fd157a00a26a2f18f15c96409ba5621f603f8538d7f220ed68a697a4 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 2db7467ae7a2a34fa381bcea42541182e0d41816e844adbd3ec3cb7d89dfe9a4 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 f5bb6a9a60fafbbbc116939f74422051c2b9a3ac74a0639471f8aed7641aa0e4 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 f3826ceca20fa0a8e4bffb3c343da23ea11459d71e9a54448526bf8ed0f7b27f 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 25c190989de0bddeaaec3d1c149c4957dd710fbf582cd9207bcd462771c8e080 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 a2922d21d9f114411cef2b45e7f068d3d512c9b73c4124d132c3eb345f911da7 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 108b509e0a8a137181c0e9ec1727c85b6bb3ae1104a3c232f3211efe7766856d 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 d3d3bb505f830ff46c9532d99b39769474a3573a4a9454f698cbdb5c0632fe4e 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 802469cd96e9973733c1f23d9724d938f86bd696948e2000c0d27509d44499a2 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 68224e4547f4f82a9240c222b96ef87333020fab6a57bcae1ad6a3498b21ada0 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 92281c631c4afa40f3aa6ebf806df24087de8dbc01fff6a7ba81b6f1962b260c 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 948120113b22d9b947dac2d29590c268e84bed04bd3419101fa8293ce8075546 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 5e537222e668cb75f43efc29b8c3584a0feb6ba567e97648d6549250cd4a7248 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 c197cce6f14924ab8661848007f5a29a50604d06a913ea5d5d891414b9194245 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 fa52057c44ad422178dacb03a8d45a8984f17e22c5098fdfe5065902d32771b0 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 67ba13a32f490c9a71c3a0bdf3a2eb9c6fb3cd96d9ac86c7b73d5ddfc7151ec1 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 d3531c0c4b1739a832a653a953f7cec00b128a47e047d0e95257d709359d6be6 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 ee2cf889856c6e74392d64b2bf35b7cbd081f818cd67be093f72aa2bdfb32e8d 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 bed0c727e68b40e30f56bc8391d0999cc9e5f00d4c3f9c6506477406d62dfb18 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 fbfddf971da3eb53b2b8f95868c3c362e9480f8edb0dc1f8f53c16a32e0c3e7c Dictionary with Jinja2 expansion Dictionary where __getitem__() is run through Jinja2 template. https://github.com/xsuchy/templated-dictionary python-templated-dictionary-help noarch 25d562eb666c33e21f4e40ab49a8d8ae7b04d531b94bd9934c345075b169c531 Development documents and examples for templated-dictionary Dictionary where __getitem__() is run through Jinja2 template. https://github.com/xsuchy/templated-dictionary python3-Authlib noarch 1709539342486e75bcda9d1312bbae7885a6287921e4c4d15e905e831994a5cf 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 02384c6df4c129676de97a56ecf48451eb6703c4556b8ce1efb9cd2a86dc3e1e Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python3-CCColUtils x86_64 e967a679b4c6df921e3df6402bb1a69261957c9791054963ff18f3a2b1a7db25 Kerberos5 Credential Cache Collection Utilities Kerberos5 Credential Cache Collection Utilities. https://pagure.io/cccolutils python3-Flask-Caching noarch 95a45cfc81c50078e516153b85a82654a947d2d07a9af57da932ba6080653977 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 2ff15712ecb90de297795cccaedcfbdbc128b90cac2fc0bf8bbc1f71b536cd91 OpenID support for Flask Flask-OpenID adds openid support to flask applications http://github.com/mitsuhiko/flask-openid/ python3-Flask-WTF noarch 254f74fe15073f5a3521f5749464cef82b3ac8b08a7e30899cfb22f77b9ffdab 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 2373a292ead2ce2798e7823d37dbd0cec9a748ef26f26f4fd1d27d84ce798768 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 46e9671ba92b021e7f32766102ac9a6051f6fb8f65139daa03c932cc804b1cd7 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 fa17bc663864c22d1d02b1ccfb129fa89188b1df629a97d78ffa41aaf6f67533 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 73e0daa0cca6a33d07425d1504cc16973478d06a96782a8b45071a838d27dcd5 Build manual page from python's ArgumentParser object. Automatically build manpage from argparse https://github.com/praiskup/argparse-manpage python3-asttokens noarch c25dd725b1e21783e0c3e6e77e985a700959d8abad27ca6d57acac2e9c1dc160 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 ff725232c0b471b36ed4103103227f59ca972204555a14e3711308a4d4025909 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 a36cf9935d31a72809ad6fdd8d884e9d735e8cdbb710941eeb7dc86003a3423c 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 08f646e891897df6803b8b5948aff07d4c4f0adfa02c12db1f3273f25aabee4c 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 3dbbb28630ce539884d44128b5f8837d8430a92bc3b38fa3bb624e94001d1ee9 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 85b4165b39d7be94b5cfdd7b18a6ab1d72afe03f23d09ab1d0e91a117970320a 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 e632b258059c912c5ec23a4d9562922f02d3cdf11bc5380fb64acd6c2e36f93d A utility for manipulating ini files crudini A utility for manipulating ini files http://github.com/pixelb/crudini python3-debtcollector noarch c6bed97bda4796aa41a46441c1e3ba8e95b2425addc4467451cc5518cfad6fe2 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 10616812ebdcd920427b48632a20892cb5a79830980770a5bb349937c7bed118 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 e6dd221f9d17a071d48e2121786b4d9abf7e4c311cbb78b33185ceb33a8f5a0f 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 6fce725f8adb1db480669b071154c20c01d289040b6d0140e7ab631c1e4388ce 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 f86e74113e069137f6e95f50d7cd82f73ef8a6ad71c3e3e32da4a2710bb69edd Flask-SQLAlchemy - Whoosh Integration Customizable Flask - SQLAlchemy - Whoosh integration https://github.com/bkabrda/flask-whooshee python3-html2text noarch b983f44ae4cbf0bee26d600573444c5c59135c4837997f4288e3ae5d54dfb199 Turn HTML into equivalent Markdown-structured text. Convert HTML to Markdown-formatted text. https://github.com/Alir3z4/html2text/ python3-html5-parser x86_64 ccf72d48fc7bc5c2672f7c99f5eb59ab90f079785434de21d916d2f23ee35ac8 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 97d5eabca28c9267126025348a2d863f0e9ee0ce95bd3a1648851339e08e1e2e 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 03f20e144fcce189dd437756c811b922bfadeb215145537a6b4ea1a23c699b14 IPython-enabled pdb https://github.com/gotcha/ipdb python3-ipython noarch 8017a4807d406a265de0f07cc5e7b184e9b6f3c401129dd60939419c9bb99560 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 abd75b693a54e76bce5aa3715eda96c52412f0feb8204b5799454c2285839a92 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 662ca3d49799b38c52850785234d012e97f740e44a198f5a35fe60ec7cab6b8a 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 b8e64fa0b85f742d9a7da5547a0f04f9ba8468986b65b4bfa58fb9a81f2339ac 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 6df3693d7f16fbfe10b329487b0c75005133a4815f3d70449e2991d0a9b1a8c3 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 25963465ead6f97f8b683ff4a1d918756ca6ed19620290a60eb89a0cb14d0e07 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 af739b1ab4158ad98c624584d34799b4881cceeb20bf6cad566a3b6a285142ce Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python3-littleutils noarch 1ba9fac885bdd105b390980db89ae7dc081c1d8f9c073b21bbdb50cdcb8f6a34 Small collection of Python utilities Small collection of Python utilities. https://pypi.org/pypi/littleutils python3-matplotlib-inline noarch a70c41da1d4f87d5e34c681509c0c79f7ee2ffddd2da71a7aba34cbb0146b100 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 7f4c7d262dfcf31774ee465ed7f89c8fae850ea9b9b09c126073eb20743cb844 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 9b36366bb054d0bcf16f6294167a982ce9f0fa588588b7707c2122427d569b14 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 2b0065150fe8a2b0cf8860f8350cc9fb4914d8f6c72fee1ef6c9c209e7de3e26 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 cc60cafdf074f7d2aff5e0d433dd012a862827fb9ad26ebb4ffa31aec08c69d9 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 32be695add6b4981db98127ea355fa21927eb2fe33ba6735b2a30adf5baf39f7 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 c228e30e904f8a90cba40a5d2a7ee986767c568f4f6fac1b5fdd7c247a267de7 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 26e8039a325e4f93c709eaff8ce8d5261549b0a3177c0e9e8584a9391b9a9056 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 244fdbfe53f19180ac6b7fbb653932c73e2972658850a6459c356c9a68f7df97 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 705a9f13b28277b991fa0e79223bb09b966720fbcf773cf87a08846bdcf293d0 Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python3-openidc-client noarch fb4040264e6bc3b97ec9173aa67584edef3a427ba22fa3e3ba16e502e58fc71b Python OpenID Connect client with token caching and management Python OpenID Connect client with token caching and management. python3-os-service-types noarch 270c6b4a814057e4b2cefa73633396a3e7fca320bb87346abf592632f7da14cd Python library for consuming OpenStack sevice-types-authority data https://pypi.org/project/os-service-types/ python3-oslo-concurrency noarch 3caa0218a37b2a1cac4557608bea3d1444b56067c118fac2e03fb11cfec63fc1 Oslo Concurrency library OpenStack library for all concurrency-related code https://docs.openstack.org/oslo.concurrency/latest/ python3-oslo-config noarch b44a7157c1547deabdfc70d080970cdaf324393cb0bf7ba6f9f867cf2c5d4959 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 e8eb222c7235d8579fc6ad2919c9fc52173417b2fb55e24367ba89dea4385960 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 b6ebbda36abaaaed4acbb09640b0c15e56d5222c551bf70f5735da56d930651b Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python3-oslo-i18n noarch 23ff9fde1e80f96ae0bad303df3a379d273a041ac644fe23a86a3210b8b46e97 Oslo i18n library Internationalization and translation library https://docs.openstack.org/oslo.i18n/latest python3-oslo-serialization noarch 1a53af28685da6bfaaa1e87c9a8a525077b85b0fb01f80aec28797e9af9893c9 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 bcabb431efdb11c889b450ed312fdbe9f5fb38631637554f30fe1728ab82dbe1 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 f668bd1e52d02d0e72b4af82c2b26b158dd757839c919983d10d77262a5c9bf5 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 6c1a0c56f6ab9ec47bb324fe437c5d5692c6791d3c8c9a400cfdf543e456abe0 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 ac74210b1b7906fd81b9f820915c5e1d4c8525117fa614d4286a2d072672e7b4 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 3f898d93bebb5dc8f4b2e306194f35cc8aafbba79c54409cf48e1e1316471a7f 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 a9f88349f726e6e00847b9d6fb6ecbc261f6caf3454d2c168e5b924f194aea72 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 05a432688574edd621b6b25b67f0b2e2a0f71b74ef3dc73610417f69db041e25 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 16cdb159453c7ed39fe16a2459d3b0ac29de68026e837f1993d904b0dbb6e9db 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 003ad7a45dc2b24fddc4a375d4e8f6e6b2efa78707cbc972e204c5c19812fb45 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 22ee30bdb45dd4e990287955545dab9f0d1005961de9ce45f3656f370d733c2f Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python3-py3dns noarch f6b5fb3178c7294a9fc7cdd0d9889d3f20993e5352a2a60a7e2b1687de994fb9 Python 3 DNS library Python 3 DNS library: https://launchpad.net/py3dns python3-pyLibravatar noarch 7eb4293fbc9a710683f34ddb22055bf63b54ea89964554176c0be2490c12f182 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 f468d839b9ff510a699634915ccb359d5ea3700e9ef799141e3669b08c558ea0 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 f9de0bf0a7bf3165fe1f147096a0233ee781356ea858c7fb212b8d2d3a1758bb 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 f6fc1b6661fa277154d57d42a2e8d0123e640b6898a99b6a438b7eeec6fac4c6 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 04147959db5406036b181e804fbb86e52df7ba78a552b255060564aa615f6c8d A Python svg graph plotting library https://www.pygal.org/ python3-pygal noarch 82c76ff8d5fea74aba1b38515e4590f8b65838156a24510e5f8cd5305f575252 A Python svg graph plotting library https://www.pygal.org/ python3-pygit2 x86_64 893a01873ecb4f88b9c6b4e2a4c235b7c73a1a2658c034df0cdb0bc95bdc466e 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 5c94e7c73e10996184ab71895ba7c5b68eb1aca3f2311500088ad423c28201af 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 259a6a1e6d8653607139899944021ea1ef0b545408788b90ee603386e5405261 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 27220fa1317c276d91d52a47aaed0a72aa474366589e206f26dc00e44643a83d 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 e4c591781a5dd21197d149b1731d4d7888dca7cdbd2c8af632dbe3f5889020ac 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 13e4205a7f5e6c2fadfad206c5c987f4decdab9e1828dc7c66d301bd8276eea2 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 591e07eff789c6f1abcedfc596d3ffcd3b2b7a8f0862a9283702394de72fcd9e 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 b1f011929ff3850787fdb8e7ed92272c5b36c98db1d1a214ac09cc0a807a9c4b 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 50dc39b0cd38db3d4527853e8e0759c43c50ddb52229df1b86d7c4b4e13b180b 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 ae4790d1976a828da5e1965eceddfeca8d55944fa3dfb094968aeb9ce1282da5 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 94e6f1f7bafc913eb939ce0c94bb8e3955b43123d116c5f8cadced14cb57b810 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 2eb01c7e7a8009fe1ca2b0d03253d1e2cab593598ee91e4ed2e2b8d5ccf951d9 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 e01b1106ab1b2b04c0ec71dc4b0f65ed7b80a516ed3bc2aefe02ee5f7b15397f 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 80524bf994882b692b4c19b6f1cd7e75e6865bf2c1ec61f12015c747e73cbed9 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 4a5da9c9f870307a43564ca612e545cbe6ba668bad75f7e686b60f4019879a10 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 3792b55b78d3f3e9cea080173b864cb8bb7acde189ca2a4ded18d766adf03c3d Dictionary with Jinja2 expansion Dictionary where __getitem__() is run through Jinja2 template. https://github.com/xsuchy/templated-dictionary resalloc noarch 42e5cb312efca448829c7f78478205b9680b89e88a5d454671ae6bc1ba399a40 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 b7cf721fcde5303691d3586017a4aa0cd242955a03a39f261f7c06754f1f1861 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 341283328df7dcef4a17de5b81e3479fb35cdda7933ab0df63986f69661f54da 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 219a9bc415fbeb66c2a1168cd1e87f9a323c79522da9c1eb1962440c8c9a9fdf 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 27263109c549f7a2224c4ad6f2b3bb432d752a09a619472a07a3973427c8c274 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 ffde9159d9dea6f146a131320980f61f021ac12162d63819212106ca1bc35269 Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 6d5d3fe66e665dc83b8582054c1b745fd11ad97609f83dd80cf32fd44334beca Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 3d31f261c4d529d49c2365bbce63cc215b8a3d5043e5aa1227afa658e7eca404 Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 9f89b4aa4408e2a682d1c4269a3c5e7b3cb2fba8e544bdf00301c2dc85b8dc61 Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 13d8c0510a19344340607af4286725ebd31002a864f9d4cc917ae07997aa0d4a Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 84ab34c2a993548aae289b118f3cb2624ed8ecc2a0521bfb2054fd328c225f6a Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg src 0ae094f218943579718d57c3ed5a90aa1ea5427dc5ee95bd6fe010d54e9fbefb Python library for interacting with rpm+git Python library for interacting with rpm+git https://pagure.io/rpkg rpkg noarch afe189a6903406b05565fa6435d7f10d367ceb4e08a02e3b2d675d6f7ac2cc27 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 43d83f6a100b30c2d720e46fa5ff54a58bdbc6f4a02bb7d9fd40ecbb4dbd9ea4 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 e0f0106a26cb8309e6f4e13856d39f3fc024b557ba6267b7c2757dea580bc85b 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 7c2cf0c7611a1156417d82f57dfe1bde024849efa085ce1f131eb140ab4c6878 Common files for rpkg Common files for python2-rpkg and python3-rpkg. https://pagure.io/rpkg rpkg-common noarch b7d5a448096eb7293b53901b957aa2c11bad2796751f275e862e518f59fcd382 Common files for rpkg Common files for python2-rpkg and python3-rpkg. https://pagure.io/rpkg rpkg-common noarch 25bd240cd554d39eaa5fc953a532b201ef995ef86bbc31e85eba7d19cff57a9b Common files for rpkg Common files for python2-rpkg and python3-rpkg. https://pagure.io/rpkg rpkg-macros noarch 19ced5826a50e0c186605de358e117363bd046e08f28c80d89411d7fd2f9581a 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 fc9492b974d8728340b121e200fdeb4f53a074caa5c65e4e90dc914954f09534 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 1622087d3bfbbe58f3ebb6d6e66c829b9107f84ed9303cbc9739223f86fa8f07 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 c7977a80ad1646a5c8450d255422beb1e7506e8d7471443b0eddec6dcf1accf2 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 6076c36c7bc35ad8fcbc42f79687fd26f22a1aee6b6fcbb43c7611e40f61c5af 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 e16098036f82898e7ba4bb08946bcf741da9070838445a0840c3092e68e8b473 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 82b602fc54e0fc694f3763b763da8684e652e0f80dbd935e7baeb0c0a7340036 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 50f1999386e17ebc504e997c292a3fe880ebbb98c949f594179a4b9983c1d675 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 1d9af1d51bb510a255e4085d421ddc7668b4a584d3a2ac5861d3b9210d03414d 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 d5e3b607e5cf40a894d34e6c2e92afd697bbf4fac8ce0c9850b31dddc2bd4c9a 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 a4d269afd16243847516058d44472b3b0cb885298c6d1ec36a605f3b3f8dc7fe 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 150b1eef459e9c5a628614437ec45e3805416a38c4a15d2ba0eab2a9568f0f05 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 e8a4bcb41548d494755ab7dbd5a994c56e480d32124009d9ac439275c96fdb7a 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 93dc3b8d13b6c6898c8b4fcb38ff6ae3259269d4420ab52abb68a31f732df240 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 94fab9b9fe7b840435836f06e07de2fdf42c1766f6fcf18728532fbfd22e16dd 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 a16002a2e8a9ac3a6ae299ba839b740706a5be841d5aa7d09d0942186af7ea25 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 1632842463faca1710ba8dd5112754ada124ed976db154f76303b45e43d6b87c 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 2116e741ac6712f97026ad2b35029ab5b493cec43bf4ebfff4cf9757c761c0b8 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 809307c49889475217ed96f9d774af0340dd77475d3f8b3d10fb72d51e0812dd CLI tool for generating RPM releases and changelogs CLI tool for generating RPM releases and changelogs https://pagure.io/fedora-infra/rpmautospec rpmautospec noarch e50ae6a8437e089422381468d7d0ed517df0b783f101c50289123c0b265f7262 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 94eb964010e9aa76b056206cff628e5e72345f8a12cba579f4332dee3adf009e 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 bd534fe305089d634267cae995ea83a2602e1b56da7b2f9e41c677c5036f957b Rpmautospec RPM macros for local rpmbuild RPM macros with placeholders for building rpmautospec enabled packages localy https://pagure.io/fedora-infra/rpmautospec tini src 3e0754575f7632464d91c0d95a96af9e48628fd89d0e6fcfae63872b945dcc62 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 a9f9bd717a4acb436f357b13f0e03d1d31915792d6c55d67930b8cc769c18ad2 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 bdb577fed4b45803467d4be02b8b791130839127e0983f80222427495906463c 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 8c66c38c1e8969820284b7b6348f4a86c8ce1cfd57a99fafe1f291d671b26278 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 ce74256a872f5b9362ea72bcb61896869fe483c74548e9ae20864d191e66e892 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 3b165425e78a66a977d3c5b26896d474082918153e233506c313a8bec851bf35 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 903fb54897bae1a3f595882cf3e480f4d9854d59a711b77d39aa6b90611ac7fc 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