diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-25 15:17:19 -0500 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-25 15:18:46 -0500 |
commit | c0339eb4af50880a66e6f0d19e3ecb3ce3469696 (patch) | |
tree | 6979d54a5b10eca137dba1be5a1c8791214e4cd1 | |
parent | 86c412dddfd785d16976d08b1c74c1eac466bfcb (diff) | |
download | pyparsing-git-c0339eb4af50880a66e6f0d19e3ecb3ce3469696.tar.gz |
Use HTTPS URLs where available in docs, examples, and comments
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | docs/conf.py | 2 | ||||
-rw-r--r-- | examples/0README.html | 2 | ||||
-rw-r--r-- | examples/TAP.py | 2 | ||||
-rw-r--r-- | examples/ebnf.py | 2 | ||||
-rw-r--r-- | examples/getNTPserversNew.py | 2 | ||||
-rw-r--r-- | examples/htmlStripper.py | 2 | ||||
-rw-r--r-- | examples/makeHTMLTagExample.py | 2 | ||||
-rw-r--r-- | examples/oc.py | 2 | ||||
-rw-r--r-- | examples/pymicko.py | 2 | ||||
-rw-r--r-- | examples/removeLineBreaks.py | 2 | ||||
-rw-r--r-- | examples/scanYahoo.py | 2 | ||||
-rw-r--r-- | examples/select_parser.py | 2 | ||||
-rw-r--r-- | examples/simpleWiki.py | 2 | ||||
-rw-r--r-- | examples/sql2dot.py | 2 | ||||
-rw-r--r-- | examples/stateMachine2.py | 2 | ||||
-rw-r--r-- | examples/urlExtractor.py | 2 | ||||
-rw-r--r-- | examples/urlExtractorNew.py | 2 | ||||
-rw-r--r-- | examples/verilogParse.py | 4 | ||||
-rw-r--r-- | pyparsing.py | 10 |
20 files changed, 26 insertions, 26 deletions
@@ -769,7 +769,7 @@ Version 2.0.2 - April, 2014 "result.pprint()". This method also accepts addtional positional and keyword arguments (such as indent, width, etc.), which get passed through directly to the pprint method - (see http://docs.python.org/2/library/pprint.html#pprint.pprint). + (see https://docs.python.org/2/library/pprint.html#pprint.pprint). - Removed deprecation warnings when using '<<' for Forward expression assignment. '<<=' is still preferred, but '<<' will be retained @@ -1055,7 +1055,7 @@ Version 1.5.3 - June, 2010 above - thanks so much, Matt! . select_parser.py, a parser for reading SQLite SELECT statements, - as specified at http://www.sqlite.org/lang_select.html; this goes + as specified at https://www.sqlite.org/lang_select.html this goes into much more detail than the simple SQL parser included in pyparsing's source code diff --git a/docs/conf.py b/docs/conf.py index 27e4415..eaa817f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,7 +4,7 @@ # # This file does only contain a selection of the most common options. For a # full list see the documentation: -# http://www.sphinx-doc.org/en/master/config +# https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- diff --git a/examples/0README.html b/examples/0README.html index e566784..adecdc8 100644 --- a/examples/0README.html +++ b/examples/0README.html @@ -175,7 +175,7 @@ to compile Roman numerals into their integer values. <li><a href="removeLineBreaks.py">removeLineBreaks.py</a><br>
A string transformer that converts text files with hard line-breaks into one with line breaks
only between paragraphs. Useful when converting downloads from
-<a href="http://www.gutenberg.org">Project Gutenberg</a> to import to word processing apps
+<a href="https://www.gutenberg.org/">Project Gutenberg</a> to import to word processing apps
that can reformat paragraphs once hard line-breaks are removed, or for loading into your Palm Pilot for portable perusal.
<p>
See <a href="Successful Methods of Public Speaking.txt">Successful Methods of Public Speaking.txt</a> and
diff --git a/examples/TAP.py b/examples/TAP.py index 3c642e4..18f57fd 100644 --- a/examples/TAP.py +++ b/examples/TAP.py @@ -3,7 +3,7 @@ #
# A pyparsing parser to process the output of the Perl
# "Test Anything Protocol"
-# (http://search.cpan.org/~petdance/TAP-1.00/TAP.pm)
+# (https://metacpan.org/pod/release/PETDANCE/TAP-1.00/TAP.pm)
#
# TAP output lines are preceded or followed by a test number range:
# 1..n
diff --git a/examples/ebnf.py b/examples/ebnf.py index f94c755..bb19155 100644 --- a/examples/ebnf.py +++ b/examples/ebnf.py @@ -3,7 +3,7 @@ # ISO 14977 standardize The Extended Backus-Naur Form(EBNF) syntax.
# You can read a final draft version here:
-# http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html
+# https://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html
#
# Submitted 2004 by Seo Sanghyeon
#
diff --git a/examples/getNTPserversNew.py b/examples/getNTPserversNew.py index 6bad555..9d6b4ed 100644 --- a/examples/getNTPserversNew.py +++ b/examples/getNTPserversNew.py @@ -24,7 +24,7 @@ timeServerPattern = (tdStart + hostname("hostname") + tdEnd + tdStart + SkipTo(tdEnd)("loc") + tdEnd)
# get list of time servers
-nistTimeServerURL = "http://tf.nist.gov/tf-cgi/servers.cgi#"
+nistTimeServerURL = "https://tf.nist.gov/tf-cgi/servers.cgi#"
serverListPage = urlopen( nistTimeServerURL )
serverListHTML = serverListPage.read().decode("UTF-8")
serverListPage.close()
diff --git a/examples/htmlStripper.py b/examples/htmlStripper.py index 6fc4aef..c3dbcf1 100644 --- a/examples/htmlStripper.py +++ b/examples/htmlStripper.py @@ -16,7 +16,7 @@ scriptBody = scriptOpen + SkipTo(scriptClose) + scriptClose commonHTMLEntity.setParseAction(replaceHTMLEntity)
# get some HTML
-targetURL = "http://wiki.python.org/moin/PythonDecoratorLibrary"
+targetURL = "https://wiki.python.org/moin/PythonDecoratorLibrary"
with closing(urllib.request.urlopen( targetURL )) as targetPage:
targetHTML = targetPage.read().decode("UTF-8")
diff --git a/examples/makeHTMLTagExample.py b/examples/makeHTMLTagExample.py index 3b771c7..76774bf 100644 --- a/examples/makeHTMLTagExample.py +++ b/examples/makeHTMLTagExample.py @@ -3,7 +3,7 @@ import urllib.request, urllib.parse, urllib.error from pyparsing import makeHTMLTags, SkipTo
# read HTML from a web page
-serverListPage = urllib.request.urlopen( "http://www.yahoo.com" )
+serverListPage = urllib.request.urlopen( "https://www.yahoo.com/" )
htmlText = serverListPage.read()
serverListPage.close()
diff --git a/examples/oc.py b/examples/oc.py index fdf7bcd..c8b95b1 100644 --- a/examples/oc.py +++ b/examples/oc.py @@ -5,7 +5,7 @@ # Copyright, 2010, Paul McGuire
#
"""
-http://www.ioccc.org/1996/august.hint
+https://www.ioccc.org/1996/august.hint
The following is a description of the OC grammar:
diff --git a/examples/pymicko.py b/examples/pymicko.py index d3df6f5..5a79594 100644 --- a/examples/pymicko.py +++ b/examples/pymicko.py @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-# A copy of the GNU General Public License can be found at <http://www.gnu.org/licenses/>.
+# A copy of the GNU General Public License can be found at <https://www.gnu.org/licenses/>.
from pyparsing import *
from sys import stdin, argv, exit
diff --git a/examples/removeLineBreaks.py b/examples/removeLineBreaks.py index a94dd35..df07fba 100644 --- a/examples/removeLineBreaks.py +++ b/examples/removeLineBreaks.py @@ -3,7 +3,7 @@ # Demonstration of the pyparsing module, converting text files
# with hard line-breaks to text files with line breaks only
# between paragraphs. (Helps when converting downloads from Project
-# Gutenberg - http://www.gutenberg.org - to import to word processing apps
+# Gutenberg - https://www.gutenberg.org/ - to import to word processing apps
# that can reformat paragraphs once hard line-breaks are removed.)
#
# Uses parse actions and transformString to remove unwanted line breaks,
diff --git a/examples/scanYahoo.py b/examples/scanYahoo.py index 825c169..9ecb5e9 100644 --- a/examples/scanYahoo.py +++ b/examples/scanYahoo.py @@ -1,7 +1,7 @@ from pyparsing import makeHTMLTags,SkipTo,htmlComment
import urllib.request, urllib.parse, urllib.error
-serverListPage = urllib.request.urlopen( "http://www.yahoo.com" )
+serverListPage = urllib.request.urlopen( "https://www.yahoo.com/" )
htmlText = serverListPage.read()
serverListPage.close()
diff --git a/examples/select_parser.py b/examples/select_parser.py index 7b3727e..79a3366 100644 --- a/examples/select_parser.py +++ b/examples/select_parser.py @@ -2,7 +2,7 @@ # Copyright 2010, Paul McGuire
#
# a simple SELECT statement parser, taken from SQLite's SELECT statement
-# definition at http://www.sqlite.org/lang_select.html
+# definition at https://www.sqlite.org/lang_select.html
#
from pyparsing import *
ParserElement.enablePackrat()
diff --git a/examples/simpleWiki.py b/examples/simpleWiki.py index 4ec3b71..89191c9 100644 --- a/examples/simpleWiki.py +++ b/examples/simpleWiki.py @@ -5,7 +5,7 @@ Here is a simple Wiki input: *This is in italics.*
**This is in bold!**
***This is in bold italics!***
- Here's a URL to {{Pyparsing's Wiki Page->http://pyparsing.wikispaces.com}}
+ Here's a URL to {{Pyparsing's Wiki Page->https://site-closed.wikispaces.com}}
"""
def convertToHTML(opening,closing):
diff --git a/examples/sql2dot.py b/examples/sql2dot.py index fa1d489..cd6717c 100644 --- a/examples/sql2dot.py +++ b/examples/sql2dot.py @@ -5,7 +5,7 @@ # Creates table graphics by parsing SQL table DML commands and
# generating DOT language output.
#
-# Adapted from a post at http://energyblog.blogspot.com/2006/04/blog-post_20.html.
+# Adapted from a post at https://energyblog.blogspot.com/2006/04/blog-post_20.html.
#
sampleSQL = """
create table student
diff --git a/examples/stateMachine2.py b/examples/stateMachine2.py index a156f6c..d172368 100644 --- a/examples/stateMachine2.py +++ b/examples/stateMachine2.py @@ -156,7 +156,7 @@ class SuffixImporter(object): the PEP, and also used Doug Hellmann's PyMOTW article `Modules and
Imports`_, as a pattern.
- .. _`Modules and Imports`: http://www.doughellmann.com/PyMOTW/sys/imports.html
+ .. _`Modules and Imports`: https://pymotw.com/3/sys/imports.html
Define a subclass that specifies a :attr:`suffix` attribute, and
implements a :meth:`process_filedata` method. Then call the classmethod
diff --git a/examples/urlExtractor.py b/examples/urlExtractor.py index 58e74ae..dc88608 100644 --- a/examples/urlExtractor.py +++ b/examples/urlExtractor.py @@ -14,7 +14,7 @@ linkBody.addParseAction(lambda toks: ' '.join(toks[0].strip().split())) link = linkOpenTag + linkBody("body") + linkCloseTag.suppress()
# Go get some HTML with some links in it.
-with closing(urllib.request.urlopen("http://www.yahoo.com")) as serverListPage:
+with closing(urllib.request.urlopen("https://www.yahoo.com/")) as serverListPage:
htmlText = serverListPage.read().decode("UTF-8")
# scanString is a generator that loops through the input htmlText, and for each
diff --git a/examples/urlExtractorNew.py b/examples/urlExtractorNew.py index 79f22ab..a21b2ab 100644 --- a/examples/urlExtractorNew.py +++ b/examples/urlExtractorNew.py @@ -14,7 +14,7 @@ linkOpenTag,linkCloseTag = makeHTMLTags("a") link = linkOpenTag + SkipTo(linkCloseTag)("body") + linkCloseTag.suppress()
# Go get some HTML with some links in it.
-serverListPage = urllib.request.urlopen( "http://www.google.com" )
+serverListPage = urllib.request.urlopen( "https://www.google.com/" )
htmlText = serverListPage.read()
serverListPage.close()
diff --git a/examples/verilogParse.py b/examples/verilogParse.py index 6161013..f39883f 100644 --- a/examples/verilogParse.py +++ b/examples/verilogParse.py @@ -19,8 +19,8 @@ # # If you find this software to be useful, please make a donation to one # of the following charities: -# - the Red Cross (http://www.redcross.org) -# - Hospice Austin (http://www.hospiceaustin.org) +# - the Red Cross (https://www.redcross.org/) +# - Hospice Austin (https://www.hospiceaustin.org/) # # DISCLAIMER: # THIS SOFTWARE IS PROVIDED BY PAUL T. McGUIRE ``AS IS'' AND ANY EXPRESS OR diff --git a/pyparsing.py b/pyparsing.py index 945c51d..9be5fed 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -973,9 +973,9 @@ class ParseResults(object): def pprint(self, *args, **kwargs): """ Pretty-printer for parsed results as a list, using the - `pprint <http://docs.python.org/3/library/pprint.html>`_ module. + `pprint <https://docs.python.org/3/library/pprint.html>`_ module. Accepts additional positional or keyword args as defined for - `pprint.pprint <http://docs.python.org/3/library/pprint.html#pprint.pprint>`_ . + `pprint.pprint <https://docs.python.org/3/library/pprint.html#pprint.pprint>`_ . Example:: @@ -2918,7 +2918,7 @@ class Char(Word): class Regex(Token): r"""Token for matching strings that match a given regular expression. Defined with string specifying the regular expression in - a form recognized by the stdlib Python `re module <http://docs.python.org/3/library/re.html>`_. + a form recognized by the stdlib Python `re module <https://docs.python.org/3/library/re.html>`_. If the given regex contains named groups (defined using ``(?P<name>...)``), these will be preserved as named parse results. @@ -2926,14 +2926,14 @@ class Regex(Token): realnum = Regex(r"[+-]?\d+\.\d*") date = Regex(r'(?P<year>\d{4})-(?P<month>\d\d?)-(?P<day>\d\d?)') - # ref: http://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression + # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})") """ compiledREtype = type(re.compile("[A-Z]")) def __init__( self, pattern, flags=0, asGroupList=False, asMatch=False): """The parameters ``pattern`` and ``flags`` are passed to the ``re.compile()`` function as-is. See the Python - `re module <http://docs.python.org/3/library/re.html>`_ module for an + `re module <https://docs.python.org/3/library/re.html>`_ module for an explanation of the acceptable patterns and flags. """ super(Regex,self).__init__() |