Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
462bfbfa
Commit
462bfbfa
authored
Mar 28, 2005
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
31e173cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
command/upload.py
command/upload.py
+4
-5
tests/test_dist.py
tests/test_dist.py
+1
-1
tests/test_versionpredicate.py
tests/test_versionpredicate.py
+1
-1
versionpredicate.py
versionpredicate.py
+3
-3
No files found.
command/upload.py
View file @
462bfbfa
...
...
@@ -133,7 +133,7 @@ class upload(Command):
schema
,
netloc
,
url
,
params
,
query
,
fragments
=
\
urlparse
.
urlparse
(
self
.
repository
)
assert
not
params
and
not
query
and
not
fragments
if
schema
==
'http'
:
if
schema
==
'http'
:
http
=
httplib
.
HTTPConnection
(
netloc
)
elif
schema
==
'https'
:
http
=
httplib
.
HTTPSConnection
(
netloc
)
...
...
@@ -145,7 +145,7 @@ class upload(Command):
try
:
http
.
connect
()
http
.
putrequest
(
"POST"
,
url
)
http
.
putheader
(
'Content-type'
,
http
.
putheader
(
'Content-type'
,
'multipart/form-data; boundary=%s'
%
boundary
)
http
.
putheader
(
'Content-length'
,
str
(
len
(
body
)))
http
.
putheader
(
'Authorization'
,
auth
)
...
...
@@ -157,11 +157,10 @@ class upload(Command):
r
=
http
.
getresponse
()
if
r
.
status
==
200
:
self
.
announce
(
'Server response (%s): %s'
%
(
r
.
status
,
r
.
reason
),
self
.
announce
(
'Server response (%s): %s'
%
(
r
.
status
,
r
.
reason
),
log
.
INFO
)
else
:
self
.
announce
(
'Upload failed (%s): %s'
%
(
r
.
status
,
r
.
reason
),
self
.
announce
(
'Upload failed (%s): %s'
%
(
r
.
status
,
r
.
reason
),
log
.
ERROR
)
if
self
.
show_response
:
print
'-'
*
75
,
r
.
read
(),
'-'
*
75
tests/test_dist.py
View file @
462bfbfa
...
...
@@ -175,7 +175,7 @@ class MetadataTestCase(unittest.TestCase):
{
"name"
:
"package"
,
"version"
:
"1.0"
,
"obsoletes"
:
[
"my.pkg (splat)"
]})
def
format_metadata
(
self
,
dist
):
sio
=
StringIO
.
StringIO
()
dist
.
metadata
.
write_pkg_file
(
sio
)
...
...
tests/test_versionpredicate.py
View file @
462bfbfa
...
...
@@ -6,4 +6,4 @@ import distutils.versionpredicate
import
doctest
def
test_suite
():
return
doctest
.
DocTestSuite
(
distutils
.
versionpredicate
)
return
doctest
.
DocTestSuite
(
distutils
.
versionpredicate
)
versionpredicate.py
View file @
462bfbfa
...
...
@@ -101,10 +101,10 @@ class VersionPredicate:
versionPredicateStr = versionPredicateStr.strip()
if not versionPredicateStr:
raise ValueError("
empty
package
restriction
")
raise ValueError("
empty
package
restriction
")
match = re_validPackage.match(versionPredicateStr)
if not match:
raise ValueError("
bad
package
name
in
%
r" % versionPredicateStr)
raise ValueError("
bad
package
name
in
%
r" % versionPredicateStr)
self.name, paren = match.groups()
paren = paren.strip()
if paren:
...
...
@@ -114,7 +114,7 @@ class VersionPredicate:
str = match.groups()[0]
self.pred = [splitUp(aPred) for aPred in str.split("
,
")]
if not self.pred:
raise ValueError("
empty
parenthesized
list
in
%
r"
raise ValueError("
empty
parenthesized
list
in
%
r"
% versionPredicateStr)
else:
self.pred = []
...
...
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