<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/dnspython.git/dns/enum.py, branch master</title>
<subtitle>github.com: rthalley/dnspython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/'/>
<entry>
<title>run black on enum.py</title>
<updated>2023-04-06T13:04:18+00:00</updated>
<author>
<name>Bob Halley</name>
<email>halley@dnspython.org</email>
</author>
<published>2023-04-06T13:04:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=bb5188eac0e28c8e6695286c32d75ce323a936e6'/>
<id>bb5188eac0e28c8e6695286c32d75ce323a936e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Enum typing (#923)</title>
<updated>2023-04-06T13:03:07+00:00</updated>
<author>
<name>Brian Wellington</name>
<email>bwelling@xbill.org</email>
</author>
<published>2023-04-06T13:03:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=cee55728316820d037ece45b11d2fed655a2754c'/>
<id>cee55728316820d037ece45b11d2fed655a2754c</id>
<content type='text'>
* IntEnum improvements.

This changes make() to always return an instance of the subclass,
creating one on the fly if the value is not known, and updates the typ
registration code to deal with this.  It also adds typing annotations to
make().

* Add missing int check.

Some older versions of python weren't rejecting non-int values.

* Fix int check.

Raise TypeError for non-int, not ValueError, to make tests happy.

* Annotate to_text/from_text.

* Remove many the_ prefixed variables.

These were needed in the past to work around typing issues.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* IntEnum improvements.

This changes make() to always return an instance of the subclass,
creating one on the fly if the value is not known, and updates the typ
registration code to deal with this.  It also adds typing annotations to
make().

* Add missing int check.

Some older versions of python weren't rejecting non-int values.

* Fix int check.

Raise TypeError for non-int, not ValueError, to make tests happy.

* Annotate to_text/from_text.

* Remove many the_ prefixed variables.

These were needed in the past to work around typing issues.</pre>
</div>
</content>
</entry>
<entry>
<title>more lint</title>
<updated>2022-10-02T17:04:05+00:00</updated>
<author>
<name>Bob Halley</name>
<email>halley@dnspython.org</email>
</author>
<published>2022-10-02T17:04:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=bfa397c9b97487e4f9d54f3d41323ccda1fc4b1d'/>
<id>bfa397c9b97487e4f9d54f3d41323ccda1fc4b1d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix dns.rdatatype special cases.</title>
<updated>2022-07-15T16:01:17+00:00</updated>
<author>
<name>Brian Wellington</name>
<email>bwelling@xbill.org</email>
</author>
<published>2022-07-15T16:01:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=8a10f7b9b28950a60ae452f019268ca9a4306f5a'/>
<id>8a10f7b9b28950a60ae452f019268ca9a4306f5a</id>
<content type='text'>
Prior to this change, there was logic in dns.rdatatype.from_text() and
to_text() to deal with types not handled by the RdataType enum;
specifically, the NSAP-PTR type (the enum value has a different name,
because of the hyphen) and user-registered types.

This was fine when internal code called these methods, but most callers
of from_text() were converted to dns.rdatatype.RdataType.make(), which
supports both integer and text input, and it doesn't handle the special
cases.

This change adds more hooks into the enum wrapper and moves the special
case handling for RdataType into them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this change, there was logic in dns.rdatatype.from_text() and
to_text() to deal with types not handled by the RdataType enum;
specifically, the NSAP-PTR type (the enum value has a different name,
because of the hyphen) and user-registered types.

This was fine when internal code called these methods, but most callers
of from_text() were converted to dns.rdatatype.RdataType.make(), which
supports both integer and text input, and it doesn't handle the special
cases.

This change adds more hooks into the enum wrapper and moves the special
case handling for RdataType into them.
</pre>
</div>
</content>
</entry>
<entry>
<title>black autoformatting</title>
<updated>2022-03-15T15:37:20+00:00</updated>
<author>
<name>Bob Halley</name>
<email>halley@dnspython.org</email>
</author>
<published>2022-03-15T15:37:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=b1d2332687adbecc0acbb4e623124f783f859d9e'/>
<id>b1d2332687adbecc0acbb4e623124f783f859d9e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add no cover for abstract method.</title>
<updated>2020-07-23T14:17:21+00:00</updated>
<author>
<name>Bob Halley</name>
<email>halley@dnspython.org</email>
</author>
<published>2020-07-23T14:17:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=dc590c792b612a75df05b6215e70dbe3a635a8ea'/>
<id>dc590c792b612a75df05b6215e70dbe3a635a8ea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove dns.rdata{type,class}.to_enum.</title>
<updated>2020-05-21T17:53:24+00:00</updated>
<author>
<name>Brian Wellington</name>
<email>bwelling@xbill.org</email>
</author>
<published>2020-05-21T17:53:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=a1cddfabca128d326b5e6b6eaab21dff7d2b5bcc'/>
<id>a1cddfabca128d326b5e6b6eaab21dff7d2b5bcc</id>
<content type='text'>
These methods (which convert a str/int into an enum/int) shouldn't be
commonly used by external code, so don't need to exist at the module
level.  The make() method on the enum class (renamed from to_enum()) can
still be used, and the internal callers have been updated to use it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These methods (which convert a str/int into an enum/int) shouldn't be
commonly used by external code, so don't need to exist at the module
level.  The make() method on the enum class (renamed from to_enum()) can
still be used, and the internal callers have been updated to use it.
</pre>
</div>
</content>
</entry>
<entry>
<title>raise NotImplememtedError, not NotImplemented</title>
<updated>2020-05-20T14:16:10+00:00</updated>
<author>
<name>Bob Halley</name>
<email>halley@dnspython.org</email>
</author>
<published>2020-05-20T14:16:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=afdfbcce7362213d1bb0231ea462a459bef37e8d'/>
<id>afdfbcce7362213d1bb0231ea462a459bef37e8d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Enum refactoring.</title>
<updated>2020-05-19T20:18:05+00:00</updated>
<author>
<name>Brian Wellington</name>
<email>bwelling@xbill.org</email>
</author>
<published>2020-05-19T20:18:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/dnspython.git/commit/?id=044c8afd92070648f3e76ed054be69d264f114c2'/>
<id>044c8afd92070648f3e76ed054be69d264f114c2</id>
<content type='text'>
Consolidate the common methods related to enum classes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consolidate the common methods related to enum classes.
</pre>
</div>
</content>
</entry>
</feed>
