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 — [3.8] bpo-39562: Prevent collision of future and compiler flags (GH-19230) by pablogsal · Pull Request #19835 · python/cpython

Conversation

@pablogsal

@pablogsal pablogsal commented May 1, 2020 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

The constant values of future flags in the future module
is updated in order to prevent collision with compiler flags.
Previously PyCF_ALLOW_TOP_LEVEL_AWAIT was clashing
with CO_FUTURE_DIVISION..
(cherry picked from commit 4454057)

Co-authored-by: Batuhan Taşkaya [email protected]

https://bugs.python.org/issue39562

Sorry, something went wrong.

Uh oh!

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

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 1, 2020
@bedevere-bot bedevere-bot mentioned this pull request May 1, 2020
bpo-39562: Prevent collision of future and compiler flags #19230
Merged
@bedevere-bot bedevere-bot added the skip news label May 1, 2020
@pablogsal
pablogsal requested a review from vstinner May 1, 2020 11:42
@bedevere-bot bedevere-bot added the awaiting core review label May 1, 2020
@pablogsal

pablogsal commented May 1, 2020

Copy link
Copy Markdown
Member Author

We need to still maybe add a better way to document this? @vstinner Where would you like for the documentation for this change to live?

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented May 1, 2020

Copy link
Copy Markdown
Member

We need to still maybe add a better way to document this? @vstinner Where would you like for the documentation for this change to live?

Can you at least backport the NEWS entry?

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner
vstinner approved these changes May 1, 2020
View reviewed changes

@vstinner vstinner 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 if you add the NEWS entry.

I tested manually: this change does fix https://bugs.python.org/issue39562#msg365311

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 core review labels May 1, 2020
@vstinner

vstinner commented May 1, 2020

Copy link
Copy Markdown
Member

We need to still maybe add a better way to document this? @vstinner Where would you like for the documentation for this change to live?

One option is to add a "Notable changes in Python 3.8.3" section since the change is backward incompatible. Something like:
https://docs.python.org/dev/whatsnew/3.8.html#notable-changes-in-python-3-8-1

But it's up to you to decide if it's worth it or not. The 3.9 change is documented in What's New in Python 3.9, in the "Porting to Python 3.9" section:
https://docs.python.org/dev/whatsnew/3.9.html#changes-in-the-python-api

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal

pablogsal commented May 1, 2020

Copy link
Copy Markdown
Member Author

Oh, seems like @isidentical used the new | operator on dict:

======================================================================
ERROR: test_ensure_flags_dont_clash (test.test_future.FutureTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_future.py", line 88, in test_ensure_flags_dont_clash
    flags |= {
TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'
----------------------------------------------------------------------

I will update the PR soon to solve this and with @vstinner suggestions

All reactions

Sorry, something went wrong.

Uh oh!

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

@isidentical @pablogsal
[3.8] bpo-39562: Prevent collision of future and compiler flags (pyth…
5131901
…onGH-19230)

The constant values of future flags in the __future__ module
is updated in order to prevent collision with compiler flags.
Previously PyCF_ALLOW_TOP_LEVEL_AWAIT was clashing
with CO_FUTURE_DIVISION..
(cherry picked from commit 4454057)

Co-authored-by: Batuhan Taşkaya <[email protected]>
@pablogsal
pablogsal force-pushed the backport-4454057-3.8 branch from 8112c50 to 5131901 Compare May 1, 2020 13:59
@pablogsal pablogsal added the 🤖 automerge label May 1, 2020
@miss-islington

miss-islington commented May 1, 2020

Copy link
Copy Markdown
Contributor

@pablogsal: Status check is done, and it's a success ✅ .

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington
miss-islington merged commit 5055c27 into python:3.8 May 1, 2020
@bedevere-bot bedevere-bot removed the awaiting merge label May 1, 2020
@pablogsal
pablogsal deleted the backport-4454057-3.8 branch May 19, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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.

6 participants

@pablogsal @vstinner @miss-islington @the-knights-who-say-ni @bedevere-bot @isidentical
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.