Philipp Hörist pushed to branch master at gajim / gajim
Commits:
bf87ad5a by Philipp Hörist at 2018-10-06T20:38:55Z
Import _() instead of using builtin namespace
- Prepare for removing the global installed _() method in builtins
- Sort some imports along the way
- - - - -
ad4e1258 by Philipp Hörist at 2018-10-06T20:44:26Z
Improve finding locale dir
- Dont install _() globally, although its elegant mypy cant deal with it
- If gettext cant find the translation itself, iter through all dirs and search for it
- - - - -
30 changed files:
- gajim/adhoc_commands.py
- gajim/application.py
- gajim/atom_window.py
- gajim/chat_control.py
- gajim/chat_control_base.py
- gajim/common/connection.py
- gajim/common/connection_handlers_events.py
- gajim/common/exceptions.py
- gajim/common/i18n.py
- gajim/common/jingle_rtp.py
- gajim/common/logger.py
- gajim/common/logging_helpers.py
- gajim/common/modules/httpupload.py
- gajim/common/modules/message.py
- gajim/common/modules/presence.py
- gajim/common/modules/roster_item_exchange.py
- gajim/common/multimedia_helpers.py
- gajim/common/optparser.py
- gajim/common/zeroconf/connection_handlers_zeroconf.py
- gajim/common/zeroconf/connection_zeroconf.py
- gajim/common/zeroconf/zeroconf_avahi.py
- gajim/common/zeroconf/zeroconf_bonjour.py
- gajim/config.py
- gajim/conversation_textview.py
- gajim/dataforms_widget.py
- gajim/filetransfers_window.py
- gajim/groupchat_control.py
- gajim/gtk/about.py
- gajim/gtk/account_wizard.py
- gajim/gtk/accounts.py
The diff was not included because it is too large.
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/990a35f9d847504a081b0ede7f7a9037e…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/990a35f9d847504a081b0ede7f7a9037e…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
e8c5ad64 by Philipp Hörist at 2018-10-05T20:42:36Z
Better determine when we fully joined a muc
- - - - -
1e933c26 by Philipp Hörist at 2018-10-05T21:21:50Z
Dont show MUC subject on rejoin
- We only show it, if it changed
- - - - -
dbd25c59 by Philipp Hörist at 2018-10-05T21:47:59Z
Fix textview sorting
- - - - -
259f5e36 by Philipp Hörist at 2018-10-05T21:57:54Z
MUC: Show timestamp also for info messages
- - - - -
fd232ce6 by Philipp Hörist at 2018-10-05T22:01:07Z
MUC: Show info message that we joined the room
- - - - -
990a35f9 by Philipp Hörist at 2018-10-05T22:35:24Z
MUC: Add option for showing the subject on join
- - - - -
5 changed files:
- gajim/common/config.py
- gajim/conversation_textview.py
- gajim/data/gui/preferences_window.ui
- gajim/groupchat_control.py
- gajim/gtk/preferences.py
Changes:
=====================================
gajim/common/config.py
=====================================
@@ -296,6 +296,7 @@ class Config:
'threshold_options': [opt_str, '1, 2, 4, 10, 0', _('Options in days which can be chosen in the sync threshold menu'), True],
'public_room_sync_threshold': [opt_int, 1, _('Maximum history in days we request from a public room archive. 0: As much as possible')],
'private_room_sync_threshold': [opt_int, 0, _('Maximum history in days we request from a private room archive. 0: As much as possible')],
+ 'show_subject_on_join': [opt_bool, True, _('If the room subject is shown in chat on join')],
}, {}) # type: Tuple[Dict[str, List[Any]], Dict[Any, Any]]
__options_per_key = {
=====================================
gajim/conversation_textview.py
=====================================
@@ -1072,7 +1072,7 @@ class ConversationTextview(GObject.GObject):
new_mark = buffer_.create_mark(
str(self.line), temp_iter, left_gravity=False)
- if not index:
+ if index is None:
# New Message
self.message_list.append((tim, new_mark, msg_stanza_id))
elif corrected:
@@ -1186,7 +1186,7 @@ class ConversationTextview(GObject.GObject):
buffer_ = self.tv.get_buffer()
current_print_time = app.config.get('print_time')
- if current_print_time == 'always' and kind != 'info' and not simple:
+ if current_print_time == 'always' and not simple:
timestamp_str = self.get_time_to_show(local_tim, direction_mark)
timestamp = time.strftime(timestamp_str, local_tim)
timestamp = direction_mark + timestamp + direction_mark
@@ -1195,7 +1195,7 @@ class ConversationTextview(GObject.GObject):
*other_tags_for_time)
else:
buffer_.insert(iter_, timestamp)
- elif current_print_time == 'sometimes' and kind != 'info' and not simple:
+ elif current_print_time == 'sometimes' and not simple:
every_foo_seconds = 60 * app.config.get(
'print_ichat_every_foo_minutes')
seconds_passed = tim - self.last_time_printout
=====================================
gajim/data/gui/preferences_window.ui
=====================================
@@ -401,7 +401,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
<property name="width">2</property>
</packing>
</child>
@@ -498,6 +498,21 @@
<property name="width">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="subject_on_join">
+ <property name="label" translatable="yes">Show subject after joining a group chat</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_subject_on_join_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
</object>
</child>
<child type="label">
=====================================
gajim/groupchat_control.py
=====================================
@@ -297,6 +297,7 @@ class GroupchatControl(ChatControlBase):
self.force_non_minimizable = False
self.is_continued = is_continued
self.is_anonymous = True
+ self.join_time = 0
# Controls the state of autorejoin.
# None - autorejoin is neutral.
@@ -370,7 +371,6 @@ class GroupchatControl(ChatControlBase):
# sorted list of nicks who mentioned us (last at the end)
self.attention_list = []
- self.room_creation = int(time.time()) # Use int to reduce mem usage
self.nick_hits = []
self.last_key_tabs = False
@@ -1536,6 +1536,9 @@ class GroupchatControl(ChatControlBase):
return
if event.jid != self.room_jid:
return
+ if self.subject == event.subject:
+ # Probably a rejoin, we already showed that subject
+ return
self.set_subject(event.subject)
text = _('%(nick)s has set the subject to %(subject)s') % {
'nick': event.nickname, 'subject': event.subject}
@@ -1544,7 +1547,10 @@ class GroupchatControl(ChatControlBase):
date = time.strftime('%d-%m-%Y %H:%M:%S',
time.localtime(event.timestamp))
text = '%s - %s' % (text, date)
- self.print_conversation(text)
+
+ just_joined = self.join_time > time.time() - 10
+ if app.config.get('show_subject_on_join') or not just_joined:
+ self.print_conversation(text)
if event.subject == '':
self.subject_button.hide()
@@ -1641,6 +1647,7 @@ class GroupchatControl(ChatControlBase):
app.gc_connected[self.account][self.room_jid] = value
def got_connected(self):
+ self.join_time = time.time()
# Make autorejoin stop.
if self.autorejoin:
GLib.source_remove(self.autorejoin)
@@ -1851,6 +1858,9 @@ class GroupchatControl(ChatControlBase):
if obj.status_code and obj.nick == self.nick:
if '110' in obj.status_code:
# We just join the room
+ self.print_conversation(
+ _('You (%s) joined the room') % self.nick,
+ 'info', graphics=False)
if self.room_jid in app.automatic_rooms[self.account] and \
app.automatic_rooms[self.account][self.room_jid]['invities']:
if self.room_jid not in app.interface.instances[
@@ -2056,7 +2066,7 @@ class GroupchatControl(ChatControlBase):
gc_c.affiliation = affiliation
gc_c.status = obj.status
self.draw_contact(obj.nick)
- if (time.time() - self.room_creation) > 30 and obj.nick != self.nick \
+ if self.is_connected and obj.nick != self.nick \
and (not obj.status_code or '303' not in obj.status_code) and not \
right_changed:
st = ''
=====================================
gajim/gtk/preferences.py
=====================================
@@ -142,6 +142,9 @@ class Preferences(Gtk.ApplicationWindow):
st = app.config.get('positive_184_ack')
self.xml.get_object('positive_184_ack_checkbutton').set_active(st)
+ st = app.config.get('show_subject_on_join')
+ self.xml.get_object('subject_on_join').set_active(st)
+
# Show avatar in tabs
st = app.config.get('show_avatar_in_tabs')
self.xml.get_object('show_avatar_in_tabs_checkbutton').set_active(st)
@@ -500,6 +503,9 @@ class Preferences(Gtk.ApplicationWindow):
return 'mixed'
return val
+ def on_subject_on_join_toggled(self, widget):
+ app.config.set('show_subject_on_join', widget.get_active())
+
def on_checkbutton_toggled(self, widget, config_name,
change_sensitivity_widgets=None):
app.config.set(config_name, widget.get_active())
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/b049746418a114b2c3fce7c165943f57f…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/b049746418a114b2c3fce7c165943f57f…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
b0497464 by Philipp Hörist at 2018-10-05T20:34:06Z
MUC: Make print_status affect the 333 status code
- - - - -
1 changed file:
- gajim/groupchat_control.py
Changes:
=====================================
gajim/groupchat_control.py
=====================================
@@ -1837,6 +1837,14 @@ class GroupchatControl(ChatControlBase):
simple_jid = app.get_jid_without_resource(obj.real_jid)
nick_jid += ' (%s)' % simple_jid
+ con = app.connections[self.account]
+ bookmarks = con.get_module('Bookmarks').bookmarks
+ bookmark = bookmarks.get(self.room_jid, None)
+ if bookmark is None or not bookmark['print_status']:
+ print_status = app.config.get('print_status_in_muc')
+ else:
+ print_status = bookmark['print_status']
+
# status_code
# http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-\
# init
@@ -1884,13 +1892,14 @@ class GroupchatControl(ChatControlBase):
if obj.status_code:
if '333' in obj.status_code:
# Handle 333 before 307, some MUCs add both
- if obj.nick == self.nick:
- s = _('%s kicked us due to an error' % self.room_jid)
- else:
- s = _('%s has left due to an error' % nick)
- if obj.reason:
- s += ' (%s)' % obj.reason
- self.print_conversation(s, 'info', graphics=False)
+ if print_status != 'none':
+ if obj.nick == self.nick:
+ s = _('%s kicked us due to an error' % self.room_jid)
+ else:
+ s = _('%s has left due to an error' % nick)
+ if obj.reason:
+ s += ' (%s)' % obj.reason
+ self.print_conversation(s, 'info', graphics=False)
elif '307' in obj.status_code:
if obj.actor is None: # do not print 'kicked by None'
s = _('%(nick)s has been kicked: %(reason)s') % {
@@ -2051,13 +2060,6 @@ class GroupchatControl(ChatControlBase):
and (not obj.status_code or '303' not in obj.status_code) and not \
right_changed:
st = ''
- con = app.connections[self.account]
- bookmarks = con.get_module('Bookmarks').bookmarks
- bookmark = bookmarks.get(self.room_jid, None)
- if bookmark is None or not bookmark['print_status']:
- print_status = app.config.get('print_status_in_muc')
- else:
- print_status = bookmark['print_status']
if obj.show == 'offline':
if obj.nick in self.attention_list:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b049746418a114b2c3fce7c165943f57fc…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b049746418a114b2c3fce7c165943f57fc…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
4f1a3a32 by Philipp Hörist at 2018-10-05T19:25:15Z
Fix resume after sm timeout
Fixes #9364
- - - - -
1 changed file:
- gajim/common/connection.py
Changes:
=====================================
gajim/common/connection.py
=====================================
@@ -715,9 +715,20 @@ class Connection(CommonConnection, ConnectionHandlers):
title=_('Connection with account "%s" has been lost') % self.name,
msg=_('Reconnect manually.')))
+ def _on_resume_failed(self):
+ # SM resume failed, set all MUCs offline
+ # and lose the presence state of all contacts
+ app.nec.push_incoming_event(OurShowEvent(
+ None, conn=self, show='offline'))
+
def _event_dispatcher(self, realm, event, data):
CommonConnection._event_dispatcher(self, realm, event, data)
- if realm == nbxmpp.NS_REGISTER:
+ if realm == nbxmpp.NS_STREAM_MGMT:
+ if event == 'RESUME FAILED':
+ log.info('Resume failed')
+ self._on_resume_failed()
+
+ elif realm == nbxmpp.NS_REGISTER:
if event == nbxmpp.features_nb.REGISTER_DATA_RECEIVED:
# data is (agent, DataFrom, is_form, error_msg)
if self.new_account_info and \
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4f1a3a32c5c5d8f56c3126fca95f3fcc2d…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4f1a3a32c5c5d8f56c3126fca95f3fcc2d…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
1a673eb7 by Philipp Hörist at 2018-10-05T18:30:03Z
Issue event when sm resume fails
- - - - -
1 changed file:
- nbxmpp/smacks.py
Changes:
=====================================
nbxmpp/smacks.py
=====================================
@@ -191,6 +191,7 @@ class Smacks(object):
self.enabled = False
# we need to bind a resource
self._owner.NonBlockingBind.resuming = False
+ self._owner.Dispatcher.Event(NS_STREAM_MGMT, 'RESUME FAILED', None)
self._owner._on_auth_bind(None)
self.failed_resume = True
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/1a673eb718a475c2d50745e612…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/1a673eb718a475c2d50745e612…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
84ba852a by Philipp Hörist at 2018-10-05T13:05:06Z
Dont return None on has_mam()
Fixes #9368
- - - - -
1 changed file:
- gajim/common/caps_cache.py
Changes:
=====================================
gajim/common/caps_cache.py
=====================================
@@ -470,6 +470,7 @@ class MucCapsCache:
return True
if nbxmpp.NS_MAM_1 in self.cache[jid].features:
return True
+ return False
except (KeyError, AttributeError):
return False
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/84ba852a972ba647a216840f7fbf54d285…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/84ba852a972ba647a216840f7fbf54d285…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
49deb63e by Philipp Hörist at 2018-10-04T15:48:36Z
Add .pylintrc
- - - - -
1 changed file:
- + .pylintrc
Changes:
=====================================
.pylintrc
=====================================
@@ -0,0 +1,410 @@
+[MASTER]
+
+# A comma-separated list of package or module names from where C extensions may
+# be loaded. Extensions are loading into the active Python interpreter and may
+# run arbitrary code
+extension-pkg-whitelist=pycurl
+
+# Add files or directories to the blacklist. They should be base names, not
+# paths.
+ignore=CVS
+
+# Add files or directories matching the regex patterns to the blacklist. The
+# regex matches against base names, not paths.
+ignore-patterns=
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Use multiple processes to speed up Pylint.
+jobs=2
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# Specify a configuration file.
+#rcfile=
+
+# Allow loading of arbitrary C extensions. Extensions are imported into the
+# active Python interpreter and may run arbitrary code.
+unsafe-load-any-extension=no
+
+
+[MESSAGES CONTROL]
+
+# Only show warnings with the listed confidence levels. Leave empty to show
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
+confidence=
+
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifiers separated by comma (,) or put this
+# option multiple times (only on the command line, not in the configuration
+# file where it should appear only once).You can also use "--disable=all" to
+# disable everything first and then reenable specific checks. For example, if
+# you want to run only the similarities checker, you can use "--disable=all
+# --enable=similarities". If you want to run only the classes checker, but have
+# no Warning level messages displayed, use"--disable=all --enable=classes
+# --disable=W"
+disable=C0111,C0301,R1710,R0912,R0914,R0915,W0511,W0231,W0233
+
+# Enable the message, report, category or checker with the given id(s). You can
+# either give multiple identifier separated by comma (,) or put this option
+# multiple time (only on the command line, not in the configuration file where
+# it should appear only once). See also the "--disable" option for examples.
+enable=
+
+
+[REPORTS]
+
+# Python expression which should return a note less than 10 (10 is the highest
+# note). You have access to the variables errors warning, statement which
+# respectively contain the number of errors / warnings messages and the total
+# number of statements analyzed. This is used by the global evaluation report
+# (RP0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Template used to display messages. This is a python new-style format string
+# used to format the message information. See doc for all details
+#msg-template=
+
+# Set the output format. Available formats are text, parseable, colorized, json
+# and msvs (visual studio).You can also give a reporter class, eg
+# mypackage.mymodule.MyReporterClass.
+output-format=text
+
+# Tells whether to display a full report or only the messages
+reports=no
+
+# Activate the evaluation score.
+score=yes
+
+
+[REFACTORING]
+
+# Maximum number of nested blocks for function / method body
+max-nested-blocks=5
+
+
+[VARIABLES]
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=_
+
+# Tells whether unused global variables should be treated as a violation.
+allow-global-unused-variables=yes
+
+# List of strings which can identify a callback function by name. A callback
+# name must start or end with one of those strings.
+callbacks=cb_,_cb
+
+# A regular expression matching the name of dummy variables (i.e. expectedly
+# not used).
+dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy
+
+# Argument names that match this expression will be ignored. Default to name
+# with leading underscore
+ignored-argument-names=(_.*|kwargs|args)
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
+
+# List of qualified module names which can have objects that can redefine
+# builtins.
+redefining-builtins-modules=six.moves,future.builtins
+
+
+[TYPECHECK]
+
+# List of decorators that produce context managers, such as
+# contextlib.contextmanager. Add to this list to register other decorators that
+# produce valid context managers.
+contextmanager-decorators=contextlib.contextmanager
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E1101 when accessed. Python regular
+# expressions are accepted.
+generated-members=
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# List of class names for which member attributes should not be checked (useful
+# for classes with dynamically set attributes). This supports the use of
+# qualified names.
+ignored-classes=optparse.Values,thread._local,_thread._local
+
+# List of module names for which member attributes should not be checked
+# (useful for modules/projects where namespaces are manipulated during runtime
+# and thus existing member attributes cannot be deduced by static analysis. It
+# supports qualified module names, as well as Unix pattern matching.
+ignored-modules=
+
+# Show a hint with possible names when a member name was not found. The aspect
+# of finding the hint is based on edit distance.
+missing-member-hint=yes
+
+# The minimum edit distance a name should have in order to be considered a
+# similar match for a missing member name.
+missing-member-hint-distance=1
+
+# The total number of similar names that should be taken in consideration when
+# showing a hint for a missing member.
+missing-member-max-choices=1
+
+
+[SPELLING]
+
+# Spelling dictionary name. Available dictionaries: none. To make it working
+# install python-enchant package.
+spelling-dict=
+
+# List of comma separated words that should not be checked.
+spelling-ignore-words=
+
+# A path to a file that contains private dictionary; one word per line.
+spelling-private-dict-file=
+
+# Tells whether to store unknown words to indicated private dictionary in
+# --spelling-private-dict-file option instead of raising a message.
+spelling-store-unknown-words=no
+
+
+[SIMILARITIES]
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
+
+# Ignore imports when computing similarities.
+ignore-imports=no
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,XXX,TODO
+
+
+[LOGGING]
+
+# Logging modules to check that the string format arguments are in logging
+# function parameter format
+logging-modules=logging
+
+
+[FORMAT]
+
+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
+expected-line-ending-format=
+
+# Regexp for a line that is allowed to be longer than the limit.
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
+
+# Number of spaces of indent required inside a hanging or continued line.
+indent-after-paren=4
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string=' '
+
+# Maximum number of characters on a single line.
+max-line-length=100
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# List of optional constructs for which whitespace checking is disabled. `dict-
+# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
+# `trailing-comma` allows a space between comma and closing bracket: (a, ).
+# `empty-line` allows space-only lines.
+no-space-check=trailing-comma,dict-separator
+
+# Allow the body of an if to be on the same line as the test if there is no
+# else.
+single-line-if-stmt=no
+
+
+[BASIC]
+
+# Naming hint for argument names
+argument-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
+
+# Regular expression matching correct argument names
+argument-rgx=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
+
+# Naming hint for attribute names
+attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
+
+# Regular expression matching correct attribute names
+attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
+
+# Bad variable names which should always be refused, separated by a comma
+bad-names=foo,bar,baz,toto,tutu,tata
+
+# Naming hint for class attribute names
+class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
+
+# Regular expression matching correct class attribute names
+class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
+
+# Naming hint for class names
+class-name-hint=[A-Z_][a-zA-Z0-9]+$
+
+# Regular expression matching correct class names
+class-rgx=[A-Z_][a-zA-Z0-9]+$
+
+# Naming hint for constant names
+const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
+
+# Regular expression matching correct constant names
+const-rgx=
+
+# Minimum line length for functions/classes that require docstrings, shorter
+# ones are exempt.
+docstring-min-length=-1
+
+# Naming hint for function names
+function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
+
+# Regular expression matching correct function names
+function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
+
+# Good variable names which should always be accepted, separated by a comma
+good-names=i,j,k,ex,Run,_,iq
+
+# Include a hint for the correct naming format with invalid-name
+include-naming-hint=no
+
+# Naming hint for inline iteration names
+inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
+
+# Regular expression matching correct inline iteration names
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
+
+# Naming hint for method names
+method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
+
+# Regular expression matching correct method names
+method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
+
+# Naming hint for module names
+module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Regular expression matching correct module names
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Colon-delimited sets of names that determine each other's naming style when
+# the name regexes allow several styles.
+name-group=
+
+# Regular expression which should only match function or class names that do
+# not require a docstring.
+no-docstring-rgx=^_
+
+# List of decorators that produce properties, such as abc.abstractproperty. Add
+# to this list to register other decorators that produce valid properties.
+property-classes=abc.abstractproperty
+
+# Naming hint for variable names
+variable-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
+
+# Regular expression matching correct variable names
+variable-rgx=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
+
+
+[IMPORTS]
+
+# Analyse import fallback blocks. This can be used to support both Python 2 and
+# 3 compatible code, which means that the block might have code that exists
+# only in one or another interpreter, leading to false positives when analysed.
+analyse-fallback-blocks=no
+
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=optparse,tkinter.tix
+
+# Create a graph of external dependencies in the given file (report RP0402 must
+# not be disabled)
+ext-import-graph=
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report RP0402 must not be disabled)
+import-graph=
+
+# Create a graph of internal dependencies in the given file (report RP0402 must
+# not be disabled)
+int-import-graph=
+
+# Force import order to recognize a module as part of the standard
+# compatibility libraries.
+known-standard-library=
+
+# Force import order to recognize a module as part of a third party library.
+known-third-party=enchant
+
+
+[DESIGN]
+
+# Maximum number of arguments for function / method
+max-args=10
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=9999
+
+# Maximum number of boolean expressions in a if statement
+max-bool-expr=5
+
+# Maximum number of branch for function / method body
+max-branches=12
+
+# Maximum number of locals for function / method body
+max-locals=15
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+# Maximum number of return / yield for function / method body
+max-returns=100
+
+# Maximum number of statements in function / method body
+max-statements=50
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=0
+
+
+[CLASSES]
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,__new__,setUp
+
+# List of member names, which should be excluded from the protected access
+# warning.
+exclude-protected=_asdict,_fields,_replace,_source,_make
+
+# List of valid names for the first argument in a class method.
+valid-classmethod-first-arg=cls
+
+# List of valid names for the first argument in a metaclass class method.
+valid-metaclass-classmethod-first-arg=mcs
+
+
+[EXCEPTIONS]
+
+# Exceptions that will emit a warning when being caught. Defaults to
+# "Exception"
+overgeneral-exceptions=
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/49deb63e0288b6759531c2bfad…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/49deb63e0288b6759531c2bfad…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
46a40cf6 by Philipp Hörist at 2018-10-03T12:18:46Z
StreamManagement: Reset IN counter after enabled
- - - - -
1 changed file:
- nbxmpp/smacks.py
Changes:
=====================================
nbxmpp/smacks.py
=====================================
@@ -50,6 +50,8 @@ class Smacks(object):
def _neg_response(self, disp, stanza):
r = stanza.getAttr('resume')
+ # When we receive enabled from the server, reset the IN count
+ self.in_h = 0
log.info("Session resumption: %s" % r)
if r == 'true' or r == 'True' or r == '1':
self.resumption = True
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/46a40cf69f75a2a2dbe1c9dcd5…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/46a40cf69f75a2a2dbe1c9dcd5…
You're receiving this email because of your account on dev.gajim.org.