Skip to content
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

Dnsq: DeprecationWarning #263

Open
tobru opened this issue Oct 2, 2023 · 0 comments
Open

Dnsq: DeprecationWarning #263

tobru opened this issue Oct 2, 2023 · 0 comments

Comments

@tobru
Copy link

tobru commented Oct 2, 2023

I get:

2023-10-02 07:01:04,544 43 WARNING py.warnings: /usr/local/lib/python3.9/dist-packages/dnsq.py:184: DeprecationWarning: please use dns.resolver.Resolver.resolve() instead
  File "/usr/lib/python3.9/threading.py", line 912, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/odoo/bin/odoo/service/server.py", line 1112, in _runloop
    self.process_work()
  File "/opt/odoo/bin/odoo/service/server.py", line 1203, in process_work
    base.models.ir_cron.ir_cron._process_jobs(db_name)
  File "/opt/odoo/bin/odoo/addons/base/models/ir_cron.py", line 116, in _process_jobs
    registry[cls._name]._process_job(db, cron_cr, job)
  File "/opt/odoo/bin/odoo/addons/base/models/ir_cron.py", line 325, in _process_job
    ir_cron._callback(job['cron_name'], job['ir_actions_server_id'], job['id'])
  File "/opt/odoo/bin/odoo/addons/base/models/ir_cron.py", line 368, in _callback
    self.env['ir.actions.server'].browse(server_action_id).run()
  File "/opt/odoo/bin/odoo/addons/base/models/ir_actions.py", line 668, in run
    res = runner(run_self, eval_context=eval_context)
  File "/opt/odoo/bin/addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
    res = super(ServerAction, self)._run_action_code_multi(eval_context)
  File "/opt/odoo/bin/odoo/addons/base/models/ir_actions.py", line 538, in _run_action_code_multi
    safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self))  # nocopy allows to return 'action'
  File "/opt/odoo/bin/odoo/tools/safe_eval.py", line 362, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "ir.actions.server(123,)", line 1, in <module>
  File "/opt/odoo/bin/addons/mail/models/fetchmail.py", line 185, in _fetch_mails
    return self.search([('state', '=', 'done'), ('server_type', '!=', 'local')]).fetch_mail()
  File "/opt/odoo/bin/addons/mail/models/fetchmail.py", line 215, in fetch_mail
    self._cr.commit()
  File "/opt/odoo/bin/odoo/sql_db.py", line 454, in commit
    self.flush()
  File "/opt/odoo/bin/odoo/sql_db.py", line 127, in flush
    self.transaction.flush()
  File "/opt/odoo/bin/odoo/api.py", line 870, in flush
    env_to_flush.flush_all()
  File "/opt/odoo/bin/odoo/api.py", line 732, in flush_all
    self._recompute_all()
  File "/opt/odoo/bin/odoo/api.py", line 728, in _recompute_all
    self[field.model_name]._recompute_field(field)
  File "/opt/odoo/bin/odoo/models.py", line 6170, in _recompute_field
    field.recompute(records)
  File "/opt/odoo/bin/odoo/fields.py", line 1365, in recompute
    apply_except_missing(self.compute_value, recs)
  File "/opt/odoo/bin/odoo/fields.py", line 1338, in apply_except_missing
    func(records)
  File "/opt/odoo/bin/odoo/fields.py", line 1387, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/bin/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/bin/odoo/models.py", line 4203, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/bin/odoo/fields.py", line 97, in determine
    return needle(*args)
  File "/opt/odoo/bin/addons/crm/models/crm_lead.py", line 491, in _compute_probabilities
    lead_probabilities = self._pls_get_naive_bayes_probabilities()
  File "/opt/odoo/bin/addons/crm/models/crm_lead.py", line 2059, in _pls_get_naive_bayes_probabilities
    leads_values_dict = self._pls_get_lead_pls_values(domain=domain)
  File "/opt/odoo/bin/addons/crm/models/crm_lead.py", line 2606, in _pls_get_lead_pls_values
    value = lead[field].id if isinstance(lead[field], models.BaseModel) else lead[field]
  File "/opt/odoo/bin/odoo/models.py", line 5868, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/opt/odoo/bin/odoo/fields.py", line 1157, in __get__
    self.recompute(record)
  File "/opt/odoo/bin/odoo/fields.py", line 1365, in recompute
    apply_except_missing(self.compute_value, recs)
  File "/opt/odoo/bin/odoo/fields.py", line 1338, in apply_except_missing
    func(records)
  File "/opt/odoo/bin/odoo/fields.py", line 1387, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/bin/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/bin/odoo/models.py", line 4203, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/bin/odoo/fields.py", line 97, in determine
    return needle(*args)
  File "/opt/odoo/bin/addons/crm/models/crm_lead.py", line 477, in _compute_email_state
    if mail_validation.mail_validate(email):
  File "/opt/odoo/bin/addons/mail/tools/mail_validation.py", line 17, in mail_validate
    return bool(address.validate_address(email))
  File "/usr/local/lib/python3.9/dist-packages/flanker/utils.py", line 64, in wrapper
    return_value = f(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/flanker/addresslib/address.py", line 312, in validate_address
    exchanger, mx_metrics = mail_exchanger_lookup(paddr.hostname, metrics=True)
  File "/usr/local/lib/python3.9/dist-packages/flanker/utils.py", line 64, in wrapper
    return_value = f(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/flanker/addresslib/validate.py", line 156, in mail_exchanger_lookup
    mx_hosts = lookup_domain(domain)
  File "/usr/local/lib/python3.9/dist-packages/flanker/addresslib/validate.py", line 209, in lookup_domain
    mx_hosts = _get_dns_lookup()[fqdn]
  File "/usr/local/lib/python3.9/dist-packages/flanker/addresslib/drivers/dns_lookup.py", line 15, in __getitem__
    return dnsq.mx_hosts_for(key)
  File "/usr/local/lib/python3.9/dist-packages/dnsq.py", line 68, in mx_hosts_for
    answers = sorted(exec_query(hostname, 'MX'))
  File "/usr/local/lib/python3.9/dist-packages/dnsq.py", line 184, in exec_query
    return get_resolver().query(hostname, record_type, tcp=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant