Pcpp

Latest version: v1.22

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.22

--------------------------
- Fix bug where outputting to stdout did not combine with anything which
printed to stdout. Thanks to Fondesa for reporting this.
- Fix extra newlines being inserted after a multiline comment. Thanks to virtuald
for sending a PR fixing this.
- Fix not being able to actually specify an empty line directive. Thanks to kuri65536
for sending a PR fixing this.
- Update ply submodule to latest from trunk.
- Emit line continuations as tokens, rather than collapsing lines during parsing.
Thanks to MathieuDuponchelle for the pull request implementing this.
- Enable parsing and emission of files in arbitrary text encodings. This is supported
in Python 3 or later only. Thanks to MathieuDuponchelle for the suggestion.
- Fix bad regex for parsing floats, so now floats are correctly tokenised. Thanks
to LynnKirby for reporting this.
- BREAKING CHANGE: Passthrough for ``include MACRO`` was not supported. This was not
intentional, and to fix it required modifying the ``on_include_not_found()``
customisation point which is a source breaking change. Thanks to schra for reporting this.

1.21

----------------------------
- Fix bug where token pasting two numeric tokens did not yield a numeric token. Thanks
to Sei-Lisa for reporting this.
- BREAKING CHANGE: Paths emitted by pcpp into ``line`` directives now are relative to the
working directory of the process when ``Preprocessor`` is initialised. This includes
added search paths - files included from those locations will be emitted with a sequence
of ``../`` to relativise the path emitted. If no path exists between the working
directory and the path of the file being emitted, an absolute path is emitted instead.

If you wish to disable this new behaviour, or use different behaviour, you can
customise the new `rewrite_paths` member variable of ``Preprocessor``.
- Fix bug where ``__LINE__`` was expanding into the line number of its definition instead
of its use. Thanks to Sei-Lisa for reporting this.
- Add ``--passthru-magic-macros`` command line option.
- BREAKING CHANGE: The ``PreprocessorHooks`` and ``OutputDirective`` interface has
changed. One now must specify the kind of ``OutputDirective`` abort one wants, and one
can now both ignore AND remove directives. ``on_directive_handle()`` and
``on_directive_unknown()`` now take an extra parameter ``precedingtoks``, these are the
tokens from the ` up to the directive.
- Fix a corner case where ``FUNC(void)foo()`` expanded to ``voidfoo()`` and not
``void foo()`` which is a very common non-conforming extension of the C preprocessor.
Thanks to OmegaDoom for reporting this.
- Add tokens for all the C operators, to help implementation of an expression evaluator.
- Updated embedded ply to HEAD (2019-04-25)
- Fix ``include`` not working if no ``-I`` parameters were supplied. Thanks to csm10495
for reporting this.

1.20

-------------------------
- Now supports character literals in expressions. Thanks to untaugh for the pull request
adding this.
- Stopped the default collapsing of whitespace in output, and made it optional via a
new command line option ``--compress``.
- Fixed extraneous whitespace in ``--passthru-comments`` caused by multiline comments.
Thanks to p2k for reporting this.
- Fixed bug where defining a macro via string did not set the source attribute in the
token. Thanks to ZedThree for reporting this.
- Stop triggering an exception when no arguments are supplied to pcpp. Thanks to
virtuald for reporting this.
- Rebase onto PLY latest from Dec 28th 2018 (https://github.com/dabeaz/ply/commit/a37e0839583d683d95e70ce1445c0063c7d4bd21). Latest
PLY no longer works using pypi packaging, David wants people to include the source of
PLY directly. pcpp does this via a git submodule, and has setuptools bundle the submodule.
- Add a formal LICENSE.txt file, as requested by Sei-Lisa.
- Fix failure to issue ``line`` directive for first include file in a file. Thanks to
Sei-Lisa for reporting this.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.