Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
80a25f8b
Commit
80a25f8b
authored
Oct 04, 2004
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some backward compatibility baggage.
parent
f6ba922d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
29 deletions
+16
-29
lib/python/Testing/ZopeTestCase/ZopeLite.py
lib/python/Testing/ZopeTestCase/ZopeLite.py
+16
-29
No files found.
lib/python/Testing/ZopeTestCase/ZopeLite.py
View file @
80a25f8b
...
...
@@ -42,32 +42,27 @@ def _exec(cmd):
_write
(
'Loading Zope, please stand by '
)
_start
=
time
.
time
()
# Zope 2.7 specifics
try
:
import
App.config
except
ImportError
:
pass
# Zope < 2.7
else
:
# Configure logging
if
not
sys
.
modules
.
has_key
(
'logging'
):
import
logging
logging
.
basicConfig
()
# Need to import Zope early on as the
# ZTUtils package relies on it
config
=
App
.
config
.
getConfiguration
()
config
.
debug_mode
=
0
App
.
config
.
setConfiguration
(
config
)
_exec
(
'import Zope'
)
import
Zope
# Configure logging
if
not
sys
.
modules
.
has_key
(
'logging'
):
import
logging
logging
.
basicConfig
()
# Debug mode is dog slow ...
import
App.config
config
=
App
.
config
.
getConfiguration
()
config
.
debug_mode
=
0
App
.
config
.
setConfiguration
(
config
)
# Need to import Zope early on as the
# ZTUtils package relies on it
_exec
(
'import Zope'
)
import
Zope
_exec
(
'import ZODB'
)
import
ZODB
_write
(
'.'
)
_exec
(
'import Globals'
)
import
Globals
# Work around a bug in Zope 2.7.0
Globals
.
DevelopmentMode
=
0
_exec
(
'import OFS.SimpleItem'
)
import
OFS.SimpleItem
_exec
(
'import OFS.ObjectManager'
)
...
...
@@ -97,11 +92,6 @@ App.ProductContext.ProductContext.registerHelp = _null_register_help
# Make sure to use a temporary client cache
if
os
.
environ
.
get
(
'ZEO_CLIENT'
):
del
os
.
environ
[
'ZEO_CLIENT'
]
# Load Zope (< 2.7)
_exec
(
'import Zope'
)
import
Zope
_write
(
'.'
)
from
OFS.Application
import
get_folder_permissions
,
get_products
,
install_product
from
OFS.Folder
import
Folder
import
Products
...
...
@@ -157,11 +147,8 @@ installProduct('OFSP', 1)
app
=
Zope
.
app
debug
=
Zope
.
debug
DB
=
Zope
.
DB
# startup appeared in Zope 2.6.1
configure
=
Zope
.
configure
def
startup
():
pass
# configure appeared in Zope 2.7
try
:
configure
=
Zope
.
configure
except
AttributeError
:
pass
from
ZODB.DemoStorage
import
DemoStorage
def
sandbox
(
base
=
None
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment