* Do not add sockets that are not already connected
* Don't preemptively mark thread busy
* Clear nntp instance on failed connect
* Just use reset_nw like everywhere else
* Track when the socket is connected and idle connections can handle requested when connected (completed auth) or socket_connected
* Add tests for connection state handling
* Windows is really slow at this
* Rename connected to ready and socket_connected to connected
* Implement direct write
* Support direct_write changes at runtime
* Check sparse support when download_dir changes
* Fixes to reverting to append mode and add tests
* Single write path, remove truncate, improve tests, add test for append mode with out of order direct writes
* assert expected nzf.assembler_next_index
* bytes_written_sequentially assertions
* Slim tests and mock load_article as a dictionary
* More robust bytes_written_sequentially
* Worked but guard Python -1 semantics
* os.path.getsize silly
* Add test with force followed by append to gaps
* Split flush_cache into its own function so the loop does not need to clear the article variable
* Fewer private functions
* Extract article cache limit for waiting constant
* Move option back to specials
* Use Status.DELETED for clarity
* Use nzo.lock in articlecache
* Document why assembler_next_index increments
* Remove duplicated code from write
* load_data formatting
* Create files with the same permissions as with open(...)
* Options are callable
* Fix crash if direct writing from cache but has been deleted
* Fix crash in next_index check via article cache
* Fix assembler waiting for register_article and cache waiting for assembler to write
* Simplify flush_cache loop and only log once per second
* Document why we would leave the assembler when forced at the first not tried article
* When skippedwe can't increment the next_index
* Rename bytes_written_sequentially to sequential_offset improve comments and logic
* Don't need to check when the config changes, due to the runtime changes any failure during assembly will disable it
* Remove unused constant
* Improve append triggering based on contiguous bytes ready to write to file and add a trigger to direct write
* Throttle downloader threads when direct writing out of order
* Clear ready_bytes when removed from queue
* Rework check_assembler_levels sleeping to have a deadline, be based on if the assembler actual pending bytes, and if delaying could have any impact
* Always write first articles if filenames are checked
* Rename force to allow_non_contiguous so it is clearer what it means
* Article is required
* Tweak delay triggers
* Fix for possible dictionary changed size during iteration
* postproc only gets the nzo
* Rename constants and remove redundant calculation
* For safety just key by nzf_id
* Not redundant because capped at 500M
* Tweak a little more
* Only delay if assembler is busy
* Remove unused constant and rename the remaining one
* Calculate if direct write is allowed when cache limit changes
* Allow direct writes to bypass trigger
* Avoid race to requeue
* Breakup the queuing logic so its understandable
* Pipelining and performance optimisations
* Refactor to remove handle_remainder and add on_response callback to allow inspecting of nntp messages
* Logic fix if there are sockets but nothing to read/write
* Fix logic errors for failed article requests
* Fix logic for reconfiguring servers
* Add guard_restart callback to pipelining_requests
* Fix article download stats
* Fix current article request shown via api
* Removal of DecodingStatus
* Fix circular reference
* Cleanup imports
* Handle reset_nw and hard_reset for inflight requests
* Improve __request_article behaviour using discard helper
* Article should be None here (before auth) but just in case
* Remove command_queue_condition unnecessary with the pull rather than push queue system
* During reset discard any data received prior to sending quit request
* Circular references again
* Revert to using bytearray
* Revert "During reset discard any data received prior to sending quit request"
This reverts commit ed522e3e80.
* Simpler interaction with sabctools
* Temporarily use the sabctools streaming decoder branch
* Fix most uu tests
* Reduce maximum pipelining requests
* Fix the squiggly line
* Remove some LOG_ALL debug code
* Make get_articles return consistent (None) - it now populates the server deque
* Reduce NNTP_BUFFER_SIZE
* Rename PIPELINING_REQUESTS to DEF_PIPELINING_REQUESTS
* A little refactoring
* Reduce default pipelining until it is dynamic
* Use BoundedSemaphore and fix the unacquired release
* Use crc from sabctools for uu and make filename logic consistent wit yenc
* Use sabctools 9.0.0
* Fix Check Before Download
* Move lock to NzbFile
* Use sabctools 9.1.0
* Minor change
* Fix 430 on check before download
* Update sabnews to work reliably with pipelining
* Minor tidy up
* Why does only Linux complain about this
* Leave this as it was
* Remove unused import
* Compare enum by identity
* Remove command_queue and just prepare a single request
Check if it should be sent and discard when paused
* Kick-start idle connections
* Modify events sockets are monitored for
* Update all dependencies
* Pin tavern due to failure in newer versions
* User SABnzbd User-agent in wiki test
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
Closes#1574
Add tests for long paths
Make sure long path is >260
Add rar test file with invalid Windows filenames
Add rar_unpack tests for unicode and passworded sets
Simplify Unrar command building
Add test for rar_invalid_windows
Remove check for 260 chars in rar_unpack
Should never happen anymore
Let Unrar rename invalid filenames
Check full path output if rar_unpack
Add helper for check
Correct test_rar_unpack_invalid_windows_filenames
Apply changes also to Direct Unpacker
Extend testing to make sure full paths are tested
Add tests for long paths inside rar
Unrar auto-rename message is different on Linux
* refactor outgoing interface
* refactor
* rollback old change
* We actually don't need another port
Closes#3153
* refactor
* refactor
* refactor to be compatible with old python versions
* forgot to remove match
* fix no route to host on mac
* fix no route to host on mac + rename interface to ip
* fix black + try to fix windows error
* fix black + try to fix windows error
* fix windows error
* fix windows failure
* rollback optional changes
* Remove optional type
* rollback changes + fix issue
* black change
* refactor
* missing refactor