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-100739: Respect mock spec when checking for unsafe prefixes by cklein · Pull Request #100740 · python/cpython

Conversation

@cklein

@cklein cklein commented Jan 4, 2023 •
edited by AlexWaygood
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Respect Mock spec for attribute names starting with assert (and typos)

  • Issue: Mock spec not respected for attributes prefixed with assert #100739

Sorry, something went wrong.

Uh oh!

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

All reactions
@cklein
cklein requested a review from cjw296 as a code owner January 4, 2023 07:24
@bedevere-bot bedevere-bot added the awaiting review label Jan 4, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jan 4, 2023
Mock spec not respected for attributes prefixed with assert #100739
Closed
@bedevere-bot

bedevere-bot commented Jan 4, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

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

@cklein
cklein force-pushed the allow-spec branch from de7a1ce to 4f9dfef Compare January 4, 2023 08:53
sobolevn
sobolevn reviewed Jan 4, 2023
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2023-01-04-09-53-38.gh-issue-100740.-j5UjI.rst Resolved

Uh oh!

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

Comment thread Lib/test/test_unittest/testmock/testmock.py Resolved

Uh oh!

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

@cklein
cklein force-pushed the allow-spec branch from bbd3410 to 3f201b1 Compare January 4, 2023 10:23
@cklein
cklein requested review from sobolevn and removed request for cjw296 January 4, 2023 10:24
@sobolevn
sobolevn requested review from cjw296 and removed request for sobolevn January 4, 2023 10:28
carljm
carljm reviewed Jan 4, 2023
View reviewed changes
Comment thread Lib/test/test_unittest/testmock/testmock.py Resolved

Uh oh!

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

cklein and others added 2 commits January 4, 2023 21:45
@cklein Christian Klein
Respect mock spec when checking for unsafe prefixes
3e2a2df
@cklein @sobolevn Christian Klein
Update Misc/NEWS.d/next/Library/2023-01-04-09-53-38.gh-issue-100740.-…
f43a0f6
…j5UjI.rst

Co-authored-by: Nikita Sobolev <[email protected]>
@cklein
cklein force-pushed the allow-spec branch from 3f201b1 to f43a0f6 Compare January 4, 2023 20:46
@carljm

carljm commented Jan 4, 2023

Copy link
Copy Markdown
Member

(Note, generally don't ever force-push to a PR, it disrupts incremental review. The commits will be squashed on merge anyway, so there's no harm in having the PR be a series of commits reflecting its development.)

All reactions

Sorry, something went wrong.

Uh oh!

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

carljm
carljm approved these changes Jan 4, 2023
View reviewed changes

@carljm carljm 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.

This LGTM, thanks for the fix!

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Jan 4, 2023
cjw296
cjw296 approved these changes Jan 4, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jan 4, 2023
@cjw296
cjw296 merged commit 7f1eefc into python:main Jan 4, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Jan 4, 2023
@AlexWaygood AlexWaygood added needs backport to 3.10 needs backport to 3.11 only security fixes labels Jan 4, 2023
@miss-islington

miss-islington commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

Thanks @cklein for the PR, and @cjw296 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington

miss-islington commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

Thanks @cklein for the PR, and @cjw296 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Jan 4, 2023

Copy link
Copy Markdown

GH-100760 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 Jan 4, 2023
@bedevere-bot

bedevere-bot commented Jan 4, 2023

Copy link
Copy Markdown

GH-100761 is a backport of this pull request to the 3.10 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.10 label Jan 4, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 4, 2023
@cklein @sobolevn @miss-islington
pythongh-100739: Respect mock spec when checking for unsafe prefixes (p…
9cbfcc8
…ythonGH-100740)

(cherry picked from commit 7f1eefc)

Co-authored-by: Christian Klein <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 4, 2023
@cklein @sobolevn @miss-islington
pythongh-100739: Respect mock spec when checking for unsafe prefixes (p…
f07d620
…ythonGH-100740)

(cherry picked from commit 7f1eefc)

Co-authored-by: Christian Klein <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington added a commit that referenced this pull request Jan 4, 2023
@miss-islington @cklein @sobolevn
gh-100739: Respect mock spec when checking for unsafe prefixes (GH-10…
541e7b8
…0740)

(cherry picked from commit 7f1eefc)

Co-authored-by: Christian Klein <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington added a commit that referenced this pull request Jan 4, 2023
@miss-islington @cklein @sobolevn
gh-100739: Respect mock spec when checking for unsafe prefixes (GH-10…
f49cc3c
…0740)

(cherry picked from commit 7f1eefc)

Co-authored-by: Christian Klein <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
carljm added a commit to carljm/cpython that referenced this pull request Jan 5, 2023
@carljm
Merge branch 'main' into fieldrepr
60aa562
* main:
  pythonGH-100288: Remove LOAD_ATTR_METHOD_WITH_DICT instruction. (pythonGH-100753)
  pythonGH-100766: Note that locale.LC_MESSAGES is not universal (pythonGH-100702)
  Drop myself from pathlib maintenance (python#100757)
  pythongh-100739: Respect mock spec when checking for unsafe prefixes (python#100740)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sobolevn sobolevn sobolevn left review comments
@carljm carljm carljm approved these changes
@cjw296 cjw296 cjw296 approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

@cklein @bedevere-bot @carljm @miss-islington @cjw296 @sobolevn @AlexWaygood
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.