Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
erp5
Commits
eeb590a4
Commit
eeb590a4
authored
Mar 08, 2023
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Zope2: revive patches for Zope2.
parent
fa423199
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
product/ERP5Type/__init__.py
product/ERP5Type/__init__.py
+5
-6
product/ERP5Type/patches/pylint.py
product/ERP5Type/patches/pylint.py
+20
-0
No files found.
product/ERP5Type/__init__.py
View file @
eeb590a4
...
@@ -33,6 +33,11 @@
...
@@ -33,6 +33,11 @@
from
__future__
import
absolute_import
from
__future__
import
absolute_import
from
App.config
import
getConfiguration
from
App.config
import
getConfiguration
from
.patches
import
python
,
globalrequest
,
Pandas
from
.patches
import
python
,
globalrequest
,
Pandas
from
App.version_txt
import
getZopeVersion
if
getZopeVersion
()[
0
]
==
2
:
# BBB Zope2
IS_ZOPE2
=
True
else
:
IS_ZOPE2
=
False
import
six
import
six
if
six
.
PY2
:
if
six
.
PY2
:
from
.patches
import
pylint
from
.patches
import
pylint
...
@@ -45,12 +50,6 @@ if six.PY3:
...
@@ -45,12 +50,6 @@ if six.PY3:
else
:
else
:
WITH_LEGACY_WORKFLOW
=
True
WITH_LEGACY_WORKFLOW
=
True
from
App.version_txt
import
getZopeVersion
if
getZopeVersion
()[
0
]
==
2
:
# BBB Zope2
IS_ZOPE2
=
True
else
:
IS_ZOPE2
=
False
# We have a name conflict with source_reference and destination_reference,
# We have a name conflict with source_reference and destination_reference,
# which are at the same time property accessors for 'source_reference'
# which are at the same time property accessors for 'source_reference'
# property, and category accessors (similar to getSourceValue().getReference())
# property, and category accessors (similar to getSourceValue().getReference())
...
...
product/ERP5Type/patches/pylint.py
View file @
eeb590a4
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
from
__future__
import
absolute_import
from
__future__
import
absolute_import
import
sys
import
sys
from
Products.ERP5Type
import
IS_ZOPE2
# TODO: make sure that trying to use it does not import isort, because the
# TODO: make sure that trying to use it does not import isort, because the
# latter hacks Python in order to execute:
# latter hacks Python in order to execute:
...
@@ -439,6 +440,25 @@ def fail_hook_BTrees(modname):
...
@@ -439,6 +440,25 @@ def fail_hook_BTrees(modname):
return astng
return astng
MANAGER.register_failed_import_hook(fail_hook_BTrees)
MANAGER.register_failed_import_hook(fail_hook_BTrees)
if IS_ZOPE2: # BBB Zope2
# No name '
OOBTree
' in module '
BTrees
.
OOBTree
' (no-name-in-module)
# Unable to import '
BTrees
.
OOBTree
' (import-error)
#
# When the corresponding C Extension (BTrees._Foo) is available, update
# BTrees.Foo namespace from the C extension, otherwise use Python definitions
# by dropping the `Py` suffix in BTrees.Foo symbols.
import BTrees
for module_name, module in inspect.getmembers(BTrees, inspect.ismodule):
if module_name[0] != '
_
':
continue
try:
extended_module = BTrees.__dict__[module_name[1:]]
except KeyError:
continue
else:
_register_module_extender_from_live_module(extended_module.__name__,
module)
# No name '
ElementMaker
' in module '
lxml
.
builder
' (no-name-in-module)
# No name '
ElementMaker
' in module '
lxml
.
builder
' (no-name-in-module)
#
#
# imp.load_dynamic() on .so file
# imp.load_dynamic() on .so file
...
...
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