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

Fix unbound local error when using the fsoids.py script #295

Merged
merged 4 commits into from Sep 23, 2020

Conversation

pbauer
Copy link
Member

@pbauer pbauer commented Mar 2, 2020

Fix issue mentioned in #285 (comment)

Closes #329 (duplicate)

Copy link
Member

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

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

LGTM

(I don't suppose you want to write some unit tests? ;)

@@ -699,7 +699,7 @@ def get_refs(a_pickle):
if isinstance(reference, tuple):
oid, klass = reference
elif isinstance(reference, (bytes, str)):
data, klass = reference, None
oid, klass = reference, None
Copy link
Member

Choose a reason for hiding this comment

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

Split in 2 lines to avoid the tuple packing/unpacking.

Copy link
Member

Choose a reason for hiding this comment

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

But this way it's nicely symmetric with the case above, where reference is a tuple.

@mgedmin
Copy link
Member

mgedmin commented Mar 3, 2020

Python 2.7 fails on Appveyor with syntax errors in mock.

I'm pretty sure this is because Appveyor's default pip is too old to pay attention to python_requires metadata and installs the wrong version of mock.

A python -m pip install -U pip step in appveyor.yml ought to fix things. (Maybe it should be in a separate PR, merged before this one?)

@mgedmin
Copy link
Member

mgedmin commented Mar 3, 2020

A python -m pip install -U pip step in appveyor.yml ought to fix things. (Maybe it should be in a separate PR, merged before this one?)

I should've looked at the appveyor.yml before making assumptions. We already upgrade pip to the latest version.

mock is actually installed by buildout. Suggestion: instead of buildout let's use tox -e py in the appveyor.yml.

jamadden added a commit that referenced this pull request Mar 5, 2020
Fixes issues with zc.buildout and version pins (#295 (comment))
@jamadden jamadden mentioned this pull request Mar 5, 2020
azmeuk pushed a commit to azmeuk/ZODB that referenced this pull request Mar 16, 2020
Fixes issues with zc.buildout and version pins (zopefoundation#295 (comment))
azmeuk pushed a commit to azmeuk/ZODB that referenced this pull request Mar 16, 2020
Fixes issues with zc.buildout and version pins (zopefoundation#295 (comment))
azmeuk pushed a commit to azmeuk/ZODB that referenced this pull request Mar 16, 2020
Fixes issues with zc.buildout and version pins (zopefoundation#295 (comment))
@ale-rt
Copy link
Member

ale-rt commented Sep 22, 2020

I would squash and merge the commits if the build passes

@icemac
Copy link
Member

icemac commented Sep 23, 2020

I restarted the PyPy3 job which had failed. But now it is green. @pbauer Feel free to merge.

@mgedmin mgedmin merged commit fc4c86e into master Sep 23, 2020
@mgedmin mgedmin deleted the fix_UnboundLocalError branch September 23, 2020 06:19
@mgedmin
Copy link
Member

mgedmin commented Sep 23, 2020

Oops my finger slipped and I accidentally did the suggested squash-and-merge!

Thank you everyone!

perrinjerome pushed a commit to perrinjerome/ZODB that referenced this pull request Mar 18, 2021
navytux pushed a commit to navytux/ZODB that referenced this pull request Mar 18, 2021
…foundation#295)

( This is ZODB4 backport of upstream commit fc4c86e )

Co-authored-by: ale-rt <alessandro.pisa@gmail.com>
navytux added a commit to navytux/ZODB that referenced this pull request Mar 18, 2021
* 4-nxd:
  [ZODB4] Fix unbound local error when using the fsoids.py script  (zopefoundation#295)
navytux added a commit that referenced this pull request Mar 29, 2021
Commit fc4c86e (Fix unbound local error when using the fsoids.py script
(#295)) wanted to refer to "issue 285", but put it as "issue 268" into
visible text.
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

5 participants