Skip to content

Add a link to the regex module in re documentation #66784

Closed

Description

@serhiy-storchaka
BPO 22594
Nosy @brettcannon, @birkenfeld, @pitrou, @ezio-melotti, @serhiy-storchaka, @marco-buttu, @animalize, @Mariatta
PRs
  • bpo-22594: Add a link to the regex module in re documentation #241
  • [3.6] bpo-22594: Add a link to the regex module in re documentation (GH-241) #316
  • [3.5] bpo-22594: Add a link to the regex module in re documentation (GH-241) #317
  • [2.7] bpo-22594: Add a link to the regex module in re documentation (GH-241) #321
  • Files
  • regex-link.patch
  • regex-link.patch
  • regex_reference.patch
  • regex_reference.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/brettcannon'
    closed_at = <Date 2017-02-27.14:54:48.344>
    created_at = <Date 2014-10-10.07:48:05.438>
    labels = ['expert-regex', 'easy', 'type-feature', '3.7', 'docs']
    title = 'Add a link to the regex module in re documentation'
    updated_at = <Date 2017-03-24.23:42:01.502>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-03-24.23:42:01.502>
    actor = 'Mariatta'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2017-02-27.14:54:48.344>
    closer = 'berker.peksag'
    components = ['Documentation', 'Regular Expressions']
    creation = <Date 2014-10-10.07:48:05.438>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['36900', '37052', '46561', '46575']
    hgrepos = []
    issue_num = 22594
    keywords = ['patch', 'easy']
    message_count = 17.0
    messages = ['228961', '229091', '229250', '229253', '230142', '287209', '287229', '287240', '287246', '287250', '287299', '287362', '287379', '290382', '290383', '290384', '290390']
    nosy_count = 12.0
    nosy_names = ['brett.cannon', 'georg.brandl', 'pitrou', 'ezio.melotti', 'mrabarnett', 'docs@python', 'tshepang', 'serhiy.storchaka', 'marco.buttu', 'malin', 'anupama.srinivas.murthy', 'Mariatta']
    pr_nums = ['241', '316', '317', '321']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue22594'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']

    Activity

    1. serhiy-storchaka commented on Oct 10, 2014

      @serhiy-storchaka
      MemberAuthor

      The regex module is purposed as a replacement of standard re module. Of course we fix re bugs, but for now regex is more bugfree. Even after fixing all open re bugs, regex will remain more featured. It would be good to add a link to regex in re documentation (as there are links to other GUI libraries in Tkinter documentation).

    2. ezio-melotti commented on Oct 11, 2014

      @ezio-melotti
      Member

      +1

    3. anupamasrinivasmurthy commented on Oct 13, 2014

      anupamasrinivasmurthymannequin
      Mannequin

      I have added the link and attached the patch below. Could you review it?

      Thank you

    4. birkenfeld commented on Oct 13, 2014

      @birkenfeld
      Member

      "currently more bugfree and intended to replace re"

      The first part is spreading FUD if not explained in more detail. The second is probably never going to happend :(

    5. anupamasrinivasmurthy commented on Oct 28, 2014

      anupamasrinivasmurthymannequin
      Mannequin

      I have modified the patch and listed the points I know. Could you review it?

    6. marco-buttu commented on Feb 7, 2017

      marco-buttumannequin
      Mannequin

      IMHO the reference proposed in the patch is too verbose. Adding details like what is supported and how to use some features I think is out of the scope of the reference. Moreover, if the regex module changes the features we are reporting in the reference, we'll have an outdated reference.

      In addition, as Brett Cannon pointed out in msg287159, the preferred way to mention a 3rd-party library should be by adding the reference at the top of the page, as in Doc/library/urllib.request.rst:19.

      I propose to just add a more concise reference, at the beginning of the page, like the following:

      .. seealso:: regex <https://pypi.python.org/pypi/regex/>_,
      a third-party alternative regular expression module.

    7. mrabarnett commented on Feb 7, 2017

      mrabarnettmannequin
      Mannequin

      I agree with Marco that it shouldn't be too verbose. I'd like to suggest that it says that it's compatible (i.e. has the same API), but with additional features.

    8. marco-buttu commented on Feb 7, 2017

      marco-buttumannequin
      Mannequin

      Looking at the regex module and documentation, it is not clear to me whether its API behaves exactly as the re API. In addition, being a third-party module, things can change in the future.

      To be defensive, IMO it is better to write as in the Ezio comment (in the review): "mostly compatible API". I propose a shorter patch, that adds the reference at the beginning of the page (right after the module introcution).

    9. mrabarnett commented on Feb 7, 2017

      mrabarnettmannequin
      Mannequin

      With the VERSION0 flag (the default behaviour), it should behave the same as the re module, and that's not going to change.

    10. brettcannon commented on Feb 7, 2017

      @brettcannon
      Member

      How about "a mostly compatible API with more thorough Unicode support"? That focuses on the VERSION1 API which is a differentiator for regex.

    11. marco-buttu commented on Feb 8, 2017

      marco-buttumannequin
      Mannequin

      With the VERSION0 flag (the default behaviour), it should
      behave the same as the re module, and that's not going to change.

      Thanks for the clarification Matthew. However, the default version will change, as the regex PyPI page points out: "In the short term this will be VERSION0, but in the longer term it will be VERSION1." I propose a patch that integrates the Brett suggestion.

    12. mrabarnett commented on Feb 8, 2017

      mrabarnettmannequin
      Mannequin

      Ah, well, if it hasn't changed after this many years, it never will. Expect one or two changes to the text. :-)

    13. animalize commented on Feb 9, 2017

      animalizemannequin
      Mannequin

      How about this? Is it too long?
      @matthew Barnett, I'm animalize on your repository.

      .. seealso::

      Third-party module `regex <https://pypi.python.org/pypi/regex>`_,
      
      is a substitute for re module, it offers some mainstream features 
      which re module lacks (Atomic grouping, Possessive quantifiers,
      Variable-length lookbehind, Recursive matching). It also has further
      Unicode support, some advanced grammars appears in other regular
      expression engines, and many facilitations.
      
    14. Mariatta commented on Mar 24, 2017

      @Mariatta
      Member

      New changeset c8e2021 by Mariatta in branch '2.7':
      bpo-22594: Add a link to the regex module in re documentation (GH-241) (GH-321)
      c8e2021

    15. Mariatta commented on Mar 24, 2017

      @Mariatta
      Member

      New changeset 21c697f by Mariatta in branch '3.5':
      bpo-22594: Add a link to the regex module in re documentation (GH-241) (GH-317)
      21c697f

    16. Mariatta commented on Mar 24, 2017

      @Mariatta
      Member

      New changeset 1457984 by Mariatta in branch '3.6':
      bpo-22594: Add a link to the regex module in re documentation (GH-241) (GH-316)
      1457984

    17. Mariatta commented on Mar 24, 2017

      @Mariatta
      Member

      New changeset ed6795e by Mariatta (Marco Buttu) in branch 'master':
      bpo-22594: Add a link to the regex module in re documentation (GH-241)
      ed6795e

    18. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions