Skip to content

Release candidate - #240

Draft
jwrosewell wants to merge 174 commits into
mainfrom
rc
Draft

jwrosewell wants to merge 174 commits into
mainfrom
rc

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Version: 4.6, set once this rc is ready for review.

Status, 25 November 2026, 16:10 UTC: ready for review at 7b100471, with cxx at 61120767. Every check on that head passed, including all 15 Build and Test entries of run 45613235703. #282 (loading a file only when it was published later) and #279 (warnings as errors in the native builds) are still open drafts and are not part of this release (Still open, items 2 and 3).

Context

This pull request releases rc into main for 51degrees-python, the repository that holds every 51Degrees Python package. ci/packages.json lists 20 packages under pipeline/, device-detection/, ip-intelligence/ and location/, of which 16 are published. The three examples packages and the new fiftyone_pipeline_derivedproperty are not.

The last release was #114, merged into main on 13 November 2026 at 06:22 UTC. Since then 134 pull requests have merged into rc, the last of them (#283) on 25 November 2026 at 12:22 UTC. The release head is 7b100471.

The two on-premise packages compile the 51Degrees C and C++ library from the cxx submodule. main pins 7992af70, 51degrees-cxx 4.5.106, and rc pins 61120767, which #283 moved it to from 699a9789. 61120767 is on 51degrees-cxx rc, which 51Degrees/51degrees-cxx#191 releases, and the five commits on cxx rc after it change nothing under src/. Section 9 says what that move means for the Python packages.

The changes, in the order below, are these.

  1. Alignment to the specification in the Pipeline and the Flow Data, which become read-only once built or finished.
  2. Alignment to the specification in properties, values and usage sharing, which runs last and shares fewer values.
  3. Alignment to the specification in the Cloud Request Engine, the cloud engines and 51Did.
  4. Alignment to the specification in the on-premise engines.
  5. Alignment to the specification in data updates.
  6. Alignment to the specification in environment variable names, all under _51DEGREES_.
  7. Performance improvements, to reads of native results, refreshes and Evidence key filters.
  8. New features, being the derived property package, a cloud engine for translated country names, a saved discovery and free-threaded Python.
  9. The C library and the native build, including the move to cxx 61120767.
  10. Fixes, to usage sharing and to package requirements.
  11. The release plan, CI and workflows.
  12. Examples, which run from a fresh clone, end with Find out more and listen on port 5151.
  13. Tests.
  14. Documentation and housekeeping.

In each group the numbers in the Files, Tests and Pull requests lines match the group's numbered items.

Changes

1. Alignment to the specification in the Pipeline and the Flow Data

Sections 1 to 6 bring the packages in line with the 51Degrees specifications. Several follow 51Degrees/specifications#190, which says that a Flow Data is used by one thread at a time, that a finished Flow Data refuses writes, that Element Data is reused through a pool where the language allows, and that usage sharing runs last.

  1. A built Pipeline cannot be changed. A Pipeline holds its elements in a tuple and its lookup by data key in a read-only mapping, so adding, removing or replacing an element after the build raises and changes nothing the Pipeline runs.
  2. The Pipeline describes the Evidence it accepts, through a new Pipeline.get_evidence_key_filter(). The same pull request makes usage sharing and on-premise Device Detection read Evidence keys in any letter case.
  3. A Flow Data keeps its Element Data in a linked list, added to with no lock, where a dict failed with RuntimeError: dictionary changed size during iteration when one thread walked flowdata.data while a Flow Element added to it.
  4. A finished Flow Data and finished Element Data refuse writes. Adding Evidence, Element Data or an error after processing raises, as does a second process(). The second pull request makes a write through a view of finished Element Data fail too, which the core unit tests on rc needed.
  5. Element Data is reused through a bounded pool for each Flow Element, as the specification asks of implementations that can, and the documentation says a reference kept after the Flow Data closes is not supported.
  6. The web integration elements are added only when the caller has not added them, and a Set Header property name whose identifier starts in lower case is read.
  7. One element in several Pipelines keeps each Pipeline's state, for the Set Headers Element and the JSON Builder. The JSON Builder keeps an element's delayed execution information only once the element has properties, so a cloud engine whose discovery failed at build gets its entries on a later request.
  8. The request view carries server.request-query, the query string of the request line whole and undecoded.
  9. The engine cache key is the same for any Evidence order or key case, so the same Evidence is processed once.
  10. The documentation says what is safe with threads. Element Data can be read from several threads once its Flow Element has finished (Allow Element Data to be read from several threads by a parallel group specifications#78), a Flow Data is used by one thread at a time, and the web examples read their values inside a with block that closes the Flow Data.

2. Alignment to the specification in properties, values and usage sharing

  1. A value with no value and no reason raises with "This instance does not have a set value", where the message was "None", and the text "noValue" given as a value is that value.
  2. A missing property raises with a reason. Give a missing property's reason in the specification's order #221 gave each reason in the specification's order with the missing properties table's messages. Give the released missing property messages again, and share a parameter only when it starts with 51D_ or the Pipeline uses it #246 restores the released messages and keeps the rule that on-premise data raises for a property its tier lists and its result lacks.
  3. Usage sharing runs last, and a Pipeline that puts usage sharing anywhere else is refused, as Set general rules for parallel operation and for Flow Data across threads specifications#190 requires. The Device Detection and IP Intelligence builders added it before the engine. Core finds the element by the marker is_usage_sharing_element.
  4. A query string or form parameter is shared only when its name starts 51D_ or a Flow Element of the Pipeline accepts it, and no cookie but 51D_ ones is shared, whatever the settings. Share every query value by default, and no cookie but 51D_ ones #201 followed Share every query and form value by default, and no cookie but 51D_ ones when all Evidence is shared specifications#155 and shared every parameter by default, Share only 51D_ and listed query parameters when no list is given #218 made a list of None hold no names, and Give the released missing property messages again, and share a parameter only when it starts with 51D_ or the Pipeline uses it #246 followed Share a query or form parameter only when its name starts with 51D_ or the Pipeline uses it specifications#191, which gives the rule as it now stands.
  5. query_whitelist and header_blacklist given as one string are split at commas, the form a configuration file gives a list in.
  6. A key found in the web request and in the Evidence is shared once, whatever its letter case.
  7. The record names every 51Degrees package in use, and carries the values that never change only now and then. A record gains ServerIP, looked up in the background, and a ProcessId. The first record, the first each hour and the first once the address is known carry the invariant values and the Package elements (Write the invariant values again once a value that was not yet known becomes known specifications#189). The session id and sequence are read in any letter case, and a record names the elements of the Pipeline its request came through.
  8. A sequence counts only when it is a whole number or digits, where int() turned 2.0, True and signed text into numbers. A value that is neither is left out and no Error is logged.

3. Alignment to the specification in the Cloud Request Engine, the cloud engines and 51Did

  1. Discovery happens when the Cloud Request Engine is built. The engine asks the cloud service for its accessible Properties and accepted Evidence keys at build, so a Resource Key the service refuses fails the build, and a service that cannot be reached gives a warning and is asked again on first use. Each entry of a response's warnings list is given as a warning.
  2. Every cloud request has a timeout, 2 seconds unless timeout_seconds says otherwise, where a service that never answered held the build or a request with no limit.
  3. The engine's data can be read under cloud-response, the key the specification gives, as well as under cloud, which is deprecated.
  4. Each entry of the cloud's errors list is its own error. One entry is raised with its text as the message, and several are raised as one CloudRequestException whose exceptions hold one for each.
  5. A cloud engine refuses a Pipeline with another Cloud Request Engine, where it took that engine's properties for every Pipeline it was in.
  6. Each cloud hardware profile is Aspect Data, read as profile.hardwarevendor as device data is.
  7. A Property key is found in a dictionary-backed result in any letter case. The same pull request corrects a test name, a docstring and two links.
  8. 51Did. A null factor in a redeem answer reads as a Mismatch, and a short Payload is refused for its version. The layout names that fod_id and did_client offered are deprecated and read through the private _layout module.

4. Alignment to the specification in the on-premise engines

  1. The engines read their Evidence keys after every refresh, take restricted_properties as a comma-separated string, and leave the caller's own list alone.
  2. The match metrics follow the specification. Their metadata has the category Device Metrics and the component Metrics, UserAgents is a list that holds each matched User-Agent once and is empty when the engine does not record them, and method is a name such as PERFORMANCE, where it was a number.
  3. The on-premise Device Detection engine lists its components through a new get_components(), with Metrics among them.
  4. A License Key is needed only for the updates that download. An engine builds with no key when nothing downloads, as the file system watcher needs none, and refuses to build when a download is asked for with no key.

5. Alignment to the specification in data updates

All in the data update service, datafile_update_service.py, which every on-premise engine shares.

  1. One update of a data file runs at a time, with one pending check for each file.
  2. A download that ends before the whole file has arrived is an error accessing the service, whatever urllib3 is installed, and the data in use is kept.
  3. An error in a polled check is caught, logged and reported as AUTO_UPDATE_UNKNOWN_ERROR, and the next check is still scheduled.
  4. A DataFile refreshes its engine with its own identifier when the service gives none.
  5. An update from memory gives its result to its caller alone. update_from_memory calls no update complete callback and raises a failed refresh. A file the service wrote is not refreshed again by the watcher. A failed write is a warning, with the engine refreshed from the bytes given.
  6. The other checks report as the errors table gives. A programmatic check (update_data_file) raises a failure to its caller, a refresh is tried 10 times, a watched file still being written is waited for, the module level REFRESH_TRIES stays readable as deprecated, and the update on start-up reports how the check ended and schedules the next check.
  7. An engine always builds its data file, so a programmatic update works with every update option off, and both data update examples show one, which was the one missing of the four options the specification of the examples lists.
  8. A License Key that holds several products gets the data file in use. When an update request names no product, the distributor answers such a key with status 300 and a URI for each product, which the service treated as a failed check. On a 300 that lists AvailableUris the service now repeats its first request to the configured address with Product added, naming the product of the loaded data file (V4TAC, V4Enterprise or IPIV4Enterprise, through DataFile.get_data_update_product()), with the same If-Modified-Since date. When no product offered matches, or no data file is loaded yet, the check fails with AUTO_UPDATE_HTTPS_ERR and names the products offered. FIX: Ask for the product of the data file in use when a license key holds several #268 first followed the URI offered, and FIX: Repeat the update request with the product, as the specification says #270 repeats the request instead, as Ask for the product of the loaded data file when License Keys hold several products specifications#194 says. data_update_product_type, when set, names the product on every request.

6. Alignment to the specification in environment variable names and keys

The specification's environment variables page is released with this version (51Degrees/specifications#181), and says each name starts _51DEGREES_ and holds one thing.

  1. Only the current _51DEGREES_ names are read by the packages, examples and tests. The deprecated names in common-ci's list are ignored (Breaking changes, item 1).
  2. CI and the tests read every key under its _51DEGREES_ name. Workflows that call common-ci pass secrets: inherit, every tox.ini passes _51DEGREES_*, and a live cloud test with no key skips and names the variable.
  3. Every name the packages, tests, examples and CI scripts read or set is a _51DEGREES_ name for one setting, and none gets its value from another. Cloud tests read _51DEGREES_RESOURCE_KEY_BESPOKE, and a test that runs an example passes the key as _51DEGREES_RESOURCE_KEY, the name people set. Cloud tests and examples call the service _51DEGREES_CLOUD_ENDPOINT names, or the public service when the variable is not set. The web examples listen on _51DEGREES_EXAMPLE_HTTP_PORTS, or on 5151. The performance example and the web benchmark read 20000 Evidence Records.yml, which the example takes with --evidence_file. ci/check-environment-variable-names.ps1 fails on any name read or set that does not start _51DEGREES_, apart from a short list the platform or CI defines.
  4. Every resource key is read from an organization secret. cloud-51did.yml reads _51DEGREES_RESOURCE_KEY_51DID and _51DEGREES_RESOURCE_KEY_BASIC as secrets., and _51DEGREES_CLOUD_ENDPOINT stays an organization variable. BUILD: Read the three resource keys from organization variables #262 read the three resource keys from organization variables and BUILD: Read every resource key from organization secrets #263 replaced that.

7. Performance improvements

  1. Reading a native results instance takes no lock. Let one thread at a time read a native results instance #80 added a lock around every read, for Say how on-premise engines find properties, read graphs and use results on threads specifications#61, and Results instances are not thread-safe, so reads take no lock #241 removed that lock before any release, because every property read of every request paid for it. In 10 paired rounds on an Intel Mac the lock cost 1.69 percent on the console benchmark and 1.86 percent on the web benchmark. The documentation now says a results instance is read by one thread at a time.
  2. A refresh lets go of the GIL, Python's global interpreter lock. hash_python.i and ipi_python.i wrap the three refreshData calls in refreshWithoutGil, so other threads go on processing Flow Data while the native code loads data, with one refresh at a time.
  3. An engine in several Pipelines builds its native engine and registers its data file once, so a second Pipeline neither loads the data file again nor checks and downloads it a second time.
  4. Each engine keeps its Evidence key filter until its keys change, where the on-premise engines and the Cloud Request Engine made one for each Evidence key of each request, and BasicListEvidenceKeyFilter looks a key up in a set.
  5. The Pipeline builds its Evidence key filter once, when the Pipeline is created, where each call of get_evidence_key_filter() made a new one.

8. New features

  1. A new fiftyone_pipeline_derivedproperty package. Its DerivedPropertyElement runs every script of derived-properties, taken as a submodule, so a Python Pipeline can offer HumanConfidence and IsGdpr. The element refuses a second Pipeline, and an example that needs no key, data file or network shows a script given as text, one read from a file and the same Pipeline built from a configuration file. The package is not published yet (Still open, item 6).
  2. CountriesTranslationCloud in fiftyone_ipintelligence_cloud reads the translated country names the cloud service returns, with WeightedCloudEngine and a console example.
  3. The Cloud Request Engine can be built from a saved copy of its discovery, which an engine gives with discovery_state(), and then makes no discovery request. This suits a host that starts often.
  4. Free-threaded Python is tested and documented. A new Free-threaded Python workflow builds both native modules and runs the on-premise tests on Python 3.13t and 3.14t on Ubuntu and 3.14t on Windows. Neither setup.py defines SWIGPYTHON_NOGIL, so neither wrapper declares that it runs without the GIL, and Python turns the GIL back on when it loads either native module. test_free_threaded.py checks that, and each package's readme says so in a new Free-threaded Python section.

9. The C library and the native build

  1. How the packages build the C and C++. fiftyone_devicedetection_onpremise and fiftyone_ipintelligence_onpremise each copy cxx/src/common and their own folder, cxx/src/dd or cxx/src/ipi, into the package (stage_native_source in setup.py), so a source distribution carries the sources it compiles. There is no CMake. Each setup.py compiles the C sources as one library (-std=gnu11 -Wall, or /W4 with MSVC) and the C++ sources as another (-std=gnu++17 -Wall), with the switches that turn some warnings off still in place (-Wno-strict-prototypes, -Wno-unused-variable, -Wno-missing-braces and -Wno-strict-aliasing among them, until BUILD: Make the -Wall -Wextra and /W4 warnings errors in the native builds #279), and IP Intelligence defines FIFTYONE_DEGREES_LARGE_DATA_FILE_SUPPORT and FIFTYONE_DEGREES_REDUCED_FILE for all of it. The extension module is the committed SWIG wrapper, hash_python_wrap.cxx or ipi_python_wrap.cxx, generated with SWIG 4.4.1 from hash_python.i or ipi_python.i, which include the library's hash.i and ipi.i. So Python uses the C++ engine classes, and never calls the C functions itself.
  2. The pin so far. Take 51degrees-cxx 178371ac, the head of its next release #189 moved the submodule from 7992af70 to 178371ac. The nightly submodule update (Update submodules #225) moved it back to 7992af70 and Take the C library back to 178371ac #228 restored 178371ac. Move the C library to ad2ccae5 #242 moved it to ad2ccae5, where the library keeps an engine's file name across a refresh from memory (Keep the data file name when an engine is reloaded from memory 51degrees-cxx#195), so the on-premise data files refresh an engine from its file with refreshData() again. BUILD: Move the cxx submodule to the head of cxx rc #266 moved it to 560de81e and BUILD: Build against cxx 699a9789 #269 to 699a9789. Take 51degrees-cxx 178371ac, the head of its next release #189 and Move the C library to ad2ccae5 #242 generated the wrappers again and got the same four files byte for byte, and the other moves change only the submodule line.
  3. The move to 61120767. BUILD: Build against cxx 61120767 #283 moves the submodule from 699a9789 to 61120767 and changes nothing else, so against the last release the packages pick up every change on 51degrees-cxx rc up to that commit, and from 699a9789 the 26 pull requests BUILD: Build against cxx 61120767 #283 lists, BUILD: Print every thread's stack when a Windows Visual Studio test program crashes 51degrees-cxx#213 to FIX: Store the memory tracker's flag and allocators atomically 51degrees-cxx#240. For the Python packages that means the following.

10. Fixes

  1. Releasing a usage sharing element does not wait for its sending thread. ShareUsage.__del__ now calls thread_pool.shutdown(wait=False) every time, where it joined the sending thread when the element had not been closed. The garbage collector can run __del__ on a thread that is starting, and the join then never returned, which stopped tests/test_usage.py on Python 3.10 until the job's time limit. Closing still sends what is queued, within its five second bound.
  2. Closing usage sharing goes on sending after a failed send, until the failures start a pause, where the first failed send discarded the rest of the queue. The same pull request has the IP Intelligence engine work out the address it reports in one place, client_ip.py.
  3. Packages require the sibling releases that hold the names they import, because a package upgraded alone kept an older dependency and failed to import. ci/write-package-versions.ps1 stops a build whose plan gives a package less than another requires. BUG: Require fiftyone_pipeline_core at the version that holds the names four packages import #257 corrects the test's rows, so four packages also require the fiftyone_pipeline_core this release publishes.
  4. A release of one package is labeled with its version, where [-1] took the last character of the one version string.

11. The release plan, CI and workflows

  1. A package is released only for a change that counts. Changes to documentation, tests, examples, manifest metadata and tox.ini no longer release a package (Release a package only for a change that counts, leaving out documentation, tests, examples and manifest metadata #60), and ci/packages.ps1 then takes the release plan from common-ci's steps/release-plan.ps1 in place of its own copy (Use common-ci's release plan in place of this repository's copy #47).
  2. A pull request is built on the configurations its changes need, measured against the branch the pull request merges into, where every pull request ran all 15 and its diff with main selected every product. macOS and the performance tests run only for rc and releases.
  3. A new workflow runs every ci/*.Tests.ps1 on a pull request or push that changes ci/ or any file under .github/workflows.
  4. Publish takes allow-early-release for common-ci's check that refuses a release within a week of the last.
  5. The Cloud 51Did Tests run on pull requests into rc, so a 51Did change meets the live cloud before it merges.
  6. The workflows stop passing three inputs that were always empty, the four product .github folders GitHub never runs are removed, and the example assets update moves to the root.
  7. The performance step measures on the free files, Device Detection on the Lite file when the TAC file is missing, and IP Intelligence with a new benchmark where the step was skipped.
  8. The integration tests run with no Resource Key, skipping only the tests that need one, where each script stopped before running anything.
  9. The Only rc into main job declares the permissions it uses, contents: read and pull-requests: read, because the shared check asks for both and a called workflow can only be given what its caller has.
  10. The integration and publish scripts take no Keys option. common-ci now puts each key in the environment under its own name and passes no Keys option to the step scripts, which had declared it as mandatory.
  11. Two Human Confidence tests run against the cloud service that CLOUD_STAGING_ENDPOINT names, which serves HumanConfidenceSource, with the key in RESOURCE_KEY_BESPOKE_STAGING. Both names are used by CI only, so they carry no _51DEGREES_ prefix, and only the new Cloud Human Confidence Tests workflow sets them. The workflow runs python -m pytest -m staging nightly, on demand and on pull requests into main and rc that change the example, its tests, the files those tests import or the files the install step uses. The workflow fails when a name is empty, when a test is skipped, and with No staging test ran when pytest selects none. With no staging names set, as in the shared build, the two tests skip.

12. Examples

None of these changes a published package.

  1. Every cloud example ends cleanly with no Resource Key, naming _51DEGREES_RESOURCE_KEY and linking to where a key is created, and the two web examples print their Find out more section when they stop early.
  2. Every example ends with a "Find out more" section.
  3. More examples run on the free data files and take their settings from the environment, and CI runs the examples no test ran, a missing data file's download and two more examples with no arguments or settings.
  4. Three examples show how to create Flow Elements, a simple one, an on-premise engine and a cloud engine.
  5. The IP Intelligence web examples hand the web request to the Pipeline, the on-premise one shares usage, and the usage sharing example sends with certificate checks on.
  6. The web examples listen on port 5151 by default, where they used 5000, 5001 and 5100.
  7. A new Human Confidence web example asks the cloud service for HumanConfidence, passing the request's evidence unchanged, and redeems the value the page's 51Degrees client script returns. Its live tests ask the cloud for HumanConfidenceSource by name, expect a source only from a key that carries one and accept the level Unknown.
  8. The cloud TAC and native model lookup examples say once when the Resource Key does not include HardwarePlatform.Profiles, with a link to create a key that does, where each printed a "No device profiles were returned" line under every heading. The decision comes from the key's accessible properties and never from an empty result, and a cloud service that cannot answer ends the example with that failure. ExampleUtils.get_profiles and ExampleUtils.get_no_profiles_message, which only these two examples called, are removed.

13. Tests

  1. Tests of rules the code already met, in usage sharing, IP Intelligence data, Pipeline metadata and configuration, and an engine given no Property names.
  2. Two usage sharing tests and the location web example test no longer depend on timing, as they wait for no other test's thread and ask again when the cloud's lookup is slow.
  3. A test of what minifying the JavaScript adds to each request, with its limit set from every runner's measurement.
  4. The Cloud Request Engine tests expect the address the engine's order gives. The engine takes an address given in code or configuration first, then _51DEGREES_CLOUD_ENDPOINT, then https://cloud.51degrees.com/api/v4/. Four tests expected the public service whatever the variable held, so a new tests/classes/endpoint.py gives each test the address that order gives.
  5. The hardware lookup examples are tested when the property list request fails once and then succeeds, and the code that reads their output moves to hardware_lookup_output.py with tests of its own that need no key.
  6. The IP Intelligence cloud example tests require values for a known address, as the .NET tests of the same examples do. For 82.12.34.23 they require the registered name, the country and the range, where they counted headings or checked labels.

14. Documentation and housekeeping

  1. The contributor guide at the repository root points at common-ci's list of environment variable names, says a test that fails on timing is fixed, and says the IP Intelligence getting started example runs on the Lite file.
  2. Configuration page links use 51degrees.com/configure, in READMEs, comments, example output and the package messages.
  3. Each user-facing function that raises says what it raises, with an @raise line in its docstring, in the core, engines and Cloud Request Engine packages.
  4. context7.json gives the repository's title and description to the Context7 documentation index.
  5. The nightly schedule's comment names the Node.js nightly's new start time.

Breaking changes

  1. The old environment variable names are ignored. Set _51DEGREES_CLOUD_ENDPOINT for FOD_CLOUD_API_URL, cloud_endpoint and CLOUD_ENDPOINT, _51DEGREES_CLOUD_REQUEST_ORIGIN for cloud_request_origin, _51DEGREES_DD_PATH for 51DEGREES_DD_PATH, _51DEGREES_IPI_PATH for IPINTELLIGENCEDATAFILE, _51DEGREES_LICENSE_KEY for LICENSE_KEY and license_key, _51DEGREES_RESOURCE_KEY for RESOURCE_KEY and resource_key, and _51DEGREES_RUN_PERFORMANCE_TESTS for run_performance_tests. Constants.MESSAGE_OLD_ENDPOINT_VARIABLE is gone (Stop reading the deprecated environment variable names #251).
  2. Four packages require the fiftyone_pipeline_core this release publishes, and four the matching fiftyone_pipeline_engines or fiftyone_pipeline_cloudrequestengine, so drop a lower pin before upgrading (Require the version of each package that holds the names imported #231, BUG: Require fiftyone_pipeline_core at the version that holds the names four packages import #257).
  3. A built Pipeline's flow_elements and flow_elements_display_list are tuples, so compare list(pipeline.flow_elements). Changing them raises, and pickle and copy.deepcopy refuse a Pipeline (Hold a built Pipeline's elements in collections that cannot be changed #184).
  4. FlowData.data is not a dict, so call flowdata.data.copy() for one. Removing Element Data raises TypeError, and a view keeps the list it saw (Keep a Flow Data's Element Data in a linked list, added with no lock #250).
  5. A finished Flow Data refuses writes. Adding Evidence, Element Data or an error raises, as do a second process() and a write to finished Element Data (Refuse writes to a finished Flow Data and to finished Element Data #247, BUG: Refuse writes through a view of a finished Flow Data's Element Data #256).
  6. Element Data held after its Flow Data is closed can show another request's values, so read or copy values before closing (Reuse Element Data through a bounded pool for each Flow Element #248).
  7. A caller's own web integration elements are not added again, and a lower-case Set Header identifier gives its header where reading it raised (Add the web elements only when the caller has not, and read every valid Set Header name #140). setheader_properties is a copy (Keep the Set Headers Element's SetHeader properties for each Pipeline #185).
  8. An element first met on a later request gets its delayed execution information, where reading it raised KeyError (Let the JSON Builder take delayed execution information once an element's properties are known #179).
  9. The engine cache key has a new form, so a cache shared with an earlier version misses its old entries (Make the engine cache key the same for any evidence order or key case #182).
  10. A value with no value and no reason raises "This instance does not have a set value", not "None" (Raise with a message when reading a value that has no value and no reason #134), and AspectPropertyValue(value="noValue") holds "noValue" (Read the text "noValue" given as a value as a value #173).
  11. On-premise data raises for a property its tier lists and its result lacks, where get returned None (Give the released missing property messages again, and share a parameter only when it starts with 51D_ or the Pipeline uses it #246).
  12. A Pipeline with usage sharing anywhere but last raises ValueError. Add ShareUsage last, and upgrade fiftyone_pipeline_core with the Device Detection and IP Intelligence packages (Run usage sharing last and refuse a Pipeline that puts it elsewhere #245).
  13. A query string or form parameter that neither starts 51D_ nor is accepted by a Flow Element is never shared, and query_whitelist and share_all_query_string_parameters do nothing. With share_all=True a cookie that does not start 51D_ is not shared (Share every query value by default, and no cookie but 51D_ ones #201, Give the released missing property messages again, and share a parameter only when it starts with 51D_ or the Pipeline uses it #246).
  14. header_blacklist given as a string is split at commas, and reads back as a list (Read usage sharing's lists from a comma-separated string, as a configuration file gives them #183).
  15. Only some usage sharing records carry the invariant values. The first record, the first each hour and the first once the address is known carry them and the new Package elements, so a reader ties records together by the new ProcessId (Write a process identifier on every usage sharing record, the invariant values in the first record and once an hour, and a Package element for every 51Degrees package #193). An element is named by its key's prefix in lower case (Describe the Pipeline's Evidence, and read Evidence keys in any case #139), and a sequence that is not a whole number or digits is left out (Count only a whole number or digits as the sequence in usage sharing #234).
  16. Building a CloudRequestEngine sends two requests, and a refused key raises CloudRequestException then (Discover the cloud Properties and Evidence keys when the Cloud Request Engine is built #147).
  17. Every cloud request times out after 2 seconds unless timeout_seconds is set, and a replaced requests.request must accept timeout (Give the cloud request engine's requests a timeout #177).
  18. Read the Cloud Request Engine's data as flowdata.get("cloud-response"), as cloud is deprecated, and flowdata.data holds the data under both keys (Read the cloud request engine's data under cloud-response #178).
  19. One errors entry is raised with its text alone, and several raise one CloudRequestException with each in exceptions (Raise each entry of the cloud service's errors list as its own error #204).
  20. A cloud engine in Pipelines with different Cloud Request Engines raises, so build one for each (Refuse a pipeline with another Cloud Request Engine for a cloud engine #198). A cloud hardware profile finds a name in any letter case (Give each cloud hardware profile as Aspect Data #186).
  21. On-premise Device Detection uses Evidence such as Header.User-Agent (Describe the Pipeline's Evidence, and read Evidence keys in any case #139). restricted_properties as a string is a comma-separated list, and the caller's list is left alone (Read a comma-separated property list, and the Evidence keys after every refresh, in both on-premise engines #143).
  22. The match metrics have the category Device Metrics and component Metrics. UserAgents is a string[] (Give the match metric Properties the specification's metadata, and list each matched User-Agent once #145) and [] with update_matched_useragent=False (Give UserAgents as an empty list when the option is off, and send no usage data from the web example test #168), and method is a name such as PERFORMANCE (Give the Method match metric as the name of the match method #133).
  23. An on-premise engine builds with no License Key when nothing downloads, and refuses to build when a download is asked for with no key (Need a licence key only for the updates that download #136).
  24. A change made in place to an engine's evidence_keys_list or a used filter's list is no longer seen, so set a new list (Keep each engine's evidence key filter and look keys up in a set #180).
  25. update_from_memory calls no update complete callback, raises DataUpdateException for a failed refresh, and turns a failed write into a warning and a refresh from the bytes (Give the result of an update from memory to its caller alone #169, Refresh the engine from the bytes given when an update from memory cannot write the data file #175). Upgrade fiftyone_pipeline_engines with the on-premise packages (Refresh the engine from the bytes given when an update from memory cannot write the data file #175).
  26. update_data_file raises a failed check to its caller (Raise a failed programmatic update check to its caller #188). A refresh is tried 10 times and AUTO_UPDATE_TIMEOUT can be reported (Try a refresh 10 times and wait for a watched file, as .NET does #220), and the module REFRESH_TRIES warns as deprecated (Keep the module level REFRESH_TRIES readable, deprecated #230). A callback can run during the Pipeline build for a failed update on start-up (Report how the update on start-up ended, and schedule the next check #233).
  27. A null 51Did factor is FactorResult.MISMATCH, and a Payload of 1 to 4 bytes naming version 1, 2 or 3 reports UNSUPPORTED_PAYLOAD_VERSION (Read a null 51Did factor as a Mismatch, and refuse a short Payload for its version #141). The fod_id and did_client layout names warn as deprecated, so use the accessors on FodId (Deprecate the layout names the 51Did fod_id and did_client modules offer #174).
  28. The web examples default to port 5151, where they used 5000, 5001 and 5100 (Listen on port 5151 by default in the web examples #253). _51DEGREES_EXAMPLE_HTTP_PORTS sets another, and PORT is no longer read (BUILD: Read every setting under one _51DEGREES_ name #259).
  29. The constants that held old names are removed, being LEGACY_RESOURCE_KEY_ENV_VAR, LEGACY_LICENSE_KEY_ENV_VAR, ENDPOINT_ENV_VAR, DATA_FILE_ENV_VAR, ORIGIN_ENV_VAR and the IP Intelligence RESOURCE_KEY_ENV_VAR on the example helpers, UPDATE_EXAMPLE_LICENSE_KEY_NAME in the data file update examples, Constants.FOD_CLOUD_API_URL in fiftyone_pipeline_cloudrequestengine, did_client.ENDPOINT_VARIABLE in fiftyone_pipeline_did and UA_FILE_NAME in fiftyone_devicedetection_shared. Use the constant beside each. KeyUtils.get_named_key reads the name it is given and no other, and performance.py takes --evidence_file in place of --user_agents_file (BUILD: Read every setting under one _51DEGREES_ name #259).

Still open

  1. The version. The 4.6 version number is set once this pull request is reviewed, as the version line at the top says, so the publish of the 16 packages is still to come.
  2. FIX: Load an updated data file only when it was published later #282, loading a file only when it was published later, is not in this release. It needs the native getPublishedTimeFromFile, which 61120767 has (FIX: Read a data file's published date in the C++ engines 51degrees-cxx#228), so it generates the SWIG wrappers again with the change. The specification's "Automatic update from File" section says a watched file is used whatever its date, which disagrees with newFileAvailable. Until the specification settles the point, FIX: Load an updated data file only when it was published later #282 differs from FIX: Load a watched or downloaded data file only when its data is newer 51degrees-dotnet#336 and FIX: Read published dates as midnight and skip files that are not newer 51degrees-java#242 in three cases, being a header that cannot be read, a download before any data is loaded, and a header with no date.
  3. BUILD: Make the -Wall -Wextra and /W4 warnings errors in the native builds #279, warnings as errors in the native builds, is not in this release. So rc still builds with the switches that turn some warnings off, and MSVC still prints D9025 for the /W3 setuptools passes (section 9, item 3). Whether -Werror and /WX apply to every source install of the two packages, so that a newer compiler with a new warning stops a customer's build, or only to the builds 51Degrees runs, is still to be decided.
  4. Other open pull requests. They are not part of this release unless they merge.
  5. The Cloud Request Engine's own order differs from the advised order in two cases, in cloudrequestengine.py. A cloud_endpoint setting is used whenever the setting is given, so a blank setting never falls through to _51DEGREES_CLOUD_ENDPOINT, and only an empty variable counts as blank, so a variable of spaces is used as an address. No pull request changes either yet.
  6. Follow-up issues the merged pull requests name, all open.

Closes #11. Closes #18. Closes #51. Closes #105. Closes #149. Closes #150. Closes #155. Closes #156. Closes #157. Closes #159. Closes #160. Closes #161. Closes #162. Closes #163. Closes #166. Closes #170. Closes #171. Each was closed by a pull request into rc, which GitHub does not act on until the change reaches main.

jwrosewell and others added 30 commits November 13, 2026 08:17
…54)

* Label a one-package release with its version, not its last character

When the release plan holds one package, $plan.Version is a single string,
Sort-Object hands it back as a string, and [-1] took its last character, so
a plan releasing 4.5.3 alone gave the run the label 3, which the publish's
version check refuses. The sort is now collected into an array first.

* Test the publish label for a plan of one package, several packages and none
* DOC: Point at the one list of environment variable names

AGENTS.md gains a section linking common-ci's list of environment variable
names (environment-variables.md, made from environment-variables.json) at
commit 18f9a570, and saying the list decides.

Documentation only.

* DOC: Link the list of environment variable names at d8a9c596

The list at that commit holds the names review found missing.

* Keep one Releases section in AGENTS.md
Pull requests go to rc, so a 51Did change was first checked against the live cloud only when the release pull request into main opened.
…ation, tests, examples and manifest metadata (#60)

Reviewed and approved at head ec8b2fd. The pull request body says what changed and how it was tested.
Reviewed and approved at head 2e8d370. The pull request body says what changed and how it was tested.
Reviewed and approved at head 60b4036. The pull request body says what changed and how it was tested.
Step 1 of [common-ci#306](51Degrees/common-ci#306). The release plan in `ci/packages.ps1`, which works out which packages a publish releases and at which version, moved to common-ci as `steps/release-plan.ps1` in [common-ci#307](51Degrees/common-ci#307), and the rule that documentation, tests and examples do not count was added there by [common-ci#310](51Degrees/common-ci#310). Both reached common-ci's `main`, which the workflows here use, in common-ci's release of 12 November. This repository then uses the shared step in place of its own copy, so that the rule is written once for every package repository.
…les (#119)

The Usage Sharing Element accepts no Evidence, and shares what it finds in the web request that the web integration adds as `server.http-request`, together with the Evidence given to the Pipeline (`found_evidence` in [`share_usage.py` lines 432 to 458 at 5b5a833](https://github.com/51Degrees/51degrees-python/blob/5b5a833239d435676a1ab0450be22bce0c0807a2/pipeline/fiftyone_pipeline_engines_fiftyone/src/fiftyone_pipeline_engines_fiftyone/share_usage.py#L432-L458)). `webevidence` in [`pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py` line 139](https://github.com/51Degrees/51degrees-python/blob/5b5a833239d435676a1ab0450be22bce0c0807a2/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py#L139) adds it for every request it reads.
Each must end without an error, naming the environment variable to set and
giving a tagged link to the page where a key is created.
Each examples package, location and the pipeline packages that hold
examples gain test_find_out_more.py. It reads every example file and fails,
naming the file, when the file has no Find out more section, meaning a list
of links whose 51degrees.com addresses carry a utm_term starting with
find-out-more and a utm_content naming that file, and a link to the
product's folder in this repository. Where an example can stop early
without a key, a data file or the network, the test also runs it to that
end and checks the section is printed there.

The existing tests that capture what an example prints, or the page a web
example serves, now also check for the section. The device lines check of
the TAC and native model lookups leaves out the section's links, which are
indented as device lines are.

These fail until the examples print the section, which the next commits
add.
…letters (#120)

`ShareUsage.found_evidence` merges the values of the web request, which the web integration adds as `server.http-request`, with every Evidence value in the Flow Data, so that a key found in both places is shared once with the Evidence value ([`share_usage.py` lines 432 to 458 at 32ffdcf](https://github.com/51Degrees/51degrees-python/blob/32ffdcf1205a5ce593fb55f5be733de5a18dffde/pipeline/fiftyone_pipeline_engines_fiftyone/src/fiftyone_pipeline_engines_fiftyone/share_usage.py#L432-L458)). It merged on the exact key. `webevidence` writes each header's key in lower case ([`web.py` line 91](https://github.com/51Degrees/51degrees-python/blob/32ffdcf1205a5ce593fb55f5be733de5a18dffde/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py#L91)), so a header an application added by hand in other letters, such as `header.User-Agent`, was found twice and both values were shared.
…s the Lite file (#124)

[AGENTS.md](https://github.com/51Degrees/51degrees-python/blob/175ca4a/AGENTS.md) said the IP Intelligence on-premise `gettingstarted_console` "with no argument looks for the Asn file", shows registration values only once given the Lite file, and prints "This property is not present in the data file." for a property the file lacks. None of that is what the example does on `rc` at 175ca4a.
The creator context demo's exit message with no resource key named the
environment variable only. It now gives a tagged link to the configuration
page, where a resource key is created.
…gence cloud web example has none

The IP Intelligence cloud web example logged nothing and raised an exception
with no key. It now logs the message the cloud console examples log, with
tagged links to the resource keys page and the configuration page, and
returns.
…Find out more section

The custom flow element example ends its page with the Build your own
page, the Pipeline API documentation and this repository's pipeline
folder. The usage sharing example prints the usage sharing documentation,
the Pipeline API documentation and the pipeline folder last, and its
expected output comment says the section follows. The 51Did example
prints the 51Did page, its documentation, the 51Did inspector, the
pipeline folder and the specifications repository after a successful run.
The mixed cloud console printed its section only after a run. Writing the
section moves into GettingStartedConsole.print_find_out_more, which run
still calls, and main now calls it too when there is no key and when the
pipeline cannot be built, so each of the example's ends finishes with it.
Each example now lists its own links, the Device Detection page, the
resource keys documentation and pricing for the cloud examples, the
Device Detection page and where to ask about the Enterprise data file for
the on-premise ones, then this repository's device-detection folder, and
51degrees-cxx where the example uses the native engine. ExampleUtils gains
print_find_out_more, which writes the section in the form the mixed cloud
console uses, a line of "=" then "Find out more:" then each label and link
on a tab-indented line.

The section is printed at every clean end. A cloud console prints it after
its results, and from main when there is no resource key. An on-premise
console prints it from main, so it follows the results or the message that
no data file was found. The data file update example prints it whether it
updated the file, had no licence key or was stopped before downloading.
The CSV and profile metadata examples write it where their progress
messages go, so JSON on standard output stays valid. The offline
processing example prints it to the console, because its results go to a
file. The web examples end their pages with the section and print it to
the console when the server stops, and the cloud ones also when there is
no resource key. The scripts, failuretomatch, performance and the
getting started example in fiftyone_devicedetection, print it last.
Each example now lists its own links, the IP Intelligence page, the
resource keys documentation and pricing for the cloud examples, the IP
Intelligence page and where to ask about the Enterprise data file for the
on-premise ones, then this repository's ip-intelligence folder, and
51degrees-cxx where the example uses the native engine. The mixed examples
add the Device Detection page and folder. ExampleUtils gains
print_find_out_more, which writes the section in the form the mixed cloud
console uses, and get_find_out_more_html, which gives the same links as
the end of a web example's page.

Each console prints the section from main, which every clean end reaches,
so it follows the results, the message that there is no resource key or no
data file, the message that the data file lacks the properties the example
needs, and the message that the device detection package is not installed.
The data file update example prints it whether it updated the file, had no
licence key or was stopped before downloading. The offline processing
example writes its results as YAML on standard output, so it writes the
section as YAML comments. The compare example's results go to a file, so
it prints the section to the console.

The web examples end their pages with the section. The on-premise one also
prints it when the server stops. The cloud web example's handling of a
missing resource key is left as it is, because another change replaces
it.
Both cloud examples list the Geolocation page, the resource keys
documentation, pricing and this repository's location folder. The getting
started example prints the section last, after the result or after the
message that there is no resource key. The web example prints it after
that message, and ends its page with the same links. Its page is served by
flask run, so there is no point at which the example could print the
section when the server stops.
For [specifications#61](51Degrees/specifications#61), "Results and threads". [thread-safety.md, Element Data](https://github.com/51Degrees/specifications/blob/6570727d2af6967390d3c4fbec77b9cf0540d3f3/pipeline-specification/features/thread-safety.md#L59-L66), lines 59 to 66, says "Some Element Data writes into something it holds when it is read, such as an on-premise Engine's Aspect Data, which reads its values from native results that each read writes into. Such Element Data MUST let only one thread at a time read from its results, for example by holding a lock for each read". A native results instance is used by one thread at a time, because reading a value writes into it and the first read of a component can walk its graph.
The test of the location web example with no resource key failed to import
it, because the web integration in fiftyone_pipeline_core imports Flask and
location's test environment did not have it. The same lines are in the
change that tests the examples no test ran.
The Find out more test runs location's web example with no resource key,
and the example imports the web integration in fiftyone_pipeline_core,
which imports Flask, which location's test environment did not have. The
same four lines are in the changes that test the examples with no key and
that test the examples no test ran.
…k out the reported IP address in one place (#129)

Two smaller fixes from the list of deferred work for this release.
…eUtils, as the other IP Intelligence examples do
51DTechResponse and others added 13 commits November 21, 2026 21:01
… without one (#254)

Read every key under its _51DEGREES_ name, and skip a live cloud test without one. Reviewed at 3455f44 with no high finding open, and all 10 checks on that head passing.
…e level, runs the browser tests and redeems the sealed active level (#255)

Add a Human Confidence web example that asks the cloud for the passive level, runs the browser tests and redeems the sealed active level. Reviewed at 8ae821c with no high finding open, and all 5 checks on that head passing.
…ata (#256)

BUG: Refuse writes through a view of a finished Flow Data's Element Data. Reviewed at 07497d9 with no high finding open, and all 7 checks on that head passing.
…es four packages import (#257)

BUG: Require fiftyone_pipeline_core at the version that holds the names four packages import. Reviewed at 7aaa1b2 with no high finding open, and all 9 checks on that head passing.
…, and accept the level Unknown (#258)

BUG: Expect a Human Confidence source only from a key that carries it, and accept the level Unknown. Reviewed at faec395 with no high finding open, and all 5 checks on that head passing.
BUILD: Declare the permissions each workflow needs. Reviewed at 792c63b with no high finding open, and all 3 checks on that head passing.
BUILD: Read every setting under one _51DEGREES_ name. Reviewed at 73348a5 with no high finding open, and all 10 checks on that head passing.
* BUILD: Read the three resource keys from organization variables

The three resource keys _51DEGREES_RESOURCE_KEY_51DID, _BASIC and _BESPOKE are organization variables, as every other resource key is, so the workflows read them from vars. A name holds one thing, and the shared export step stops a job that finds one name both as a secret and as a variable.

* BUILD: Say and check that the resource keys are organization variables

ci/key-names.Tests.ps1 now requires _51DEGREES_RESOURCE_KEY_51DID and
_51DEGREES_RESOURCE_KEY_BASIC to come from the organization variable of the
same name, rather than the secret. The Cloud 51Did workflow's comments and
error messages, the CI READMEs of device-detection, ip-intelligence,
location and pipeline, and the warnings in their run-integration-tests.ps1
now say the resource keys are organization variables and the license keys
organization secrets.
Check the Human Confidence example returns its source. Reviewed at 35d830f with no high finding open, and all 5 checks on that head passing.
cloud-51did.yml now reads _51DEGREES_RESOURCE_KEY_51DID and _51DEGREES_RESOURCE_KEY_BASIC as secrets, because every resource key is an organization secret. The workflow comments and messages, AGENTS.md, the CI READMEs and the run-integration-tests.ps1 warnings say the same.

key-names.Tests.ps1 expects both keys from the secret of their own names, and gains a test that fails when any workflow reads a _51DEGREES_RESOURCE_KEY name as vars.
)

BUILD: Run the integration and publish steps without a Keys option. Reviewed at 69c080f with no high finding open, and all 5 checks on that head passing.
* BUILD: Move the cxx submodule to the head of cxx rc

Moves the cxx submodule to the head of 51degrees-cxx rc (560de81e), the commit under review for the cxx release, so every language builds and tests against the same C code. When the cxx release adds a tag, the submodule moves to the tagged commit.

* BUILD: Move the cxx submodule to the head of cxx rc

Restores every file from rc. Only the cxx submodule pointer differs from rc.
BUILD: Run the CI script tests on a change to any workflow. Reviewed at ac6f4f3 with no high finding open, and all 5 checks on that head passing.
TEST: Expect the cloud address the endpoint order gives. Reviewed at a869226 with no high finding open, and all 5 checks on that head passing.
…olds several (#268)

FIX: Ask for the product of the data file in use when a license key holds several. Reviewed at 66c827f with no high finding open, and all 9 checks on that head passing.
BUILD: Build against cxx 699a9789. Reviewed at 4626ba3 with no high finding open, and all 7 checks on that head passing.
… says (#270)

FIX: Repeat the update request with the product, as the specification says. Reviewed at 8e4b940 with no high finding open, and all 7 checks on that head passing.
TEST: Check the cloud hardware lookup examples return devices. Reviewed at 28fb20d with no high finding open, and all 3 checks on that head passing.
… once (#273)

TEST: Check the hardware lookup examples when the property list fails once. Reviewed at e4c2424 with no high finding open, and all 3 checks on that head passing.
Mykhailo51D and others added 4 commits November 23, 2026 22:55
…g thread (#275)

BUG: Release the usage sharing element without waiting for its sending thread. Reviewed at 7ea46ad with no high finding open, and all 7 checks on that head passing.
…#277)

TEST: Run the Human Confidence source tests against the staging cloud. Reviewed at cbf04fe with no high finding open, and all 6 checks on that head passing.
…276)

TEST: Require values for a known address from the IP cloud examples. Reviewed at d33f646 with no high finding open, and all 3 checks on that head passing.
…e files they use (#278)

BUILD: Say when no staging test ran, and run the staging tests for the files they use. Reviewed at a6d3405 with no high finding open, and all 6 checks on that head passing.
Moves the cxx submodule to the head of 51degrees-cxx rc, as the description says.
@jwrosewell
jwrosewell marked this pull request as ready for review November 25, 2026 16:06
@jwrosewell
jwrosewell marked this pull request as draft November 25, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment