Skip to content

Commit

Permalink
Update CHANGELOG.MD and Pony version: 0.7.14-dev -> 0.7.14
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Nov 23, 2020
1 parent a22c2b2 commit d3310f9
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 112 deletions.
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
# PonyORM release 0.7.14 (2020-11-23)

## 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()


# PonyORM release 0.7.13 (2020-03-03)

This release contains no new features or bugfixes. The only reason for this release is to test our CI/CD process.


# PonyORM release 0.7.12 (2020-02-04)

## Features
Expand All @@ -15,7 +35,7 @@ This release contains no new features or bugfixes. The only reason for this rele
* Fix string getitem translation for slices and negative indexes
* PostgreSQL DISTINCT bug fixed for queries with ORDER BY clause
* Fix date difference syntax in PostgreSQL
* Fix casting json to dobule in PostgreSQL
* Fix casting json to double in PostgreSQL
* Fix count by several columns in PostgreSQL
* Fix PostgreSQL MIN and MAX expressions on boolean columns
* Fix determination of interactive mode in PyCharm
Expand Down Expand Up @@ -105,7 +125,7 @@ This release contains no new features or bugfixes. The only reason for this rele
* #385: test fails with python3.6
* #386: release unlocked lock error in SQLite
* #390: TypeError: writable buffers are not hashable
* #398: add auto coversion of numpy numeric types
* #398: add auto conversion of numpy numeric types
* #404: GAE local run detection
* Fix Flask compatibility: add support of LocalProxy object
* db_session(sql_debug=True) should log SQL commands also during db_session.__exit__()
Expand Down
220 changes: 110 additions & 110 deletions pony/__init__.py
Original file line number Diff line number Diff line change
@@ -1,110 +1,110 @@
from __future__ import absolute_import, print_function

import os, sys, time, threading, random
from os.path import dirname
from itertools import count

__version__ = '0.7.14-dev'

uid = str(random.randint(1, 1000000))

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__)

shutdown = False

shutdown_list = []

def on_shutdown(func):
if func not in shutdown_list: shutdown_list.append(func)
return func

exception_in_main = None # sets to exception instance by use_autoreload()

def exitfunc():
mainloop()
_shutdown()
if sys.platform == 'win32' and MODE == 'CHERRYPY' and exception_in_main:
# If a script is started in Windows by double-clicking
# and a problem occurs, then the following code will
# prevent the console window from closing immediately.
# This only works if use_autoreload() has been called
print('\nPress Enter to exit...')
raw_input()
prev_func()

if MODE in ('INTERACTIVE', 'GAE-SERVER', 'GAE-LOCAL'): pass
elif hasattr(threading, '_shutdown'):
prev_func = threading._shutdown
threading._shutdown = exitfunc
else:
prev_func = sys.exitfunc
sys.exitfunc = exitfunc

mainloop_counter = count()

_do_mainloop = False # sets to True by pony.web.start_http_server()

def mainloop():
if not _do_mainloop: return
if MODE not in ('CHERRYPY', 'FCGI-FLUP'): return
if next(mainloop_counter): return
try:
while True:
if shutdown: break
time.sleep(1)
except:
try: log_exc = logging2.log_exc
except NameError: pass
else: log_exc()

shutdown_counter = count()

def _shutdown():
global shutdown
shutdown = True
if next(shutdown_counter): return
for func in reversed(shutdown_list): func()
from __future__ import absolute_import, print_function

import os, sys, time, threading, random
from os.path import dirname
from itertools import count

__version__ = '0.7.14'

uid = str(random.randint(1, 1000000))

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__)

shutdown = False

shutdown_list = []

def on_shutdown(func):
if func not in shutdown_list: shutdown_list.append(func)
return func

exception_in_main = None # sets to exception instance by use_autoreload()

def exitfunc():
mainloop()
_shutdown()
if sys.platform == 'win32' and MODE == 'CHERRYPY' and exception_in_main:
# If a script is started in Windows by double-clicking
# and a problem occurs, then the following code will
# prevent the console window from closing immediately.
# This only works if use_autoreload() has been called
print('\nPress Enter to exit...')
raw_input()
prev_func()

if MODE in ('INTERACTIVE', 'GAE-SERVER', 'GAE-LOCAL'): pass
elif hasattr(threading, '_shutdown'):
prev_func = threading._shutdown
threading._shutdown = exitfunc
else:
prev_func = sys.exitfunc
sys.exitfunc = exitfunc

mainloop_counter = count()

_do_mainloop = False # sets to True by pony.web.start_http_server()

def mainloop():
if not _do_mainloop: return
if MODE not in ('CHERRYPY', 'FCGI-FLUP'): return
if next(mainloop_counter): return
try:
while True:
if shutdown: break
time.sleep(1)
except:
try: log_exc = logging2.log_exc
except NameError: pass
else: log_exc()

shutdown_counter = count()

def _shutdown():
global shutdown
shutdown = True
if next(shutdown_counter): return
for func in reversed(shutdown_list): func()

0 comments on commit d3310f9

Please sign in to comment.