Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodburi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
zodburi
Commits
35883ebd
Commit
35883ebd
authored
May 02, 2013
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to a capability test for broken urlsplit.
parent
cb1730b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
zodburi/resolvers.py
zodburi/resolvers.py
+4
-2
No files found.
zodburi/resolvers.py
View file @
35883ebd
from
io
import
BytesIO
from
io
import
BytesIO
import
os
import
os
import
sys
from
ZConfig
import
loadConfig
from
ZConfig
import
loadConfig
from
ZConfig
import
loadSchemaFile
from
ZConfig
import
loadSchemaFile
...
@@ -17,6 +16,9 @@ from zodburi.datatypes import convert_tuple
...
@@ -17,6 +16,9 @@ from zodburi.datatypes import convert_tuple
from
zodburi._compat
import
parse_qsl
from
zodburi._compat
import
parse_qsl
from
zodburi._compat
import
urlsplit
from
zodburi._compat
import
urlsplit
# Capability test for older Pythons (2.x < 2.7.4, 3.x < 3.2.4)
(
scheme
,
netloc
,
path
,
query
,
frag
)
=
urlsplit
(
'scheme:///path/#frag'
)
_BROKEN_URLSPLIT
=
frag
!=
'frag'
class
Resolver
(
object
):
class
Resolver
(
object
):
_int_args
=
()
_int_args
=
()
...
@@ -169,7 +171,7 @@ class ZConfigURIResolver(object):
...
@@ -169,7 +171,7 @@ class ZConfigURIResolver(object):
def
__call__
(
self
,
uri
):
def
__call__
(
self
,
uri
):
(
scheme
,
netloc
,
path
,
query
,
frag
)
=
urlsplit
(
uri
)
(
scheme
,
netloc
,
path
,
query
,
frag
)
=
urlsplit
(
uri
)
if
sys
.
version_info
[:
3
]
<
(
2
,
7
,
4
)
:
#pragma NO COVER
if
_BROKEN_URLSPLIT
:
#pragma NO COVER
# urlsplit used not to allow fragments in non-standard schemes,
# urlsplit used not to allow fragments in non-standard schemes,
# stuffed everything into 'path'
# stuffed everything into 'path'
(
scheme
,
netloc
,
path
,
query
,
frag
(
scheme
,
netloc
,
path
,
query
,
frag
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment