/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/__init__.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-11 12:46:45 UTC
  • mfrom: (7511.1.1 actions-no-fork)
  • Revision ID: breezy.the.bot@gmail.com-20200611124645-4lx66gps99i0hmzh
Avoid using fork when running the testsuite in github actions.

Merged from https://code.launchpad.net/~jelmer/brz/actions-no-fork/+merge/385565

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
    """
130
130
    try:
131
131
        import ctypes
132
 
        pythonapi = getattr(ctypes, 'pythonapi', None)
133
 
        if pythonapi is not None:
134
 
            old_ptr = ctypes.c_void_p.in_dll(pythonapi,
135
 
                                             "Py_FileSystemDefaultEncoding")
136
 
            has_enc = ctypes.c_int.in_dll(pythonapi,
137
 
                                          "Py_HasFileSystemDefaultEncoding")
138
 
            as_utf8 = ctypes.PYFUNCTYPE(
139
 
                ctypes.POINTER(ctypes.c_char), ctypes.py_object)(
140
 
                    ("PyUnicode_AsUTF8", pythonapi))
 
132
        old_ptr = ctypes.c_void_p.in_dll(ctypes.pythonapi,
 
133
                                         "Py_FileSystemDefaultEncoding")
 
134
        has_enc = ctypes.c_int.in_dll(ctypes.pythonapi,
 
135
                                      "Py_HasFileSystemDefaultEncoding")
 
136
        as_utf8 = ctypes.PYFUNCTYPE(
 
137
            ctypes.POINTER(ctypes.c_char), ctypes.py_object)(
 
138
                ("PyUnicode_AsUTF8", ctypes.pythonapi))
141
139
    except (ImportError, ValueError):
142
140
        return  # No ctypes or not CPython implementation, do nothing
143
141
    new_enc = sys.intern(new_enc)