Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove Python 2 leftovers #213

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions xsd-fu/python/generateDS/generateDS.html
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ <h2><a class="toc-backref" href="#id68">13.1&nbsp;&nbsp;&nbsp;Capturing xs:date
<p>Then, define <tt class="docutils literal"><span class="pre">date_calcs.py</span></tt> as:</p>
<pre class="literal-block">
#!/usr/bin/env python
# -*- mode: pymode; coding: utf-8; -*-
# -*- mode: pymode; -*-

import datetime

Expand Down Expand Up @@ -2147,13 +2147,6 @@ <h1><a class="toc-backref" href="#id72">15&nbsp;&nbsp;&nbsp;Includes -- The XML
script scans your XML Schema document and, recursively, documents
that are included looking for <tt class="docutils literal"><span class="pre">include</span></tt> elements; it inserts all
content into a single document, which it writes out.</p>
<p>Since <tt class="docutils literal"><span class="pre">process_includes.py</span></tt> uses the ElementTree API, in order
to use <tt class="docutils literal"><span class="pre">process_includes.py</span></tt> you will need one of the following:</p>
<ul class="simple">
<li>Python 2.5 -- ElementTree is in the Python-2.5 distribution. Or,</li>
<li><a class="reference external" href="http://effbot.org/zone/element-index.htm">ElementTree</a>. Or,</li>
<li><a class="reference external" href="http://codespeak.net/lxml/">lxml</a> -- another implementation of the ElementTree API.</li>
</ul>
<p>Here are samples of how you might use <tt class="docutils literal"><span class="pre">process_includes.py</span></tt>, if
your schema contains <tt class="docutils literal"><span class="pre">include</span></tt> elements.</p>
<p>Example 1:</p>
Expand Down
6 changes: 1 addition & 5 deletions xsd-fu/python/generateDS/generateDS.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@



#from __future__ import generators # only needed for Python 2.2



import sys
import os.path
import time
Expand Down Expand Up @@ -905,7 +901,7 @@ def getKeys(self):
def add(self, name, attr):
self.group[name] = attr
def delete(self, name):
if has_key(self.group, name):
if name in self.group:
del self.group[name]
return 1
else:
Expand Down
2 changes: 1 addition & 1 deletion xsd-fu/python/generateDS/process_includes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- mode: pymode; coding: utf-8; -*-
# -*- mode: pymode; -*-
"""
Synopsis:
Recursively process the include elements in an XML Schema file.
Expand Down
Loading