GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-100061: Restore the global Input Stream pointer by uyw4687 · Pull Request #102612 · python/cpython

Conversation

@uyw4687

@uyw4687 uyw4687 commented Mar 11, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Extra characters erroneously matched when using possessive quantifier with negative lookahead #100061

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Seonkyo Ok
pythongh-100061 Restore the global Input Stream pointer
007e7d7
@bedevere-bot bedevere-bot mentioned this pull request Mar 11, 2023
Extra characters erroneously matched when using possessive quantifier with negative lookahead #100061
Closed
@bedevere-bot bedevere-bot added the awaiting review label Mar 11, 2023
Seonkyo Ok
pythongh-100061 Refine comment
43dc3cf
@hauntsaninja hauntsaninja changed the title pythongh-100061 Restore the global Input Stream pointer gh-100061: Restore the global Input Stream pointer Mar 11, 2023
@hauntsaninja hauntsaninja added the needs backport to 3.11 only security fixes label Mar 11, 2023
@hauntsaninja
hauntsaninja requested a review from serhiy-storchaka March 11, 2023 23:06
@corona10 corona10 added the skip news label Mar 12, 2023
ghost
ghost reviewed Mar 12, 2023
View reviewed changes

@ghost ghost left a comment •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a new entry that describe the fix to user.
Such as: Fix wrong match in postive qualifiers. Patch by <your name>

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

uyw4687 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Lib/test/test_re.py Outdated
self.assertIsNone(re.match("^x{}+$", "xxx"))
self.assertTrue(re.match("^x{}+$", "x{}"))

self.assertEqual(re.match('((.(?!C))++)', 'ABCD').span(), (0, 1))

@ghost ghost Mar 12, 2023

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may add a comment # gh-100061 for this test-case.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@uyw4687 uyw4687 Mar 13, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Seonkyo Ok
pythongh-100061 Add github issue number on comments
d33c012
ghost
ghost reviewed Mar 13, 2023
View reviewed changes
Comment thread Modules/_sre/sre_lib.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ghost

ghost commented Mar 13, 2023

Copy link
Copy Markdown

IMO the fix is fine. Just adjust some details (comment/new_entry).
Need to wait for a core developer to merge the PR.

uyw4687 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Seonkyo Ok added 3 commits March 13, 2023 23:52
Seonkyo Ok
pythongh-100061 Remove unneeded comment
8a958f1
Seonkyo Ok
pythongh-100061 Refine test case
b5476e4
Seonkyo Ok
Add blurb entry
2ffcc16
@arhadthedev arhadthedev added the topic-regex label Apr 1, 2023
@arhadthedev

arhadthedev commented Apr 1, 2023

Copy link
Copy Markdown
Member

@ezio-melotti, @serhiy-storchaka (as regex experts)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka added 3 commits August 16, 2023 09:14
@serhiy-storchaka
Merge branch 'main' into pythongh-100061
4c4b271
@serhiy-storchaka
Re-enable possesive qualifiers in the commpiler.
86ca7e7
@serhiy-storchaka
Refine tests.
6656aa2
serhiy-storchaka
serhiy-storchaka approved these changes Aug 16, 2023
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thank you for your contribution @animalize and @uyw4687.

This fixes also #106052

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Aug 16, 2023
@serhiy-storchaka serhiy-storchaka added needs backport to 3.12 only security fixes and removed skip news labels Aug 16, 2023
@serhiy-storchaka
serhiy-storchaka merged commit abd9cc5 into python:main Aug 16, 2023
@miss-islington

miss-islington commented Aug 16, 2023

Copy link
Copy Markdown
Contributor

Thanks @uyw4687 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Aug 16, 2023
@miss-islington

miss-islington commented Aug 16, 2023

Copy link
Copy Markdown
Contributor

Sorry, @uyw4687 and @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker abd9cc52d94b8e2835322b62c29f09bb0e6fcfe9 3.12

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington miss-islington assigned serhiy-storchaka Aug 16, 2023
@miss-islington

miss-islington commented Aug 16, 2023

Copy link
Copy Markdown
Contributor

Sorry, @uyw4687 and @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker abd9cc52d94b8e2835322b62c29f09bb0e6fcfe9 3.11

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Aug 16, 2023
@uyw4687 @serhiy-storchaka
[3.12] pythongh-100061: Proper fix of the bug in the matching of poss…
287c6ca
…essive quantifiers (pythonGH-102612)

Restore the global Input Stream pointer after trying to match a sub-pattern.

Co-authored-by: Ma Lin <[email protected]>.
(cherry picked from commit abd9cc5)

Co-authored-by: SKO <[email protected]>
@bedevere-bot

bedevere-bot commented Aug 16, 2023

Copy link
Copy Markdown

GH-108003 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 16, 2023
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Aug 16, 2023
@uyw4687 @serhiy-storchaka
[3.11] pythongh-100061: Proper fix of the bug in the matching of poss…
410f5dd
…essive quantifiers (pythonGH-102612)

Restore the global Input Stream pointer after trying to match a sub-pattern.

Co-authored-by: Ma Lin <[email protected]>.
(cherry picked from commit abd9cc5)

Co-authored-by: SKO <[email protected]>
@bedevere-bot

bedevere-bot commented Aug 16, 2023

Copy link
Copy Markdown

GH-108004 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 16, 2023
@serhiy-storchaka serhiy-storchaka removed their assignment Aug 16, 2023
@bedevere-bot

bedevere-bot commented Aug 16, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 RHEL8 LTO + PGO 3.x has failed when building commit abd9cc5.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/78/builds/5080) and take a look at the build logs.
  4. Check if the failure is related to this commit (abd9cc5) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/78/builds/5080

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

431 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 27 sec
  • test_multiprocessing_spawn: 1 min 59 sec
  • test_multiprocessing_forkserver: 1 min 16 sec
  • test_signal: 1 min 12 sec
  • test_multiprocessing_fork: 1 min 8 sec
  • test_socket: 42.6 sec
  • test_io: 40.1 sec
  • test_imaplib: 32.8 sec
  • test_subprocess: 32.3 sec
  • test_xmlrpc: 27.5 sec

1 test altered the execution environment:
test_interpreters

15 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_gdb
test_ioctl test_kqueue test_launcher test_startfile test_tkinter
test_ttk test_winconsoleio test_winreg test_winsound test_wmi
test_zipfile64

Total duration: 2 min 37 sec

Click to see traceback logs
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1095, in get_code
  File "<frozen importlib._bootstrap_external>", line 1194, in get_data
TypeError: descriptor 'close' for '_io.BufferedReader' objects doesn't apply to a '_io.FileIO' object


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/threading.py", line 1052, in _bootstrap_inner
    self.run()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/threading.py", line 989, in run
    self._target(*self._args, **self._kwargs)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/test_interpreters.py", line 481, in task
    interp = interpreters.create()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/support/interpreters.py", line 25, in create
    id = _interpreters.create(isolated=isolated)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: interpreter creation failed
k
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka added a commit that referenced this pull request Aug 16, 2023
@serhiy-storchaka @uyw4687
[3.11] gh-100061: Proper fix of the bug in the matching of possessive…
26137e2
… quantifiers (GH-102612) (GH-108004)

Restore the global Input Stream pointer after trying to match a sub-pattern.

Co-authored-by: Ma Lin <[email protected]>

(cherry picked from commit abd9cc5)
    
Co-authored-by: SKO <[email protected]>
Yhg1s pushed a commit that referenced this pull request Aug 16, 2023
@serhiy-storchaka @uyw4687
[3.12] gh-100061: Proper fix of the bug in the matching of possessive…
bd2ef82
… quantifiers (GH-102612) (#108003)

Restore the global Input Stream pointer after trying to match a sub-pattern.

.
(cherry picked from commit abd9cc5)

Co-authored-by: SKO <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
+1 more reviewer
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic-regex

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@uyw4687 @arhadthedev @miss-islington @bedevere-bot @serhiy-storchaka @corona10 @hauntsaninja
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.