Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
088025fc
Commit
088025fc
authored
Jun 04, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use list constructor or built-in method instead of copy module
parent
ba661a9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
Lib/packaging/compiler/cygwinccompiler.py
Lib/packaging/compiler/cygwinccompiler.py
+3
-4
Lib/packaging/run.py
Lib/packaging/run.py
+1
-2
Lib/packaging/util.py
Lib/packaging/util.py
+1
-2
No files found.
Lib/packaging/compiler/cygwinccompiler.py
View file @
088025fc
...
...
@@ -48,7 +48,6 @@ of GCC (same as cygwin in no-cygwin mode).
import
os
import
sys
import
copy
from
packaging
import
logger
from
packaging.compiler.unixccompiler
import
UnixCCompiler
...
...
@@ -172,9 +171,9 @@ class CygwinCCompiler(UnixCCompiler):
extra_postargs
=
None
,
build_temp
=
None
,
target_lang
=
None
):
"""Link the objects."""
# use separate copies, so we can modify the lists
extra_preargs
=
copy
.
copy
(
extra_preargs
or
[])
libraries
=
copy
.
copy
(
libraries
or
[])
objects
=
copy
.
copy
(
objects
or
[])
extra_preargs
=
list
(
extra_preargs
or
[])
libraries
=
list
(
libraries
or
[])
objects
=
list
(
objects
or
[])
# Additional libraries
libraries
.
extend
(
self
.
dll_libraries
)
...
...
Lib/packaging/run.py
View file @
088025fc
...
...
@@ -5,7 +5,6 @@ import re
import
sys
import
getopt
import
logging
from
copy
import
copy
from
packaging
import
logger
from
packaging.dist
import
Distribution
...
...
@@ -673,7 +672,7 @@ class Dispatcher:
def
main
(
args
=
None
):
old_level
=
logger
.
level
old_handlers
=
copy
(
logger
.
handlers
)
old_handlers
=
list
(
logger
.
handlers
)
try
:
dispatcher
=
Dispatcher
(
args
)
if
dispatcher
.
action
is
None
:
...
...
Lib/packaging/util.py
View file @
088025fc
...
...
@@ -14,7 +14,6 @@ import zipfile
import
posixpath
import
sysconfig
import
subprocess
from
copy
import
copy
from
glob
import
iglob
as
std_iglob
from
fnmatch
import
fnmatchcase
from
inspect
import
getsource
...
...
@@ -384,7 +383,7 @@ byte_compile(files, optimize=%r, force=%r,
elif
optimize
==
2
:
cmd
.
insert
(
1
,
"-OO"
)
env
=
copy
(
os
.
environ
)
env
=
os
.
environ
.
copy
(
)
env
[
'PYTHONPATH'
]
=
os
.
path
.
pathsep
.
join
(
sys
.
path
)
try
:
spawn
(
cmd
,
env
=
env
)
...
...
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