forked from microsoft/Pyjion
-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug in OPT-12 causing incorrect caching of a method address for…
… a global type subclass (#462) * Add sqlalchemy tests to better understand reported bug * Tune warnings * Try bumping load known methods * Roll that opt back * Dont optimize methods for type subclasses * Update release notes
- Loading branch information
1 parent
774b736
commit 93d0447
Showing
10 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ rich | |
pyyaml | ||
numpy | ||
pytest>=6.2.5 | ||
pandas | ||
pandas | ||
sqlalchemy |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import pytest | ||
try: | ||
from sqlalchemy import Column, select, Integer, String, create_engine | ||
from sqlalchemy.orm import declarative_base, Session | ||
|
||
has_lib = True | ||
except ImportError: | ||
has_lib = False | ||
|
||
|
||
@pytest.mark.graph | ||
@pytest.mark.skipif(not has_lib, reason="Missing library") | ||
@pytest.mark.external | ||
def test_base_type(): | ||
# declarative base class | ||
Base = declarative_base() | ||
engine = create_engine('sqlite://') | ||
|
||
class Post(Base): | ||
__tablename__ = 'post' | ||
id = Column(Integer, autoincrement=True, primary_key=True) | ||
name = Column(String) | ||
|
||
# create session and add objects | ||
with Session(engine) as session: | ||
Base.metadata.create_all(engine) | ||
|
||
session.add(Post(name='first post')) | ||
session.add(Post(name='second post')) | ||
session.commit() | ||
|
||
sp = select(Post) | ||
ps = session.execute(select(Post)).scalars().all() | ||
assert len(ps) == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
setup( | ||
name='pyjion', | ||
version='1.2.0', | ||
version='1.2.1', | ||
description='A JIT compiler wrapper for CPython', | ||
author='Anthony Shaw', | ||
author_email='[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters