GitXplorerGitXplorer
b

regex-as-re-globally

public
2 stars
1 forks
1 issues

Commits

List of commits on branch main.
Unverified
f5fa277715bb30a7b72aac41f5af9363d75338b3

Updated compatibility info, dropping 3.7 and adding 3.12

committed a year ago
Unverified
f713fdf49bae49cfe070bbb9f6363066d39969d4

Version 0.0.3

bbrondsem committed 2 years ago
Unverified
839d7cbf4e1bd7f3140992186722f88370fd129d

update previously-set references to 're'. Fixes #4

bbrondsem committed 2 years ago
Unverified
7d1e3e2faf503d92743aae67564ee797b903314b

GH action: 3.11 instead of 3.11-dev

bbrondsem committed 2 years ago
Unverified
b452d6eaa9967c68cb91013a1dedefe0b0a56e33

drop python 3.6 testing

bbrondsem committed 2 years ago
Unverified
c04c0764c4f9a3a1df8321bcee13e7fe5ba68c0f

try running separate tox cmds from GH action, rather than tricky {} syntax

bbrondsem committed 2 years ago

README

The README file for this repository.

regex-as-re-globally

This package does very unusual things, and you normally don't need it. It helps you use the "regex" package which is a backwards-compatible replacement for re, with additional features and better performance in some situations (and worse performance in others). Normally you can put import regex as re in your .py files and that's all you need.

However, if you want to use regex instead of re across your whole environment, even within 3rd-party libraries, then this package is for you.

Run pip install regex-as-re-globally to install this package. It will create a .pth file in site-packages which modifies sys.modules so that regex is used everywhere instead of re. This changes behavior within the whole python environment.

The wheel files generated are platform and python specific due to the limitations of wheel files, where the relative directory for site-packages needs to be determined at wheel building time, not install time. The directory is dependent on the version of python and the platform you are on.

The site-packages .pth technique is heavily inspired by https://github.com/dougn/coverage_pth and https://nedbatchelder.com/blog/201001/running_code_at_python_startup.html Thanks!