Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: 8.0.0 development #914

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
e5fbd94
Bump to 8.0.0 in preparation.
jtv Dec 22, 2024
d275085
Retire check for integral `<charconv>` conversions.
jtv Dec 23, 2024
45008ac
Retire checks for missing `std::cmp_less` etc.
jtv Dec 23, 2024
a657263
Assume support for `[[likely]]`/`[[unlikely]]`.
jtv Dec 23, 2024
ae9f1ea
Assume support for `std::span`.
jtv Dec 23, 2024
2436021
Assume support for `std::ssize()`.
jtv Dec 23, 2024
975ec39
Assume `<ranges>` & `<span>`.
jtv Dec 23, 2024
549d452
Remove `<ciso646>`.
jtv Dec 23, 2024
64554e1
Various little C++20 updates.
jtv Dec 23, 2024
c8966de
Raise baseline C++ version to C++20.
jtv Dec 23, 2024
0a98a8e
Format.
jtv Dec 23, 2024
5c46ebf
Drop some workarounds for missing concepts.
jtv Dec 23, 2024
0e32391
More workarounds for no concepts.
jtv Dec 23, 2024
492e985
Bump CircleCI C++ version.
jtv Dec 23, 2024
316038c
Bump C++ version in github workflow.
jtv Dec 23, 2024
aa06444
Update error message to say C++20 is minimum.
jtv Dec 23, 2024
50f1263
Reflect raised baseline in more places.
jtv Dec 23, 2024
3f2aaca
Regenerate `configure`.
jtv Dec 23, 2024
a5fe9c5
Retire `binarystring`.
jtv Dec 23, 2024
beae650
Retire result row slicing.
jtv Dec 23, 2024
71bf33d
Docstring.
jtv Dec 24, 2024
55ae6dd
Does tweaking configure cmd line work?
jtv Dec 24, 2024
52a5b5d
Log versions.
jtv Dec 26, 2024
131f39e
Try clang.
jtv Dec 26, 2024
272d898
Install clang & gcc.
jtv Dec 26, 2024
45f3c61
Install libpq-dev in doc build.
jtv Dec 26, 2024
479b504
Install build-essential; back to gcc.
jtv Dec 26, 2024
a951647
Not installing clang, so don't run it.
jtv Dec 26, 2024
6109ef4
Try installing more on readthedocs.
jtv Dec 29, 2024
d92db7e
Just one option in CXXFLAGS.
jtv Dec 29, 2024
9e0cbbd
Try double quotes.
jtv Dec 29, 2024
e34e2eb
Wait for notfication faster.
jtv Dec 29, 2024
e7501e0
Drop now-redundant `test04.cxx`.
jtv Dec 29, 2024
2525c94
Remove some more redundant old-style tests.
jtv Dec 30, 2024
719ac98
Retire `connection_base` type alias.
jtv Jan 2, 2025
8799eab
Tweaks.
jtv Jan 2, 2025
3fabf3e
Retired `pqxx::encrypt_password()`.
jtv Jan 2, 2025
dbdbafe
Retire `pqxx::prepare::dynamic_params`.
jtv Jan 2, 2025
8377073
Retire deprecated `stream_to` constructors.
jtv Jan 2, 2025
ee7ef8c
Retire deprecated binary unescaping/quoting.
jtv Jan 2, 2025
ddda717
Split off deprecated `desc` further.
jtv Jan 2, 2025
b1bcde7
Use `std::remove_cvref_t`.
jtv Jan 2, 2025
dc914df
Retire more deprecated quoting/escaping.
jtv Jan 2, 2025
bb433a8
Make deprecated `field` ctors public.
jtv Jan 2, 2025
3615ba5
Remove a pair of "ignore deprecations" headers.
jtv Jan 2, 2025
1185e57
Remove unneeded ignore-deprecated includes.
jtv Jan 2, 2025
ee5b522
Remove another unneeded ignore-deprecated.
jtv Jan 2, 2025
749ab4a
Assume concepts support.
jtv Jan 2, 2025
e606cce
Format.
jtv Jan 2, 2025
9e4eb64
Cosmetic.
jtv Jan 2, 2025
eaf8d88
Work through some C++20 notes.
jtv Jan 2, 2025
a557484
Apply some more standard concepts.
jtv Jan 2, 2025
a150eb9
Assume concepts (update from master).
jtv Jan 9, 2025
50c8d03
Format.
jtv Jan 13, 2025
5449a00
String conversion to `string_view`. More binary types. (#926)
jtv Jan 19, 2025
34a5faa
Make `is_null()` check `always_null` itself.
jtv Jan 19, 2025
f18a864
Move clang-tidy directive.
jtv Jan 21, 2025
2307ee3
Accept `pqxx::binary` concept in more places. (#937)
jtv Jan 25, 2025
b1f69da
#934: Unify test directories (#939)
jtv Jan 25, 2025
42f6b17
A few more tweaks to generic binary support. (#940)
jtv Jan 25, 2025
1593123
Assume support for `std::source_location`. (#941)
jtv Jan 26, 2025
a24c88a
Assume support for source location. (#943)
jtv Jan 27, 2025
f887ca5
Drop `test/unit` from Doxyfile. (#946)
jtv Jan 30, 2025
7e1434e
Pass `std::source_location` into libpqxx functions. (#947)
jtv Feb 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
--enable-maintainer-mode \
--enable-audit \
--enable-shared --disable-static \
CXXFLAGS='-O3 -std=c++17' \
CXXFLAGS='-O3 -std=c++20' \
CXX=clang++
- store_artifacts:
path: config.log
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
createdb "$(whoami)"
# Using clang because currently the gcc build fails with an
# address sanitizer (asan) link error.
./configure --enable-maintainer-mode --enable-audit --disable-static CXXFLAGS='-O1 -std=c++17' CXX=clang++
./configure --enable-maintainer-mode --enable-audit --disable-static CXXFLAGS='-O1 -std=c++20' CXX=clang++
make -j4 check || (cat test-suite.log && exit 1 || true)

- name: Perform CodeQL Analysis
Expand Down
8 changes: 7 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ build:
tools:
python: "3.12"
apt_packages:
- "autoconf"
- "automake"
- "build-essential"
- "graphviz"
- "libpq-dev"
- "make"
jobs:
pre_build:
- "./configure --enable-documentation CXXFLAGS='-O0 -std=c++23'"
- "lsb_release -a && g++ --version"
- "./configure CXXFLAGS=\"-O0 -std=c++23\" --enable-documentation"
- "mkdir -p doc/doxygen-html"
- "cd doc && doxygen"
- "mkdir -p -- $READTHEDOCS_OUTPUT/html"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ project(
)

if(NOT "${CMAKE_CXX_STANDARD}")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down
24 changes: 24 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
8.0.0
- C++20 is now the oldest C++ version that libpqxx supports.
- "String conversion" to `std::string_view` is now supported. (#694)
- **Beware lifetime** when "converting" a string to `std::string_view`!
- Conversion from string to `char const *` is no longer allowed.
- Binary data can be any `std::contiguous_range` of `std::byte`. (#925)
- Generic `quote()` takes `always_null` into account.
- Retired `binarystring` and its headers. Use `blob` instead.
- Retired `connection_base` type alias. Use `connection`.
- Retired `pqxx::encrypt_password()`. Use the ones in `pqxx::connection`.
- Retired `pqxx::prepare::dynamic_params`. Use `pqxx::params`.
- Retired deprecated `stream_to` constructors. Use factory functions.
- Retired `transaction_base::unesc_raw()`. Use `unesc_bin()`.
- Retired `transaction_base::quote_raw()`. Use `quote()` with `bytes_view`.
- Retired result row slicing.
- Deprecated `field` constructors are no longer publicly accessible.
- Assume compiler supports concepts.
- Assume compiler supports integral conversions in `charconv`.
- Assume compiler supports spans, ranges, and `cmp_less` etc.
- Assume compiler supports `std::remove_cvref_t` etc.
- Assume compiler supports `std::filesystem::path`.
- Assume compiler supports `[[likely]]` & `[[unlikely]]`.
- Assume compiler supports `ssize()`.
- Assume compiler supports ISO-646 without needing `<ciso646>` header.
7.10.1
- Fix string conversion buffer budget for arrays containing nulls. (#921)
- Remove `-fanalyzer` option again; gcc is still broken.
Expand Down
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,8 @@ commits in `master`. For example, to get version 7.1.1:
Upgrade notes
-------------

**The 7.x versions require at least C++17.** Make sure your compiler is up to
date. For libpqxx 8.x you will need at least C++20.

Also, **7.0 makes some breaking changes in rarely used APIs:**

* There is just a single `connection` class. It connects immediately.
* Custom `connection` classes are no longer supported.
* It's no longer possible to reactivate a connection once it's been closed.
* The API for defining string conversions has changed.

If you're defining your own type conversions, **7.1 requires one additional
field in your `nullness` traits.**
**The 8.x versions require at least C++20.** Make sure your compiler is up to
date.


Building libpqxx
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.10.1
8.0.0
28 changes: 0 additions & 28 deletions cmake/pqxx_cxx_feature_checks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ try_compile(
PQXX_HAVE_CHARCONV_FLOAT ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_CHARCONV_FLOAT.cxx
)
try_compile(
PQXX_HAVE_CHARCONV_INT ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_CHARCONV_INT.cxx
)
try_compile(
PQXX_HAVE_CMP ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_CMP.cxx
)
try_compile(
PQXX_HAVE_CONCEPTS ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_CONCEPTS.cxx
)
try_compile(
PQXX_HAVE_CXA_DEMANGLE ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_CXA_DEMANGLE.cxx
Expand All @@ -31,18 +19,10 @@ try_compile(
PQXX_HAVE_GCC_VISIBILITY ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_GCC_VISIBILITY.cxx
)
try_compile(
PQXX_HAVE_LIKELY ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_LIKELY.cxx
)
try_compile(
PQXX_HAVE_MULTIDIM ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_MULTIDIM.cxx
)
try_compile(
PQXX_HAVE_PATH ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_PATH.cxx
)
try_compile(
PQXX_HAVE_POLL ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_POLL.cxx
Expand All @@ -55,14 +35,6 @@ try_compile(
PQXX_HAVE_SOURCE_LOCATION ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_SOURCE_LOCATION.cxx
)
try_compile(
PQXX_HAVE_SPAN ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_SPAN.cxx
)
try_compile(
PQXX_HAVE_SSIZE ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_SSIZE.cxx
)
try_compile(
PQXX_HAVE_STRERROR_R ${PROJECT_BINARY_DIR}
SOURCES ${PROJECT_SOURCE_DIR}/config-tests/PQXX_HAVE_STRERROR_R.cxx
Expand Down
16 changes: 0 additions & 16 deletions config-tests/PQXX_HAVE_CHARCONV_INT.cxx

This file was deleted.

9 changes: 0 additions & 9 deletions config-tests/PQXX_HAVE_CMP.cxx

This file was deleted.

11 changes: 0 additions & 11 deletions config-tests/PQXX_HAVE_CONCEPTS.cxx

This file was deleted.

14 changes: 0 additions & 14 deletions config-tests/PQXX_HAVE_LIKELY.cxx

This file was deleted.

9 changes: 0 additions & 9 deletions config-tests/PQXX_HAVE_PATH.cxx

This file was deleted.

11 changes: 0 additions & 11 deletions config-tests/PQXX_HAVE_SPAN.cxx

This file was deleted.

11 changes: 0 additions & 11 deletions config-tests/PQXX_HAVE_SSIZE.cxx

This file was deleted.

14 changes: 3 additions & 11 deletions config-tests/no_need_fslib.cxx
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
// Check whether we need to link to the stdc++fs library.
//
// We assume that the presence of the <filesystem> header means that we have
// support for the basics of std::filesystem. This check will succeed if
// either there is no <filesystem> header, or there is one and it works without
// any special options. If the link fails, we assume that -lstdc++fs will fix
// it for us.
// This check will succeed if std::filesystem::path works without any special
// options. If the link fails, we assume that -lstdc++fs will fix it for us.

#include <filesystem>
#include <iostream>

#if __has_include(<filesystem>)
# include <filesystem>
#endif


int main()
{
#if __has_include(<filesystem>)
std::cout << std::filesystem::path{"foo.bar"}.c_str() << '\n';
#endif
}
7 changes: 0 additions & 7 deletions configitems
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,14 @@ PACKAGE_STRING internal autotools
PACKAGE_TARNAME internal autotools
PACKAGE_VERSION internal autotools
PQXX_HAVE_ASSUME public compiler
PQXX_HAVE_CHARCONV_INT internal compiler
PQXX_HAVE_CHARCONV_FLOAT internal compiler
PQXX_HAVE_CMP public compiler
PQXX_HAVE_CONCEPTS public compiler
PQXX_HAVE_CXA_DEMANGLE internal compiler
PQXX_HAVE_GCC_PURE public compiler
PQXX_HAVE_GCC_VISIBILITY public compiler
PQXX_HAVE_MULTIDIM public compiler
PQXX_HAVE_LIKELY public compiler
PQXX_HAVE_PATH public compiler
PQXX_HAVE_POLL internal compiler
PQXX_HAVE_SLEEP_FOR internal compiler
PQXX_HAVE_SOURCE_LOCATION public compiler
PQXX_HAVE_SPAN public compiler
PQXX_HAVE_SSIZE public compiler
PQXX_HAVE_STRERROR_R public compiler
PQXX_HAVE_STRERROR_S public compiler
PQXX_HAVE_THREAD_LOCAL internal compiler
Expand Down
Loading
Loading