-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature python3 #105
base: master
Are you sure you want to change the base?
Feature python3 #105
Conversation
…atic_history Desactivate git patch and static history
(#MOBI-4403) revamp log system
(#MOBI-4403) fix import
…json_export (#MOBI-5212) improve newjsonencoder + fix Empty element closing
Mobi migrate to glass backend
psutils used in ikaaro, not itools
This fixes an error in ikaaro's test/test_metadata.py
As far as itools.datatypes is concerned, we don't have to deal with bytes anymore, because in Python 3 we're getting unicode strings (itools.datatypes is only used for text files). We still have the String and Unicode datatypes, where the behaviour of Unicode has not changed. The difference between them is: - String.default is None, Unicode.default is the empty string - The catalog will index a String field as is, but will split a Unicode field in words. What has changed spicifically is that now String decodes/encodes from/to str instead of bytes.
Thank's a lot for the works ! I will take time to read/merge/improve the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some comments, i will check all theses points.
for name, info in self._metadata.iteritems(): | ||
try: | ||
self._metadata = loads(metadata) | ||
except ValueError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will see if we can do better.
itools/database/registry.py
Outdated
raise ValueError(msg.format(name, key)) | ||
pass | ||
#### Python 3 pass error | ||
#raise ValueError(msg.format(name, key)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will see for better solution
os_remove(path) | ||
except OSError as error: | ||
print(error) | ||
print("File path can not be removed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ?
def to_str(self, encoding='utf-8'): | ||
return self.data.encode(encoding) | ||
# XXX self.data should always be unicode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to test it
from itools.core import get_abspath | ||
from itools.pkg import setup as itools_setup | ||
from itools.pkg.utils import setup as itools_setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should fix it.
else: | ||
sources = ['itools/office/doctotext.cc'] | ||
extension = Extension('itools.office.doctotext', sources, **flags) | ||
ext_modules.append(extension) | ||
|
||
# if sys.version_info[0] == 3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REMOVE
cls.internal_server_error(context) | ||
|
||
# Cookies for authentification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check where it's done now ?
|
||
class JWTExpiredException(TokenAuthorizationException): | ||
|
||
message = MSG("Jeton expiré") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in english
@@ -125,6 +125,7 @@ def git_describe(self): | |||
return None | |||
|
|||
# Parse | |||
print(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME
@@ -40,13 +40,17 @@ def get_start_tag(value): | |||
qname = get_attribute_qname(attr_uri, attr_name) | |||
value = XMLAttribute.encode(value) | |||
s += ' %s="%s"' % (qname, value) | |||
# Close the start tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check why it was missing
code review