py3dns uses 'async' keyword that cannot be used as a attibute name in python 3.7+

Bug #1776027 reported by Kevin Fenzi
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
py3dns
Fix Released
High
Scott Kitterman

Bug Description

Downstream report:

https://bugzilla.redhat.com/show_bug.cgi?id=1583688

With python 3.7, await and async are resevered keywords and cannot be used as attribute names.

Trying to build py3dns with python 3.7 or newer results in:

+ /usr/bin/python3 setup.py build
Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    import DNS
  File "/builddir/build/BUILD/py3dns-3.1.1/DNS/__init__.py", line 27, in <module>
    from .Base import DnsRequest
  File "/builddir/build/BUILD/py3dns-3.1.1/DNS/Base.py", line 100
    self.async=None
             ^
SyntaxError: invalid syntax

Should be easy enough to just rename the attribute... attached patch changes it to 'py3async'.

Revision history for this message
Kevin Fenzi (kevin-launchpad) wrote :
Revision history for this message
Rémi Paulmier (remi-paulmier) wrote :

Hello,

I confirm the bug. I solved it with the same patch, basically (using self.asynchronous instead of py3async).

Is it possible to merge this patch / deploy to pip ?

Best Regards,
Remi

Changed in py3dns:
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → High
status: New → In Progress
Changed in py3dns:
milestone: none → 3.1.2
Changed in py3dns:
milestone: none → 3.2.0
status: In Progress → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Fixed in 3.2.0.

Changed in py3dns:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.