prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  from pwn import * changes __name__
  Running `pwntools==3.14.0.dev0` from py3 dev branch.
  
  from pwn import * imports __name__ apparently.
  
  ```python
  In [1]: __name__
  Out[1]: '__main__'
  
  In [2]: from pwn import *
  
  In [3]: __name__
  Out[3]: 'pwn.toplevel'
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `pwn/toplevel.py`
  Content:
  ```
  1 # Get all the modules from pwnlib
  2 import collections
  3 import logging
  4 import math
  5 import operator
  6 import os
  7 import re
  8 import socks
  9 import signal
  10 import string
  11 import struct
  12 import subprocess
  13 import sys
  14 import tempfile
  15 import threading
  16 import time
  17 
  18 from pprint import pprint
  19 
  20 import pwnlib
  21 from pwnlib import *
  22 from pwnlib.asm import *
  23 from pwnlib.context import Thread
  24 from pwnlib.context import context
  25 from pwnlib.dynelf import DynELF
  26 from pwnlib.encoders import *
  27 from pwnlib.elf.corefile import Core, Corefile, Coredump
  28 from pwnlib.elf.elf import ELF, load
  29 from pwnlib.encoders import *
  30 from pwnlib.exception import PwnlibException
  31 from pwnlib.gdb import attach, debug, debug_assembly, debug_shellcode
  32 from pwnlib.flag import *
  33 from pwnlib.fmtstr import FmtStr, fmtstr_payload
  34 from pwnlib.log import getLogger
  35 from pwnlib.memleak import MemLeak, RelativeMemLeak
  36 from pwnlib.regsort import *
  37 from pwnlib.replacements import *
  38 from pwnlib.rop import ROP
  39 from pwnlib.rop.srop import SigreturnFrame
  40 from pwnlib.runner import *
  41 from pwnlib.timeout import Timeout
  42 from pwnlib.tubes.listen import listen
  43 from pwnlib.tubes.process import process, PTY, PIPE, STDOUT
  44 from pwnlib.tubes.remote import remote, tcp, udp, connect
  45 from pwnlib.tubes.serialtube import serialtube
  46 from pwnlib.tubes.server import server
  47 from pwnlib.tubes.ssh import ssh
  48 from pwnlib.tubes.tube import tube
  49 from pwnlib.ui import *
  50 from pwnlib.util import crc
  51 from pwnlib.util import iters
  52 from pwnlib.util import net
  53 from pwnlib.util import proc
  54 from pwnlib.util import safeeval
  55 from pwnlib.util.crc import BitPolynom
  56 from pwnlib.util.cyclic import *
  57 from pwnlib.util.fiddling import *
  58 from pwnlib.util.getdents import *
  59 from pwnlib.util.hashes import *
  60 from pwnlib.util.lists import *
  61 from pwnlib.util.misc import *
  62 from pwnlib.util.packing import *
  63 from pwnlib.util.proc import pidof
  64 from pwnlib.util.sh_string import sh_string, sh_prepare, sh_command_with
  65 from pwnlib.util.splash import *
  66 from pwnlib.util.web import *
  67 
  68 # Promote these modules, so that "from pwn import *" will let you access them
  69 
  70 __all__ = ["pickle", "StringIO", "BytesIO"]
  71 from six.moves import cPickle as pickle, cStringIO as StringIO
  72 from six import BytesIO
  73 
  74 error   = log.error
  75 warning = log.warning
  76 warn    = log.warning
  77 info    = log.info
  78 debug   = log.debug
  79 success = log.success
  80 
  81 __all__ += list(globals().keys())
  82
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/pwn/toplevel.py b/pwn/toplevel.py
  --- a/pwn/toplevel.py
  +++ b/pwn/toplevel.py
  @@ -67,7 +67,6 @@
   
   # Promote these modules, so that "from pwn import *" will let you access them
   
  -__all__ = ["pickle", "StringIO", "BytesIO"]
   from six.moves import cPickle as pickle, cStringIO as StringIO
   from six import BytesIO
   
  @@ -78,4 +77,4 @@
   debug   = log.debug
   success = log.success
   
  -__all__ += list(globals().keys())
  +__all__ = [x for x in globals().keys() if x != '__name__']
  
verification_info: {"golden_diff": "diff --git a/pwn/toplevel.py b/pwn/toplevel.py\n--- a/pwn/toplevel.py\n+++ b/pwn/toplevel.py\n@@ -67,7 +67,6 @@\n \n # Promote these modules, so that \"from pwn import *\" will let you access them\n \n-__all__ = [\"pickle\", \"StringIO\", \"BytesIO\"]\n from six.moves import cPickle as pickle, cStringIO as StringIO\n from six import BytesIO\n \n@@ -78,4 +77,4 @@\n debug   = log.debug\n success = log.success\n \n-__all__ += list(globals().keys())\n+__all__ = [x for x in globals().keys() if x != '__name__']\n", "issue": "from pwn import * changes __name__\nRunning `pwntools==3.14.0.dev0` from py3 dev branch.\r\n\r\nfrom pwn import * imports __name__ apparently.\r\n\r\n```python\r\nIn [1]: __name__\r\nOut[1]: '__main__'\r\n\r\nIn [2]: from pwn import *\r\n\r\nIn [3]: __name__\r\nOut[3]: 'pwn.toplevel'\r\n```\n", "before_files": [{"content": "# Get all the modules from pwnlib\nimport collections\nimport logging\nimport math\nimport operator\nimport os\nimport re\nimport socks\nimport signal\nimport string\nimport struct\nimport subprocess\nimport sys\nimport tempfile\nimport threading\nimport time\n\nfrom pprint import pprint\n\nimport pwnlib\nfrom pwnlib import *\nfrom pwnlib.asm import *\nfrom pwnlib.context import Thread\nfrom pwnlib.context import context\nfrom pwnlib.dynelf import DynELF\nfrom pwnlib.encoders import *\nfrom pwnlib.elf.corefile import Core, Corefile, Coredump\nfrom pwnlib.elf.elf import ELF, load\nfrom pwnlib.encoders import *\nfrom pwnlib.exception import PwnlibException\nfrom pwnlib.gdb import attach, debug, debug_assembly, debug_shellcode\nfrom pwnlib.flag import *\nfrom pwnlib.fmtstr import FmtStr, fmtstr_payload\nfrom pwnlib.log import getLogger\nfrom pwnlib.memleak import MemLeak, RelativeMemLeak\nfrom pwnlib.regsort import *\nfrom pwnlib.replacements import *\nfrom pwnlib.rop import ROP\nfrom pwnlib.rop.srop import SigreturnFrame\nfrom pwnlib.runner import *\nfrom pwnlib.timeout import Timeout\nfrom pwnlib.tubes.listen import listen\nfrom pwnlib.tubes.process import process, PTY, PIPE, STDOUT\nfrom pwnlib.tubes.remote import remote, tcp, udp, connect\nfrom pwnlib.tubes.serialtube import serialtube\nfrom pwnlib.tubes.server import server\nfrom pwnlib.tubes.ssh import ssh\nfrom pwnlib.tubes.tube import tube\nfrom pwnlib.ui import *\nfrom pwnlib.util import crc\nfrom pwnlib.util import iters\nfrom pwnlib.util import net\nfrom pwnlib.util import proc\nfrom pwnlib.util import safeeval\nfrom pwnlib.util.crc import BitPolynom\nfrom pwnlib.util.cyclic import *\nfrom pwnlib.util.fiddling import *\nfrom pwnlib.util.getdents import *\nfrom pwnlib.util.hashes import *\nfrom pwnlib.util.lists import *\nfrom pwnlib.util.misc import *\nfrom pwnlib.util.packing import *\nfrom pwnlib.util.proc import pidof\nfrom pwnlib.util.sh_string import sh_string, sh_prepare, sh_command_with\nfrom pwnlib.util.splash import *\nfrom pwnlib.util.web import *\n\n# Promote these modules, so that \"from pwn import *\" will let you access them\n\n__all__ = [\"pickle\", \"StringIO\", \"BytesIO\"]\nfrom six.moves import cPickle as pickle, cStringIO as StringIO\nfrom six import BytesIO\n\nerror   = log.error\nwarning = log.warning\nwarn    = log.warning\ninfo    = log.info\ndebug   = log.debug\nsuccess = log.success\n\n__all__ += list(globals().keys())\n", "path": "pwn/toplevel.py"}], "after_files": [{"content": "# Get all the modules from pwnlib\nimport collections\nimport logging\nimport math\nimport operator\nimport os\nimport re\nimport socks\nimport signal\nimport string\nimport struct\nimport subprocess\nimport sys\nimport tempfile\nimport threading\nimport time\n\nfrom pprint import pprint\n\nimport pwnlib\nfrom pwnlib import *\nfrom pwnlib.asm import *\nfrom pwnlib.context import Thread\nfrom pwnlib.context import context\nfrom pwnlib.dynelf import DynELF\nfrom pwnlib.encoders import *\nfrom pwnlib.elf.corefile import Core, Corefile, Coredump\nfrom pwnlib.elf.elf import ELF, load\nfrom pwnlib.encoders import *\nfrom pwnlib.exception import PwnlibException\nfrom pwnlib.gdb import attach, debug, debug_assembly, debug_shellcode\nfrom pwnlib.flag import *\nfrom pwnlib.fmtstr import FmtStr, fmtstr_payload\nfrom pwnlib.log import getLogger\nfrom pwnlib.memleak import MemLeak, RelativeMemLeak\nfrom pwnlib.regsort import *\nfrom pwnlib.replacements import *\nfrom pwnlib.rop import ROP\nfrom pwnlib.rop.srop import SigreturnFrame\nfrom pwnlib.runner import *\nfrom pwnlib.timeout import Timeout\nfrom pwnlib.tubes.listen import listen\nfrom pwnlib.tubes.process import process, PTY, PIPE, STDOUT\nfrom pwnlib.tubes.remote import remote, tcp, udp, connect\nfrom pwnlib.tubes.serialtube import serialtube\nfrom pwnlib.tubes.server import server\nfrom pwnlib.tubes.ssh import ssh\nfrom pwnlib.tubes.tube import tube\nfrom pwnlib.ui import *\nfrom pwnlib.util import crc\nfrom pwnlib.util import iters\nfrom pwnlib.util import net\nfrom pwnlib.util import proc\nfrom pwnlib.util import safeeval\nfrom pwnlib.util.crc import BitPolynom\nfrom pwnlib.util.cyclic import *\nfrom pwnlib.util.fiddling import *\nfrom pwnlib.util.getdents import *\nfrom pwnlib.util.hashes import *\nfrom pwnlib.util.lists import *\nfrom pwnlib.util.misc import *\nfrom pwnlib.util.packing import *\nfrom pwnlib.util.proc import pidof\nfrom pwnlib.util.sh_string import sh_string, sh_prepare, sh_command_with\nfrom pwnlib.util.splash import *\nfrom pwnlib.util.web import *\n\n# Promote these modules, so that \"from pwn import *\" will let you access them\n\nfrom six.moves import cPickle as pickle, cStringIO as StringIO\nfrom six import BytesIO\n\nerror   = log.error\nwarning = log.warning\nwarn    = log.warning\ninfo    = log.info\ndebug   = log.debug\nsuccess = log.success\n\n__all__ = [x for x in globals().keys() if x != '__name__']\n", "path": "pwn/toplevel.py"}]}