Skip to content

Commit

Permalink
Update to libuv 1.27.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Apr 15, 2019
1 parent e87591c commit 4763354
Show file tree
Hide file tree
Showing 65 changed files with 1,586 additions and 583 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
requirements and enabling build isolation. pip 18 or above is needed
to take advantage of this. See :issue:`1180`.

- Upgrade libuv from 1.24.0 to 1.27.0.

- dnspython >= 1.16.0 is now required for the dnspython resolver.

- Python 3.7 subprocess: Copy a ``STARTUPINFO`` passed as a parameter.
Expand Down
27 changes: 20 additions & 7 deletions deps/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,23 @@ Updating libuv
- Clean up the libuv tree, and apply the patches to libuv (this whole
sequence is meant to be copied and pasted into the terminal)::

rm -rf libuv/.github
rm -rf libuv/docs
rm -rf libuv/samples
rm -rf libuv/test
rm -rf libuv/tools
rm -f libuv/android-configure*
git apply libuv-win-binary.patch
export LIBUV_VER=v1.27.0

cd deps/
wget https://dist.libuv.org/dist/$LIBUV_VER/libuv-$LIBUV_VER.tar.gz
tar -xf libuv-$LIBUV_VER.tar.gz
rm -rf libuv
mv libuv-$LIBUV_VER libuv
rm -rf libuv/.github
rm -rf libuv/docs
rm -rf libuv/samples
rm -rf libuv/test
rm -rf libuv/tools
rm -f libuv/android-configure*
git apply libuv-win-binary.patch

At this point there might be new files in libuv that need added to git
and the build process. Evaluate those and add them to git and to
``src/gevent/libuv/_corecffi_build.py`` as needed. Then check if there
are changes to the build system (e.g., the .gyp files) that need to be
accounted for in our build file.
6 changes: 2 additions & 4 deletions deps/libuv-win-binary.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ index 812c1a6d..f4d66628 100644
+++ b/deps/libuv/src/win/fs.c
@@ -135,7 +135,14 @@ const WCHAR UNC_PATH_PREFIX_LEN = 8;
static int uv__file_symlink_usermode_flag = SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;

void uv_fs_init(void) {
- _fmode = _O_BINARY;
+/* gevent: This breaks `open()` on CPython 2 by changing
+ * the default mode for file operations. Python 3 and PyPy
+ * ar unaffected. It was removed for the (unreleased) libuv 2.
+ * are unaffected. It was removed for the (unreleased) libuv 2.
+ * See https://github.com/gevent/gevent/issues/1282
+ */
+/*
+ * _fmode = _O_BINARY;
+ */
}


2 changes: 1 addition & 1 deletion deps/libuv/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Makefile.in
/android-toolchain

/out/
/build/gyp
/build/

/test/.libs/
/test/run-tests
Expand Down
1 change: 1 addition & 0 deletions deps/libuv/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ Yazhong Liu <yorkiefixer@gmail.com>
Yuki Okumura <mjt@cltn.org>
jBarz <jBarz@users.noreply.github.com> <jbarboza@ca.ibm.com>
jBarz <jBarz@users.noreply.github.com> <jbarz@users.noreply.github.com>
ptlomholt <pt@lomholt.com>
15 changes: 15 additions & 0 deletions deps/libuv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,18 @@ hitesh <sainihitesh.scientist@gmail.com>
Svante Signell <svante.signell@gmail.com>
Samuel Thibault <sthibault@debian.org>
Jeremy Studer <studerj1.mail@gmail.com>
damon-kwok <563066990@qq.com>
Damon Kwok <MedusaIDE@outlook.com>
Ashe Connor <ashe@kivikakk.ee>
Rick <lcw0622@163.com>
Ivan Krylov <krylov.r00t@gmail.com>
Michael Meier <michael.meier@leica-geosystems.com>
ptlomholt <pt@lomholt.com>
Victor Costan <pwnall@chromium.org>
sid <sidyhe@hotmail.com>
Kevin Adler <kadler@us.ibm.com>
Stephen Belanger <admin@stephenbelanger.com>
yeyuanfeng <yeyuanfeng@bytedance.com>
erw7 <erw7.github@gmail.com>
Thomas Karl Pietrowski <thopiekar@gmail.com>
evgley <evgley@gmail.com>
16 changes: 13 additions & 3 deletions deps/libuv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ set(uv_sources
src/fs-poll.c
src/idna.c
src/inet.c
src/strscpy.c
src/threadpool.c
src/timer.c
src/uv-common.c
Expand Down Expand Up @@ -116,6 +117,7 @@ set(uv_test_sources
test/test-socket-buffer-size.c
test/test-spawn.c
test/test-stdio-over-pipes.c
test/test-strscpy.c
test/test-tcp-alloc-cb-fail.c
test/test-tcp-bind-error.c
test/test-tcp-bind6-error.c
Expand Down Expand Up @@ -147,9 +149,11 @@ set(uv_test_sources
test/test-timer-from-check.c
test/test-timer.c
test/test-tmpdir.c
test/test-tty-duplicate-key.c
test/test-tty.c
test/test-udp-alloc-cb-fail.c
test/test-udp-bind.c
test/test-udp-connect.c
test/test-udp-create-socket-early.c
test/test-udp-dgram-too-big.c
test/test-udp-ipv6.c
Expand All @@ -165,6 +169,7 @@ set(uv_test_sources
test/test-udp-send-immediate.c
test/test-udp-send-unreachable.c
test/test-udp-try-send.c
test/test-uname.c
test/test-walk-handles.c
test/test-watcher-cross-stop.c)

Expand Down Expand Up @@ -208,7 +213,11 @@ if(WIN32)
list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c)
else()
list(APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE)
list(APPEND uv_libraries pthread)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
# Android has pthread as part of its c library, not as a separate
# libpthread.so.
list(APPEND uv_libraries pthread)
endif()
list(APPEND uv_sources
src/unix/async.c
src/unix/core.c
Expand Down Expand Up @@ -343,7 +352,8 @@ target_link_libraries(uv_a ${uv_libraries})
if(BUILD_TESTING)
include(CTest)
add_executable(uv_run_tests ${uv_test_sources})
target_compile_definitions(uv_run_tests PRIVATE ${uv_defines})
target_compile_definitions(uv_run_tests
PRIVATE ${uv_defines} USING_UV_SHARED=1)
target_compile_options(uv_run_tests PRIVATE ${uv_cflags})
target_include_directories(uv_run_tests PRIVATE include)
target_link_libraries(uv_run_tests uv ${uv_test_libraries})
Expand Down Expand Up @@ -375,7 +385,7 @@ if(UNIX)

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES LICENSE ${CMAKE_CURRENT_BINARY_DIR}/libuv.pc
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libuv.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down
168 changes: 167 additions & 1 deletion deps/libuv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,170 @@
2018.11.14, Version 1.24.0 (Stable)
2019.03.17, Version 1.27.0 (Stable)

Changes since version 1.26.0:

* doc: describe unix signal handling better (Vladimír Čunát)

* linux: use statx() to obtain file birth time (Ben Noordhuis)

* src: fill sockaddr_in6.sin6_len when it's defined (Santiago Gimeno)

* test: relax uv_hrtime() test assumptions (Ben Noordhuis)

* build: make cmake install LICENSE only once (Thomas Karl Pietrowski)

* bsd: plug uv_fs_event_start() error path fd leak (Ben Noordhuis)

* unix: fix __FreeBSD_kernel__ typo (cjihrig)

* doc: add note about uv_run() not being reentrant (Ben Noordhuis)

* unix, win: make fs-poll close wait for resource cleanup (Anna Henningsen)

* doc: fix typo in uv_thread_options_t definition (Ryan Liptak)

* win: skip winsock initialization in safe mode (evgley)

* unix: refactor getsockname/getpeername methods (Santiago Gimeno)

* win,udp: allow to use uv_udp_open on bound sockets (Santiago Gimeno)

* udp: add support for UDP connected sockets (Santiago Gimeno)

* build: fix uv_test shared uv Windows cmake build (ptlomholt)

* build: add android-configure scripts to EXTRA_DIST (Ben Noordhuis)

* build: add missing header (cjihrig)

* sunos: add perror() output prior to abort() (Andrew Paprocki)

* test,sunos: disable UV_DISCONNECT handling (Andrew Paprocki)

* sunos: disable __attribute__((unused)) (Andrew Paprocki)

* test,sunos: use unistd.h code branch (Andrew Paprocki)

* build,sunos: better handling of non-GCC compiler (Andrew Paprocki)

* test,sunos: fix statement not reached warnings (Andrew Paprocki)

* sunos: fix argument/prototype mismatch in atomics (Andrew Paprocki)

* test,sunos: test-ipc.c lacks newline at EOF (Andrew Paprocki)

* test: change spawn_stdin_stdout return to void (Andrew Paprocki)

* test: remove call to floor() in test driver (Andrew Paprocki)


2019.02.11, Version 1.26.0 (Stable), 8669d8d3e93cddb62611b267ef62a3ddb5ba3ca0

Changes since version 1.25.0:

* doc: fix uv_get_free_memory doc (Stephen Belanger)

* unix: fix epoll cpu 100% issue (yeyuanfeng)

* openbsd,tcp: special handling of EINVAL on connect (ptlomholt)

* win: simplify registry closing in uv_cpu_info() (cjihrig)

* src,include: define UV_MAXHOSTNAMESIZE (cjihrig)

* win: return product name in uv_os_uname() version (cjihrig)

* thread: allow specifying stack size for new thread (Anna Henningsen)

* win: fix duplicate tty vt100 fn key (erw7)

* unix: don't attempt to invalidate invalid fd (Ben Noordhuis)


2019.01.19, Version 1.25.0 (Stable), 4a10a9d425863330af199e4b74bd688e62d945f1

Changes since version 1.24.1:

* Revert "win,fs: retry if uv_fs_rename fails" (Ben Noordhuis)

* aix: manually trigger fs event monitoring (Gireesh Punathil)

* unix: rename WRITE_RETRY_ON_ERROR macro (Ben Noordhuis)

* darwin: DRY platform-specific error check (Ben Noordhuis)

* unix: refactor uv__write() (Ben Noordhuis)

* unix: don't send handle twice on partial write (Ben Noordhuis)

* tty,win: fix Alt+key under WSL (Bartosz Sosnowski)

* build: support running tests in out-of-tree builds (Jameson Nash)

* fsevents: really watch files with fsevents on macos 10.7+ (Jameson Nash)

* thread,mingw64: need intrin.h header for SSE2 MemoryBarrier (Jameson Nash)

* win: fix sizeof-pointer-div warning (cjihrig)

* unix,win: add uv_os_uname() (cjihrig)

* win, tty: fix CreateFileW() return value check (Bartosz Sosnowski)

* unix: enable IPv6 tests on OpenBSD (ptlomholt)

* test: fix test-ipc spawn_helper exit_cb (Santiago Gimeno)

* test: fix test-ipc tests (Santiago Gimeno)

* unix: better handling of unsupported F_FULLFSYNC (Victor Costan)

* win,test: de-flake fs_event_watch_dir_short_path (Refael Ackermann)

* win: fix msvc warning (sid)

* openbsd: switch to libuv's barrier implementation (ptlomholt)

* unix,stream: fix zero byte writes (Santiago Gimeno)

* ibmi: return EISDIR on read from directory fd (Kevin Adler)

* build: wrap long lines in Makefile.am (cjihrig)


2018.12.17, Version 1.24.1 (Stable), 274f2bd3b70847cadd9a3965577a87e666ab9ac3

Changes since version 1.24.0:

* test: fix platform_output test on cygwin (damon-kwok)

* gitignore: ignore build/ directory (Damon Kwok)

* unix: zero epoll_event before use (Ashe Connor)

* darwin: use runtime check for file cloning (Ben Noordhuis)

* doc: replace deprecated build command on macOS (Rick)

* warnings: fix code that emits compiler warnings (Jameson Nash)

* doc: clarify expected memory management strategy (Ivan Krylov)

* test: add uv_inet_ntop(AF_INET) coverage (Ben Noordhuis)

* unix: harden string copying, introduce strscpy() (Ben Noordhuis)

* linux: get rid of strncpy() call (Ben Noordhuis)

* aix: get rid of strcat() calls (Ben Noordhuis)

* aix: fix data race in uv_fs_event_start() (Ben Noordhuis)

* win: fs: fix `FILE_FLAG_NO_BUFFERING` for writes (Joran Dirk Greef)

* build: don't link against -lpthread on Android (Michael Meier)


2018.11.14, Version 1.24.0 (Stable), 2d427ee0083d1baf995df4ebf79a3f8890e9a3e1

Changes since version 1.23.2:

Expand Down
Loading

0 comments on commit 4763354

Please sign in to comment.