Skip to content

Commit ca13727

Browse files
committed
Bump to version 2.0.9: - Compatibility with urllib3>2
1 parent a4965fd commit ca13727

26 files changed

+1993
-1297
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
# Change Log
33

4+
## 2.0.9 [2023-05-15]
5+
6+
- Compatibility with urllib3>2
7+
48
## 2.0.8 [2022-08-01]
59

610
<li> Thu Jul 21 17:29:17 2022 +0100: Daniele Romagnoli <a href=https://github.com/GeoNode/geoserver-restconfig/commit/5204b20e491416eaf43fbd9ab81b41773ccbfed1 target=blank>Adding some more code examples (#36)</a></li>

docs/conf.py

Lines changed: 52 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -17,201 +17,197 @@
1717
# If extensions (or modules to document with autodoc) are in another directory,
1818
# add these directories to sys.path here. If the directory is relative to the
1919
# documentation root, use os.path.abspath to make it absolute, like shown here.
20-
#sys.path.insert(0, os.path.abspath('.'))
20+
# sys.path.insert(0, os.path.abspath('.'))
2121

2222
# -- General configuration -----------------------------------------------------
2323

2424
# If your documentation needs a minimal Sphinx version, state it here.
25-
#needs_sphinx = '1.0'
25+
# needs_sphinx = '1.0'
2626

2727
# Add any Sphinx extension module names here, as strings. They can be extensions
2828
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2929
extensions = []
3030

3131
# Add any paths that contain templates here, relative to this directory.
32-
templates_path = ['_templates']
32+
templates_path = ["_templates"]
3333

3434
# The suffix of source filenames.
35-
source_suffix = '.rst'
35+
source_suffix = ".rst"
3636

3737
# The encoding of source files.
38-
#source_encoding = 'utf-8-sig'
38+
# source_encoding = 'utf-8-sig'
3939

4040
# The master toctree document.
41-
master_doc = 'index'
41+
master_doc = "index"
4242

4343
# General information about the project.
44-
project = u'gsconfig'
45-
copyright = u'2011, David Winslow'
44+
project = "gsconfig"
45+
copyright = "2011, David Winslow"
4646

4747
# The version info for the project you're documenting, acts as replacement for
4848
# |version| and |release|, also used in various other places throughout the
4949
# built documents.
5050
#
5151
# The short X.Y version.
52-
version = '0.1'
52+
version = "0.1"
5353
# The full version, including alpha/beta/rc tags.
54-
release = '0.1'
54+
release = "0.1"
5555

5656
# The language for content autogenerated by Sphinx. Refer to documentation
5757
# for a list of supported languages.
58-
#language = None
58+
# language = None
5959

6060
# There are two options for replacing |today|: either, you set today to some
6161
# non-false value, then it is used:
62-
#today = ''
62+
# today = ''
6363
# Else, today_fmt is used as the format for a strftime call.
64-
#today_fmt = '%B %d, %Y'
64+
# today_fmt = '%B %d, %Y'
6565

6666
# List of patterns, relative to source directory, that match files and
6767
# directories to ignore when looking for source files.
68-
exclude_patterns = ['_build']
68+
exclude_patterns = ["_build"]
6969

7070
# The reST default role (used for this markup: `text`) to use for all documents.
71-
#default_role = None
71+
# default_role = None
7272

7373
# If true, '()' will be appended to :func: etc. cross-reference text.
74-
#add_function_parentheses = True
74+
# add_function_parentheses = True
7575

7676
# If true, the current module name will be prepended to all description
7777
# unit titles (such as .. function::).
78-
#add_module_names = True
78+
# add_module_names = True
7979

8080
# If true, sectionauthor and moduleauthor directives will be shown in the
8181
# output. They are ignored by default.
82-
#show_authors = False
82+
# show_authors = False
8383

8484
# The name of the Pygments (syntax highlighting) style to use.
85-
pygments_style = 'sphinx'
85+
pygments_style = "sphinx"
8686

8787
# A list of ignored prefixes for module index sorting.
88-
#modindex_common_prefix = []
88+
# modindex_common_prefix = []
8989

9090

9191
# -- Options for HTML output ---------------------------------------------------
9292

9393
# The theme to use for HTML and HTML Help pages. See the documentation for
9494
# a list of builtin themes.
95-
html_theme = 'default'
95+
html_theme = "default"
9696

9797
# Theme options are theme-specific and customize the look and feel of a theme
9898
# further. For a list of options available for each theme, see the
9999
# documentation.
100-
#html_theme_options = {}
100+
# html_theme_options = {}
101101

102102
# Add any paths that contain custom themes here, relative to this directory.
103-
#html_theme_path = []
103+
# html_theme_path = []
104104

105105
# The name for this set of Sphinx documents. If None, it defaults to
106106
# "<project> v<release> documentation".
107-
#html_title = None
107+
# html_title = None
108108

109109
# A shorter title for the navigation bar. Default is the same as html_title.
110-
#html_short_title = None
110+
# html_short_title = None
111111

112112
# The name of an image file (relative to this directory) to place at the top
113113
# of the sidebar.
114-
#html_logo = None
114+
# html_logo = None
115115

116116
# The name of an image file (within the static path) to use as favicon of the
117117
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
118118
# pixels large.
119-
#html_favicon = None
119+
# html_favicon = None
120120

121121
# Add any paths that contain custom static files (such as style sheets) here,
122122
# relative to this directory. They are copied after the builtin static files,
123123
# so a file named "default.css" will overwrite the builtin "default.css".
124-
html_static_path = ['_static']
124+
html_static_path = ["_static"]
125125

126126
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
127127
# using the given strftime format.
128-
#html_last_updated_fmt = '%b %d, %Y'
128+
# html_last_updated_fmt = '%b %d, %Y'
129129

130130
# If true, SmartyPants will be used to convert quotes and dashes to
131131
# typographically correct entities.
132-
#html_use_smartypants = True
132+
# html_use_smartypants = True
133133

134134
# Custom sidebar templates, maps document names to template names.
135-
#html_sidebars = {}
135+
# html_sidebars = {}
136136

137137
# Additional templates that should be rendered to pages, maps page names to
138138
# template names.
139-
#html_additional_pages = {}
139+
# html_additional_pages = {}
140140

141141
# If false, no module index is generated.
142-
#html_domain_indices = True
142+
# html_domain_indices = True
143143

144144
# If false, no index is generated.
145-
#html_use_index = True
145+
# html_use_index = True
146146

147147
# If true, the index is split into individual pages for each letter.
148-
#html_split_index = False
148+
# html_split_index = False
149149

150150
# If true, links to the reST sources are added to the pages.
151-
#html_show_sourcelink = True
151+
# html_show_sourcelink = True
152152

153153
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
154-
#html_show_sphinx = True
154+
# html_show_sphinx = True
155155

156156
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
157-
#html_show_copyright = True
157+
# html_show_copyright = True
158158

159159
# If true, an OpenSearch description file will be output, and all pages will
160160
# contain a <link> tag referring to it. The value of this option must be the
161161
# base URL from which the finished HTML is served.
162-
#html_use_opensearch = ''
162+
# html_use_opensearch = ''
163163

164164
# This is the file name suffix for HTML files (e.g. ".xhtml").
165-
#html_file_suffix = None
165+
# html_file_suffix = None
166166

167167
# Output file base name for HTML help builder.
168-
htmlhelp_basename = 'gsconfigdoc'
168+
htmlhelp_basename = "gsconfigdoc"
169169

170170

171171
# -- Options for LaTeX output --------------------------------------------------
172172

173173
# The paper size ('letter' or 'a4').
174-
#latex_paper_size = 'letter'
174+
# latex_paper_size = 'letter'
175175

176176
# The font size ('10pt', '11pt' or '12pt').
177-
#latex_font_size = '10pt'
177+
# latex_font_size = '10pt'
178178

179179
# Grouping the document tree into LaTeX files. List of tuples
180180
# (source start file, target name, title, author, documentclass [howto/manual]).
181181
latex_documents = [
182-
('index', 'gsconfig.tex', u'gsconfig Documentation',
183-
u'David Winslow', 'manual'),
182+
("index", "gsconfig.tex", "gsconfig Documentation", "David Winslow", "manual"),
184183
]
185184

186185
# The name of an image file (relative to this directory) to place at the top of
187186
# the title page.
188-
#latex_logo = None
187+
# latex_logo = None
189188

190189
# For "manual" documents, if this is true, then toplevel headings are parts,
191190
# not chapters.
192-
#latex_use_parts = False
191+
# latex_use_parts = False
193192

194193
# If true, show page references after internal links.
195-
#latex_show_pagerefs = False
194+
# latex_show_pagerefs = False
196195

197196
# If true, show URL addresses after external links.
198-
#latex_show_urls = False
197+
# latex_show_urls = False
199198

200199
# Additional stuff for the LaTeX preamble.
201-
#latex_preamble = ''
200+
# latex_preamble = ''
202201

203202
# Documents to append as an appendix to all manuals.
204-
#latex_appendices = []
203+
# latex_appendices = []
205204

206205
# If false, no module index is generated.
207-
#latex_domain_indices = True
206+
# latex_domain_indices = True
208207

209208

210209
# -- Options for manual page output --------------------------------------------
211210

212211
# One entry per manual page. List of tuples
213212
# (source start file, name, description, authors, manual section).
214-
man_pages = [
215-
('index', 'gsconfig', u'gsconfig Documentation',
216-
[u'David Winslow'], 1)
217-
]
213+
man_pages = [("index", "gsconfig", "gsconfig Documentation", ["David Winslow"], 1)]

examples/batch_bbox.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python
22

3-
'''
3+
"""
44
gsconfig is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API.
55
66
The project is distributed under a MIT License .
7-
'''
7+
"""
88

99
__author__ = "David Winslow"
1010
__copyright__ = "Copyright 2012-2018 Boundless, Copyright 2010-2012 OpenPlans"
@@ -14,10 +14,10 @@
1414

1515
cat = Catalog("http://localhost:8080/geoserver/rest", "admin", "geoserver")
1616

17-
native_bbox = ['589434.856', '4914006.338', '609527.21', '4928063.398', 'EPSG:26713']
18-
latlon_bbox = ['-103.877', '44.371', '-103.622', '44.5', 'EPSG:4326']
17+
native_bbox = ["589434.856", "4914006.338", "609527.21", "4928063.398", "EPSG:26713"]
18+
latlon_bbox = ["-103.877", "44.371", "-103.622", "44.5", "EPSG:4326"]
1919

20-
for rs in cat.get_resources(workspaces='sf'):
20+
for rs in cat.get_resources(workspaces="sf"):
2121
rs.native_bbox = native_bbox
2222
rs.latlon_bbox = latlon_bbox
2323
cat.save(rs)

examples/copy_layergroup.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
'''
1+
"""
22
gsconfig is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API.
33
44
The project is distributed under a MIT License .
5-
'''
5+
"""
66

77
__author__ = "David Winslow"
88
__copyright__ = "Copyright 2012-2018 Boundless, Copyright 2010-2012 OpenPlans"
99
__license__ = "MIT"
1010

1111
from geoserver.catalog import Catalog
1212

13-
demo = Catalog("http://localhost:8080/geoserver/rest",
14-
"admin", "geoserver")
13+
demo = Catalog("http://localhost:8080/geoserver/rest", "admin", "geoserver")
1514

16-
live = Catalog("http://localhost:8080/geoserver2/rest",
17-
"admin", "geoserver")
15+
live = Catalog("http://localhost:8080/geoserver2/rest", "admin", "geoserver")
1816

1917
groupname = "Wayne"
2018
prefix = "wayne_"
@@ -31,7 +29,7 @@ def resolve(layer, style):
3129
resolved = [resolve(l, s) for (l, s) in zip(g.layers, g.styles)]
3230

3331
# upload all styles to live
34-
for (l, s) in resolved:
32+
for l, s in resolved:
3533
wayne_style = prefix + s
3634
style_on_server = live.get_style(wayne_style)
3735
sld = demo.get_style(s).sld_body
@@ -43,7 +41,7 @@ def resolve(layer, style):
4341
backup_layernames = {}
4442

4543
# check that all requisite layers exist!
46-
for (l, s) in resolved:
44+
for l, s in resolved:
4745
assert live.get_layer(l) is not None or l in backup_layernames, l
4846

4947
lyrs = [backup_layernames.get(x[0], x[0]) for x in resolved]

examples/layersusing.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python
22

3-
'''
3+
"""
44
gsconfig is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API.
55
66
The project is distributed under a MIT License .
7-
'''
7+
"""
88

99
__author__ = "David Winslow"
1010
__copyright__ = "Copyright 2012-2015 Boundless, Copyright 2010-2012 OpenPlans"
@@ -18,8 +18,9 @@
1818

1919

2020
def has_the_style(l):
21-
return (l.default_style.name == style_to_check or
22-
any(s.name == style_to_check for s in l.styles))
21+
return l.default_style.name == style_to_check or any(
22+
s.name == style_to_check for s in l.styles
23+
)
2324

2425

2526
print([l.name for l in cat.get_layers() if has_the_style(l)])

examples/postgis_import.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python
22

3-
'''
3+
"""
44
gsconfig is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API.
55
66
The project is distributed under a MIT License .
7-
'''
7+
"""
88

99
__author__ = "David Winslow"
1010
__copyright__ = "Copyright 2012-2018 Boundless, Copyright 2010-2012 OpenPlans"
@@ -21,7 +21,8 @@
2121
database="gis",
2222
user="postgres",
2323
passwd="",
24-
dbtype="postgis")
24+
dbtype="postgis",
25+
)
2526

2627
cat.save(ds)
2728
ds = cat.get_store(name)

0 commit comments

Comments
 (0)