Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyparsing to version 3.0.9 #9

Merged
merged 5 commits into from Aug 25, 2022
Merged

Update pyparsing to version 3.0.9 #9

merged 5 commits into from Aug 25, 2022

Conversation

varlackc
Copy link

pyparsing version 3.0.9

    • Check the pinnings

python version >=3.6.8
https://github.com/pyparsing/pyparsing/blob/pyparsing_3.0.9/pyproject.toml#L11

flit-core >=3.2
https://github.com/pyparsing/pyparsing/blob/pyparsing_3.0.9/pyproject.toml#L2

  1. Version 3.0.9 -



  • API CHANGE: modified pyproject.toml to require Python version
    3.6.8 or later for pyparsing 3.x. Earlier minor versions of 3.6
    fail in evaluating the version_info class (implemented using
    typing.NamedTuple). If you are using an earlier version of Python
    3.6, you will need to use pyparsing 2.4.7.

  • Improved pyparsing import time by deferring regex pattern compiles.
    PR submitted by Anthony Sottile to fix issue #362, thanks!
    3x import-time performance regression between 2.x and 3.x pyparsing/pyparsing#362

  • Updated build to use flit, PR by Michał Górny, added BUILDING.md
    doc and removed old Windows build scripts - nice cleanup work!

  • More type-hinting added for all arithmetic and logical operator
    methods in ParserElement. PR from Kazantcev Andrey, thank you.

  • Fixed infix_notation's definitions of lpar and rpar, to accept
    parse expressions such that they do not get suppressed in the parsed
    results. PR submitted by Philippe Prados, nice work.

  • Fixed bug in railroad diagramming with expressions containing Combine
    elements. Reported by Jeremy White, thanks!

  • Added show_groups argument to create_diagram to highlight grouped
    elements with an unlabeled bounding box.

  • Added unicode_denormalizer.py to the examples as a demonstration
    of how Python's interpreter will accept Unicode characters in
    identifiers, but normalizes them back to ASCII so that identifiers
    print and 𝕡𝓻ᵢ𝓃𝘁 and 𝖕𝒓𝗂𝑛ᵗ are all equivalent.

  • Removed imports of deprecated sre_constants module for catching
    exceptions when compiling regular expressions. PR submitted by
    Serhiy Storchaka, thank you.

Version 3.0.7 -

  • Fixed bug #345, in which delimitedList changed expressions in place
    using expr.streamline(). Reported by Kim Gräsman, thanks!
    Parse actions skipped inside delimited_list pyparsing/pyparsing#345

  • Fixed bug #346, when a string of word characters was passed to WordStart
    or WordEnd instead of just taking the default value. Originally posted
    as a question by Parag on StackOverflow, good catch!
    Bug when defining WordStart with wordChars argument pyparsing/pyparsing#346

  • Fixed bug #350, in which White expressions could fail to match due to
    unintended whitespace-skipping. Reported by Fu Hanxi, thank you!
    White couldn't combine with set_results_name() pyparsing/pyparsing#350

  • Fixed bug #355, when a QuotedString is defined with characters in its
    quoteChar string containing regex-significant characters such as ., *,
    ?, [, ], etc.
    3.0 regression from 2.4.7 - regex generated for QuotedString pyparsing/pyparsing#355

  • Fixed bug in ParserElement.run_tests where comments would be displayed
    using with_line_numbers.

  • Added optional "min" and "max" arguments to delimited_list. PR
    submitted by Marius, thanks!

  • Added new API change note in whats_new_in_pyparsing_3_0_0, regarding
    a bug fix in the bool() behavior of ParseResults.

    Prior to pyparsing 3.0.x, the ParseResults class implementation of
    __bool__ would return False if the ParseResults item list was empty,
    even if it contained named results. In 3.0.0 and later, ParseResults will
    return True if either the item list is not empty or if the named
    results dict is not empty.

    # generate an empty ParseResults by parsing a blank string with
    # a ZeroOrMore
    result = Word(alphas)[...].parse_string("")
    print(result.as_list())
    print(result.as_dict())
    print(bool(result))
    
    # add a results name to the result
    result["name"] = "empty result"
    print(result.as_list())
    print(result.as_dict())
    print(bool(result))
    

    Prints:

    []
    {}
    False
    
    []
    {'name': 'empty result'}
    True
    

    In previous versions, the second call to bool() would return False.

  • Minor enhancement to Word generation of internal regular expression, to
    emit consecutive characters in range, such as "ab", as "ab", not "a-b".

  • Fixed character ranges for search terms using non-Western characters
    in booleansearchparser, PR submitted by tc-yu, nice work!

  • Additional type annotations on public methods.

Version 3.0.6 -

  • Added suppress_warning() method to individually suppress a warning on a
    specific ParserElement. Used to refactor original_text_for to preserve
    internal results names, which, while undocumented, had been adopted by
    some projects.

  • Fix bug when delimited_list was called with a str literal instead of a
    parse expression.

Version 3.0.5 -

  • Added return type annotations for col, line, and lineno.

  • Fixed bug when warn_ungrouped_named_tokens_in_collection warning was raised
    when assigning a results name to an original_text_for expression.
    (Issue #110, would raise warning in packaging.)
    unexpected "warn_ungrouped_named_tokens_in_collection" warnings in versions >2.4.0 pyparsing/pyparsing#110

  • Fixed internal bug where ParserElement.streamline() would not return self if
    already streamlined.

  • Changed run_tests() output to default to not showing line and column numbers.
    If line numbering is desired, call with with_line_numbers=True. Also fixed
    minor bug where separating line was not included after a test failure.

Version 3.0.4 -

  • Fixed bug in which Dict classes did not correctly return tokens as nested
    ParseResults, reported by and fix identified by Bu Sun Kim, many thanks!!!

  • Documented API-changing side-effect of converting ParseResults to use __slots__
    to pre-define instance attributes. This means that code written like this (which
    was allowed in pyparsing 2.4.7):

    result = Word(alphas).parseString("abc")
    result.xyz = 100

    now raises this Python exception:

    AttributeError: 'ParseResults' object has no attribute 'xyz'

    To add new attribute values to ParseResults object in 3.0.0 and later, you must
    assign them using indexed notation:

    result["xyz"] = 100

    You will still be able to access this new value as an attribute or as an
    indexed item.

  • Fixed bug in railroad diagramming where the vertical limit would count all
    expressions in a group, not just those that would create visible railroad
    elements.

  1. 'version_info' object has no attribute '__version__' with python 3.6.0
    'version_info' object has no attribute '__version__' with python 3.6.0 conda-forge/pyparsing-feedstock#36

    Currently there is only one open issue for python version 3.6.0.
    However, since we no longer provide support for python 3.6.0 we could conclude that there are no significant open issues mentioned that will affect the update of the package.

    • License is spdx compliant
      MIT
    • License family is present
      MIT
    • Verify that the build_number is correct
    • Verify if the package needs setuptools
      setuptools
    • Verify if the package needs wheel
      wheel
    • pip in the test section
      pip
    • Veriy the test section
    • Verify if the package is architecture specific or Noarch
    • Private variables are not mentioned on the recipe For example: (_private_variable)

Results:

Based on the research findings and the results we can conclude
that it is safe to update pyparsing to version 3.0.9

@varlackc varlackc self-assigned this Jul 19, 2022
@varlackc varlackc marked this pull request as ready for review July 19, 2022 21:00
recipe/meta.yaml Outdated Show resolved Hide resolved
recipe/meta.yaml Outdated Show resolved Hide resolved
@varlackc varlackc requested a review from chenghlee July 27, 2022 21:15
@varlackc varlackc merged commit db8ce6d into master Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants