-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Features * Add Python 3.9 support * Allow to use kwargs in select: Entity.select(**kwargs) and obj.collection.select(**kwargs), a feature that was announced but actually missed from 0.7.7 * Add support for volatile collection attributes that don't throw "Phantom object appeared/disappeared" exceptions # Bugfixes * Fix negative timedelta conversions * Pony should reconnect to PostgreSQL when receiving 57P01 error (AdminShutdown) * Allow mixing compatible types (like int and float) in coalesce() arguments * Support of subqueries in coalesce() arguments * Fix using aggregated subqueries in ORDER BY section * Fix queries with expressions like `(x, y) in ((a, b), (c, d))` * #451: KeyError for seeds with unique attributes in SessionCache.update_simple_index()
- Loading branch information
Showing
2 changed files
with
74 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
from __future__ import absolute_import, print_function | ||
|
||
import os, sys | ||
from os.path import dirname | ||
|
||
__version__ = '0.7.14-dev' | ||
|
||
def detect_mode(): | ||
try: import google.appengine | ||
except ImportError: pass | ||
else: | ||
if os.getenv('SERVER_SOFTWARE', '').startswith('Development'): | ||
return 'GAE-LOCAL' | ||
return 'GAE-SERVER' | ||
|
||
try: from mod_wsgi import version | ||
except: pass | ||
else: return 'MOD_WSGI' | ||
|
||
main = sys.modules['__main__'] | ||
|
||
if not hasattr(main, '__file__'): # console | ||
return 'INTERACTIVE' | ||
|
||
if os.getenv('IPYTHONENABLE', '') == 'True': | ||
return 'INTERACTIVE' | ||
|
||
if getattr(main, 'INTERACTIVE_MODE_AVAILABLE', False): # pycharm console | ||
return 'INTERACTIVE' | ||
|
||
if 'flup.server.fcgi' in sys.modules: return 'FCGI-FLUP' | ||
if 'uwsgi' in sys.modules: return 'UWSGI' | ||
if 'flask' in sys.modules: return 'FLASK' | ||
if 'cherrypy' in sys.modules: return 'CHERRYPY' | ||
if 'bottle' in sys.modules: return 'BOTTLE' | ||
return 'UNKNOWN' | ||
|
||
MODE = detect_mode() | ||
|
||
MAIN_FILE = None | ||
if MODE == 'MOD_WSGI': | ||
for module_name, module in sys.modules.items(): | ||
if module_name.startswith('_mod_wsgi_'): | ||
MAIN_FILE = module.__file__ | ||
break | ||
elif MODE != 'INTERACTIVE': | ||
MAIN_FILE = sys.modules['__main__'].__file__ | ||
|
||
if MAIN_FILE is not None: MAIN_DIR = dirname(MAIN_FILE) | ||
else: MAIN_DIR = None | ||
|
||
PONY_DIR = dirname(__file__) | ||
from __future__ import absolute_import, print_function | ||
|
||
import os, sys | ||
from os.path import dirname | ||
|
||
__version__ = '0.7.14' | ||
|
||
def detect_mode(): | ||
try: import google.appengine | ||
except ImportError: pass | ||
else: | ||
if os.getenv('SERVER_SOFTWARE', '').startswith('Development'): | ||
return 'GAE-LOCAL' | ||
return 'GAE-SERVER' | ||
|
||
try: from mod_wsgi import version | ||
except: pass | ||
else: return 'MOD_WSGI' | ||
|
||
main = sys.modules['__main__'] | ||
|
||
if not hasattr(main, '__file__'): # console | ||
return 'INTERACTIVE' | ||
|
||
if os.getenv('IPYTHONENABLE', '') == 'True': | ||
return 'INTERACTIVE' | ||
|
||
if getattr(main, 'INTERACTIVE_MODE_AVAILABLE', False): # pycharm console | ||
return 'INTERACTIVE' | ||
|
||
if 'flup.server.fcgi' in sys.modules: return 'FCGI-FLUP' | ||
if 'uwsgi' in sys.modules: return 'UWSGI' | ||
if 'flask' in sys.modules: return 'FLASK' | ||
if 'cherrypy' in sys.modules: return 'CHERRYPY' | ||
if 'bottle' in sys.modules: return 'BOTTLE' | ||
return 'UNKNOWN' | ||
|
||
MODE = detect_mode() | ||
|
||
MAIN_FILE = None | ||
if MODE == 'MOD_WSGI': | ||
for module_name, module in sys.modules.items(): | ||
if module_name.startswith('_mod_wsgi_'): | ||
MAIN_FILE = module.__file__ | ||
break | ||
elif MODE != 'INTERACTIVE': | ||
MAIN_FILE = sys.modules['__main__'].__file__ | ||
|
||
if MAIN_FILE is not None: MAIN_DIR = dirname(MAIN_FILE) | ||
else: MAIN_DIR = None | ||
|
||
PONY_DIR = dirname(__file__) |