• Jason Madden's avatar
    Python 2.7 on Appveyor dies with a sharing violation; try mkstemp. · 1797ef49
    Jason Madden authored
    I can't reproduce with Python 2.7 locally, and the error makes no
    sense (because we're writing the banner to a *brand bloody new* file,
    guaranteed not to exist). So this is a shot in the dark.
    
    See
    https://ci.appveyor.com/project/denik/gevent/build/1.0.568/job/p44icqoi91a72e08.
    
    Failed to rename 'c:\users\appveyor\appdata\local\temp\1\tmp_j5icn\gevent\corecext.pyx.tmp.2832' to 'c:\users\appveyor\appdata\local\temp\1\tmp_j5icn\gevent\corecext.pyx
    Exception in thread Thread-1:
    Traceback (most recent call last):
      File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
        self.run()
      File "util\cythonpp.py", line 31, in run
        self.value = target(*args)
      File "util\cythonpp.py", line 432, in _run_cython_on_file
        atomic_write(unique_pyx_filename, py_banner + value)
      File "util\cythonpp.py", line 902, in atomic_write
        os.rename(tmpname, filename)
    WindowsError: [Error 32] The process cannot access the file because it is being used by another process
    1797ef49
cythonpp.py 37.5 KB