Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | _build_tables: Invalidate cache before importing generated modules (#494) | Michał Górny | 2023-02-25 | 1 | -0/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to invalidate finder caches before trying to import generated modules. This is necessary according to the Python documentation: https://docs.python.org/3/library/importlib.html#importlib.invalidate_caches This fixes a hard-to-reproduce bug that Python would be unable to find just-generated `lextab.py` if mtime of the current directory did not change from the moment the script was started. This could e.g. be the case if one has second-precision timestamps and removes the generated file just before starting the build, e.g.: $ rm pycparser/lextab.py; python -m build -nw It could also be reproduced easier by doing something like: $ cd pycparser $ touch .; python -B _build_tables.py Traceback (most recent call last): File "/var/tmp/pycparser/pycparser/_build_tables.py", line 38, in <module> import lextab ModuleNotFoundError: No module named 'lextab' This is because the first command (`rm` or `touch`) updates the mtime of the directory to the current time. If the script is run fast enough, it manages to scan the directory and then write the new `lextab.py` within the same second. As a result, mtime of the directory after writing the new file is the same as when the script was started, finder does not invalidate the cache and assumes that `lextab.py` does not exist since it did not exist when the directory was scanned earlier. This potentially fixes #493. It was originally reported on https://bugs.gentoo.org/701878. Thanks to Gary E. Miller for patience in reproducing the problem and proxy-debugging it for me, as well as testing the final patch before submission. | ||||
* | Insert '.' and '..' to sys.path before import statements (#321) | Thomas Krennwallner | 2019-04-13 | 1 | -2/+6 |
| | | | | Restricted environments like embeddable python do not include the current working directory on startup. | ||||
* | Use https:// for all project links where available (#267) | Jon Dufresne | 2018-06-26 | 1 | -1/+1 |
| | |||||
* | Remove Copyright from every source file | Eli Bendersky | 2017-02-02 | 1 | -1/+1 |
| | | | | Replace it by website link; copyright appears in the LICENSE file already, which is sufficient | ||||
* | Various cosmetic updates to documentation | Eli Bendersky | 2015-05-10 | 1 | -1/+1 |
| | |||||
* | Prepare for release 2.11release_v2.11 | Eli Bendersky | 2015-04-21 | 1 | -1/+0 |
| | |||||
* | Fix sys.path inclusion order in _build_tables.py (GH issue #12), | Eli Bendersky | 2013-07-24 | 1 | -1/+1 |
| | | | | and some comment fixes. | ||||
* | Updated CHANGES and some cosmetic cleanups | Eli Bendersky | 2013-06-12 | 1 | -3/+3 |
| | |||||
* | typo & cosmetic changes | Eli Bendersky | 2012-02-03 | 1 | -1/+1 |
| | |||||
* | * Added EmptyStatement node to represent an empty statement (sole ';'), with ↵ | eli.bendersky | 2011-10-16 | 1 | -1/+3 |
| | | | | | | tests and c-to-c support * Added sys.path update in _build_tables.py to enable it to run correctly from the pycparser folder | ||||
* | changed license notices to BSD in all files | eli.bendersky | 2011-04-29 | 1 | -2/+2 |
| | |||||
* | releasing version 2.01 - removed yaml dependency, fix installation problems | eli.bendersky | 2010-12-04 | 1 | -2/+3 |
| | |||||
* | Fixes for correct setup of the package | eli.bendersky | 2010-12-03 | 1 | -1/+1 |
| | |||||
* | initial implementation of C99 named initializers and compound literals. The ↵ | eli.bendersky | 2010-10-30 | 1 | -1/+1 |
| | | | | latter still doesn't work because of a shift/reduce conflict | ||||
* | initial import from SVN | Eli Bendersky | 2010-05-21 | 1 | -0/+31 |